I Think the builtin Class is the IllegalArgumentException
rhoo
I’ll fix this.
should work now
Congratulations on making this work (against all predictions, I note).
I’d love to add glTF import to Maud, but Maud is built on JME 3.1,
and I gather your code is in a feature branch of the Git repository.
How difficult would it be to backport glTF support to 3.1?
Any obvious difficulties?
I’m not asking you to do it. I’m trying to decide whether to attempt it myself.
I changed some things in core while I was at it… I didn’t have in mind the backward portability to 3.1
Why not consider migrating maud to 3.2? I’m going to try to push 3.2 when gltf is ready.
I’m sad there’s been no new Engine release in 6 months and would dearly love to see a v3.2 branch in the repo.
When I do, I’ll promptly attempt to port all my projects to it, including Maud. After that, we’ll see…
@nehon can you look at the model, please?
there are .blend and exported to glFT files, I see that I have wrong texture coords in loaded glFT version
I’ll check that out.
What’s the source of the gltf?
it’s a blender model, it’s the same in the archive
ok you exported it with this exporter GitHub - KhronosGroup/glTF-Blender-Exporter: Moved to https://github.com/KhronosGroup/glTF-Blender-IO. ?
There is no material node in the gltf file…
EDIT: as in the blender file… not sure how it’s supposed to work.
EDIT: sure you didn’t just flip the texture when loading it?
oh, you are right thanks
Alright, it’s now been merged on master, test, enjoy.
SEVERE: Failed to load model from asset "/Models/gltf/Corset/glTF/Corset.gltf"
com.jme3.asset.AssetLoadException: An error occurred loading /Models/gltf/Corset/glTF/Corset.gltf
at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:137)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
at maud.Util.loadCgmAsset(Util.java:529)
Caused by: java.lang.NullPointerException
at com.jme3.scene.plugins.gltf.GltfLoader.readTexture(GltfLoader.java:636)
at com.jme3.scene.plugins.gltf.GltfLoader.readTexture(GltfLoader.java:619)
at com.jme3.scene.plugins.gltf.GltfLoader.readMaterial(GltfLoader.java:549)
at com.jme3.scene.plugins.gltf.GltfLoader.readMeshPrimitives(GltfLoader.java:395)
at com.jme3.scene.plugins.gltf.GltfLoader.readNode(GltfLoader.java:209)
at com.jme3.scene.plugins.gltf.GltfLoader.readChild(GltfLoader.java:257)
at com.jme3.scene.plugins.gltf.GltfLoader.readScenes(GltfLoader.java:168)
at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:121)
... 42 more
fixed on master.
Thank you. I’ve also run into a situation where imported models contain meshes on which isAnimated() returns true and getMaxNumWeights() returns -1. For instance, Figure_2_geometry_0 in /BrainStem/glTF/BrainStem.gltf and Cesium_Man in /CesiumMan/glTF/CesiumMan.gltf
I assume this is a bug in the loader.
You’re right, it’s actually used only for software skinning, so I missed this one. Will fix it asap.
and fixed
Really cool
Thanks for supporting GLTF on JME.
I will give it a try in a few days.
It will be cool to have this. Fortunately gltf-blender plugin supports morph animation (shape keys) export which makes it possible to export softbody animation from blender.