Hi there,
I created a pretty complex animation in Blender and importet it to threejs.
I use @react-spring/three to play the animation (i know i could just play the animation exported but it has to be in sync with other animations). The problem i am experiencing is a slight stuttering in the beginning of the animation, that is not visible in blender, like in the vid below:
I see it. Maybe need check animation position Y values if its contain it. Maybe some rounding value issue.
Here too shaking: https://gltf-viewer.donmccurdy.com/
Yes, chaser thatās what i was thinking. I do not see any stuttering in blender so there has to be an issue when exporting with the values of some sort
Have you, by any chance, configured āUnitsā in Blender, like āMetricā and āMillimetersā? Youāll find those under āScene Propertiesā.
Those are not respected during glb export. Blender instead exports its internal representation of numbers, which may be by a factor 1ā000 smaller than what you would expect. Which would exacerbate a possible rounding issue.
Thatās what Iāve finally ended up doing. The Blender āunitā thing becomes only then important, when you are adding assets to an existing scene which has been using a certain unit system already. For a standalone visualization it is perfectly sufficient, that all assets use the same āunitā, which may well be ānoneā.
The way I tracked my unit issues down was to do a full end-to-end run (modelling in Blender, export to glb, then visualize in three.js) with a very simple geometry, like e.g. a cube. Then check in the debugger the values of your imported mesh:
Repeat as needed, varying settings in the āScene Properties/Unitsā panel, until the raw values shown in the debugger match those which you entered in Blender.
Thanks for the detailed answer, ill look into those resources.
So the problem could be the mesh which i imported into my blender scene? Because when it was created, they used a different unit system right?
Letās assume, you created a cubic box in Blender using a āMetricā unit system and āMillimetersā.
If the boxās dimensions are entered (and shown!) in Blender as e.g. 2.0 * 2.0 * 2.0 mm, centered about the coordinate origin, those dimension would Blender-internally be stored
as 0.002 * 0.002 * 0.002.
The latter would be the coordinate values you are going to see in your browsers debugger, when you run your viewer program. Well, actually youād be looking at Ā±0.001 values because the box is centered.