SkinnedMesh and its Skeleton not matching

As the picture shows, some models with skinned mesh displaying incorrectly, seems like the skeleton and mesh is separated, and also the box of model is based on the skeleton.In addition, in this case if the model playing its animation, the animation is not correct too.

How can i fix this kind of issue? Windows build in 3D Viewer can display this model correctly.

FBX file link: Demo.fbx - Google Drive

i suggest u remove the skeletons, and then autorig it with mixamo, download the rigged character as fbx.

Related: SkinnedMesh: Incorrect bounding box and culling · Issue #14499 · mrdoob/three.js · GitHub

^this doesn’t affect playback of animation but might affect other things like frustum culling.

@donmccurdy The too small bounding box is indeed the result of an incomplete computation since the bone transforms are not honored.

However, I was wondering today why the skeleton helper does not show up in the correct size, too. And that’s unfortunately a different issue.

The helper does not honor the bind matrix when computing the new positions of its line vertices. Unfortunately, since the helper accepts any kind of 3D objects as its ctor parameter, it’s difficult to extract the bind matrix. Depending on how the scene hierarchy is structured and what object is applied to SkeletonHelper, you have no access to the bind matrix at all.

A rewrite of the helper would solve this issue if it only accepts SkinnedMesh. However, this would break use cases like webgl_loader_bvh. Although I think a skeleton should be tightly coupled to SkinnedMesh in order to make implementations less confusing.

2 Likes