Export GLB to STL with influenced Morph Targets

Hello!!
I’m attempting to export a GLB as STL with the morph transformation preserved in the final export.I tried using bakeCurrentTransformIntoVertices and copying the vertex and normal data to a new mesh, but the result is missing the morph data.

I have added a PG replicating the issue: Babylon.js Playground

Helllo and welcome!

bakeCurrentTransformIntoVertices() only bakes the world transform (position, rotation, scale) into the vertices, but it doesn’t bake morph target influences into the base geometry.

To preserve the morph transformation in your STL export, you need to apply the morph target influences to the vertex data before exporting. Here’s one of the possible solutions:

1 Like