You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if this a gltf bug or a three js bug but when exporting a skinned mesh with an armature with a specific scale the bounding box will not work correctly, for example, I have an object with an armature of scale 0.018 for all axes and a mesh child with a scale of 1; what happens when I import it to threejs/editor is the bounding box take the scale of the armature, as the image below:
and, via coding, when I try to get the object size by:
let measurementBox = new THREE.Box3().setFromObject( this.threeJsObject ); measurementBox.getSize(this.objectSize);
the result is the armature mesh child size (after scaling) multiplied by the armature scale again!
This means if the x dimension of a mesh after being scaled by an armature is 100 with a scale of 0.5 in the armature (actual size of the mesh is 200 then), the bounding box x size will be 50 and not 100, it will scale too after the mesh!
To Reproduce
here is the file that I am using, the armature scale is 0.018 and the bounding box is 0.018 of the actual size of the mesh rather than being 100% of the actual size of the mesh.
Describe the bug
I am not sure if this a gltf bug or a three js bug but when exporting a skinned mesh with an armature with a specific scale the bounding box will not work correctly, for example, I have an object with an armature of scale 0.018 for all axes and a mesh child with a scale of 1; what happens when I import it to threejs/editor is the bounding box take the scale of the armature, as the image below:

and, via coding, when I try to get the object size by:
let measurementBox = new THREE.Box3().setFromObject( this.threeJsObject ); measurementBox.getSize(this.objectSize);
the result is the armature mesh child size (after scaling) multiplied by the armature scale again!
This means if the x dimension of a mesh after being scaled by an armature is 100 with a scale of 0.5 in the armature (actual size of the mesh is 200 then), the bounding box x size will be 50 and not 100, it will scale too after the mesh!
To Reproduce
here is the file that I am using, the armature scale is 0.018 and the bounding box is 0.018 of the actual size of the mesh rather than being 100% of the actual size of the mesh.
https://drive.google.com/file/d/14Iq0pUmHt1uE3F0brMIVfFL5taV2MEZs/view?usp=sharing
Steps to reproduce the behavior:
Expected behavior
the bounding box surrounds all the mesh and not being multiplied with the armature scale, it should be like the image below:

Platform:
The text was updated successfully, but these errors were encountered: