Any possibility to update more than 4 morph targets at once?


I am trying to visualize a model that has more than 4 morphs (blendshapes) to be updated. The limitation is mentioned here and I wonder if it is somehow possible to provide the changes at once, just after it was loaded or being loaded and bake it.

My model has over 30 morphs which I change almost all of them.

Do you mean manually change the mesh and keep it static then?

Hi @Deltakosh, pretty much yes. I thought I wasn’t clear enough and just edited the post before seeing your reply.

This is not doable out of the box but easy to do :slight_smile:
You will need to get the vertex data from all morph and just combine them into the source

To get vertex data: Update Vertices - Babylon.js Documentation

1 Like

So then I guess, I will get the positions of all the morphs mesh.morphTargetManager.getTarget(n).getPositions(), By the morph value, interpolate to that point in between main model and the morph vertex position. Or maybe get their averages.

Thank you I will give this a try! :+1:

1 Like

This is how the shaders are doing it:

1 Like