Description of the problem
As reported in KhronosGroup/glTF-Blender-IO#856, the model below appears rotated by 90º around the X axis in three.js, when any of the included animations are played. In several other viewers (BabylonJS, glTF-Sample-Viewer, Blender), the model appears upright.
- .blend: https://github.com/KhronosGroup/glTF-Blender-Exporter/files/2545811/game_man_sketchbookb1.zip
- .glb: https://github.com/KhronosGroup/glTF-Blender-IO/files/4141446/Archive.zip
^The second link also contains a second version of the model, game_man_packed.glb
. The only difference is that the second has been optimized by gltfpack — and for some reason it then renders correctly.
expected | three.js |
---|---|
![]() |
![]() |
The glTF validator reports several possible issues with this model (joint weights should be normalized, and so on) but nothing that looked like an obvious cause to me.
For a quick way to preview the problem, drag the model into https://threejs.org/editor/ or https://gltf-viewer.donmccurdy.com/, then play the Idle animation (or any animation with an obvious upright pose). In my viewer, the model itself is accessible as content
from the JS console.
Three.js version
- Dev
- r113
- …
It’s resting…🤡
Wow… that’s… yeah. Confirmed, renaming the node (I edited the original
.glb
by hand) fixes the issue.(╯°□°)╯︵ ┻━┻
Either we need to escape this name in PropertyBinding.sanitizeNodeName, or remove the special case entirely. I think I’d vote for the latter.
Thanks for finding that! Had not occurred to me at all.
“root” name issue has been discussed here, too #16693