Load gltf model(contain animations) BoundingVolume have a problem

if you use assetManager.loadModel(xxx.gltf)
and this model file contain animations
you will find this Spatial’s worldBound is error
it is almost close to 0

bound:BoundingBox [Center: (50.0, -0.007782994, -49.959827) xExtent: 0.037440058 yExtent: 0.01766126 zExtent: 0.040171962]

I don’t see this problems in most of the models that I use. In the ones that I did, it was because transforms weren’t applied and so the mesh in Blender was actually a tiny spec.

Applying transforms in Blender before export might fix the problem.

The problem is that from JME’s perspective, the mesh data is tiny until animations are applied… but the skinning is (by default) done in the shader and so Java code never sees that data. It’s possible to fix this in your code after the model is loaded but it requires turning off hardware skinning and then forcing the meshes to recalculate their bounds.

1 Like

thanks
now I use two light(or another useless objects) in blender,the bounds will calculation this two objects
so I will try this method

blender_file