I have a scene where we import externally calculated “joint positions” in Json format to snap the joints of a GLB rig file in Babylon. These stored Json values are loaded as keyframes for the rig. The rig is heavy.
There are other stl elements which are loaded in each keyframe that match the rig deformation. The animation plays fine with all these elements in the viewport… All good till here.
I need to export the glb rig deformation as an stl per main keyframe (not the interpolating inbetween frames). Currently we have to dispose and reload for every Json file generated which is a slow process as the rig is heavy, this is done on the server side and not displayed to the user. If we bake the vertices and export per keyframe stl, it fails to load the next set of Json values correctly on the rig.
So essentially when the user is satisfied with the animation and moves to the next level, we will run this on the server side and provide the exported stl files.
Any help / direction to optimize this will be greatly appreciated. Like in the GLB optimizer, we can load the animation canvas in one viewport and export the stl keyframes in the other one. We could use this for debugging / checking the output per keyframe.
Any other suggestion / approach will work too.
Thanks !!