jmonkeyengine icon indicating copy to clipboard operation
jmonkeyengine copied to clipboard

Cannot load sub-structure in ".glb" model exported by blender 3.4 .

Open SanaeKochiya114514 opened this issue 2 years ago • 5 comments

1a5cf5ec87e87eac48cc790c02ce7087df034f62 8bb04298e8692353f2aa86ec7efd6d8fc3ae2f19 6c9f63f2a8017aedc3d85697e98fffeaf8667a19 e0e5f7d08a1985d3b4ed5a2d1b855fec778473fb

If two objects in the model have a parent relationship in blender 3.4, then export the model to glb. Using assetManager.loadModel("xxxxx.glb"), the engine may load it unproperly.

SanaeKochiya114514 avatar Feb 16 '23 12:02 SanaeKochiya114514

I believe this is the model in question: tank.zip

Taken from: https://hub.jmonkeyengine.org/t/the-engine-seems-not-to-load-the-substructures-of-glb-models-properly/46473/7

tonihele avatar Feb 16 '23 13:02 tonihele

The problem is that you have parented a geometry to another geometry in Blender. In JME you can only parent a geometry to a node.

In Blender, select FactionColor.Cannon object and press Alt+P → select “Clear and Keep Transformation”.

Ali-RS avatar Feb 16 '23 15:02 Ali-RS

I don't understand why this was closed.

Does glTF allow a geometry to be parented to another geometry? If not, then this is an issue with Blender's exporter. But if does, then JME's importer should insert an auxiliary node to act as a parent for both geometries.

stephengold avatar Feb 16 '23 18:02 stephengold

Hmm... I see what you mean. I do not know if gltf allows it or not.

Ali-RS avatar Feb 16 '23 18:02 Ali-RS

From the thread, it appeared that other gltf importers were able to view it correctly.

pspeed42 avatar Feb 16 '23 19:02 pspeed42