jmonkeyengine
jmonkeyengine copied to clipboard
Cannot load sub-structure in ".glb" model exported by blender 3.4 .
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.
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
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”.
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.
Hmm... I see what you mean. I do not know if gltf allows it or not.
From the thread, it appeared that other gltf importers were able to view it correctly.