Morph targets

Hi
I have a problem with loading morphing on geometry.
When I import one geometry that has 2 materials assigned to it, the engine creates 2 morphs for 2 materials. And when I connect the animation, one of them does not work. Is it possible to make it so that when importing a morphing is created by geometry and not by materials, as I have problems with this?

I attach the scene where it was tested and in the GLB viewer these 2 morphs are displayed, but in the 3d program I have created 1 morph.
https://playcanvas.com/editor/scene/1603696

When a single mesh (from fbx) is imported, that has multiple materials, the mesh vertices / triangles get split by material to separate MeshInstances in Playcanvas. Glb works the same way in general. And so then you need multiple Morph classes, one per Mesh class.

But they should all animate. Perhaps we have a bug in the engine where if the animation finds one morph to animate on an Entity, it stops instead of finding additional morphs on the same entity.

@Elliott - could you quickly check if that’s the case?

@mvaligursky It looks like that was the issue.

I’ve submitted a PR here so we should be able to get a fix in for the next engine release.

3 Likes