I’ve tried importing a store bought, animated model into jme 3.5, so far with limited success.
I tried converting it with the SDK. Worked fine, showed up fine in SceneComposer. Fails to load with NPE (AnimComposer is missing). Although I’m fairly certain I got a different exception earlier, ‘trying to access member of unnamed module’, or something like that.
I tried using jmeconvert. I get the following exception during conversion:
08:15:03,659 INFO [AssetReader] Loading asset:sailor.gltf
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jme3.util.ReflectionAllocator (file:/***/jmec-1.2.0/lib/jme3-core-3.3.2-stable.jar) to method sun.nio.ch.DirectBuffer.cleaner()
08:15:04,389 INFO [Convert] Processing:sailor.gltf```
And then during loading:
java.lang.IllegalAccessException: class com.jme3.export.SavableClassUtil cannot access a member of class com.jme3.anim.AnimClip with modifiers "protected"
3. I’ve tried loading the unconverted gltf. It loads in some instances, controls are present. But at some point that I haven’t had time to pin down yet, probably when setting the animation it throws:
into applicationDefaultJvmArgs in build.gradle and see if it makes any changes. Afaik this allows using reflection in apps that do not use Java Modules.
I am also using JMEConvert (with the above JVM arg set) to convert Gltf models and I have had no issue so far.
Also, test it in these online Gltf viewers/validators and see if there is no issue with your model.
No. I’m a bit confused over this as well. But I have tried a bunch of different export options and such, so I’m unsure of what happened there. But I’ve also looked for the control in all of the children of the node, so I think I’ve ruled it out. But consider that one a bit fuzzy.
I tried saving the loaded gltf, then loading the resulting j3o with a similar exception as when using jmeconvert:
java.lang.IllegalAccessException: class com.jme3.export.SavableClassUtil cannot access a member of class com.jme3.anim.SkinningControl with modifiers "protected"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99)
at java.base/java.lang.Class.newInstance(Class.java:579)
at com.jme3.export.SavableClassUtil.fromName(SavableClassUtil.java:172)
@Ali_RS
I'm using JDK 11. Adding the default jvm arg didn't help.
The model produced by the SDK now has an AnimControl. Which explains why it didn’t find an AnimComposer, I guess. But I’m about 90% sure there was an AnimComposer produced earlier, because that was the reason I wanted to convert my classes to use it.
I will try the migration tools later and see if that works. But I assume the results will be similar. At least now I can convert back to using AnimControl.
In any case, I’m not asking anyone to dig deep into this. I only wanted to know if it was a known issue or if someone had encountered anything similar.