Mostly, I use gltf and it just works. Occassionally I will come across something that behaves in a really bizarre way and I think to myself “Gee, I should poke at that some day.”
I have run into another one of those cases and I believe it’s simple enough that I’d like to understand why it breaks and maybe fix/streamline some issues in JME’s gltf support and/or JmeConvert.
As a stand-in model, I downloaded this from sketchfab: Chicken - rigged - Download Free 3D model by Maf'j Alvarez (@blujay) [6e3b93c] - Sketchfab
A simple low-poly chicken.
The gltf provided by sketchfab converted just fine with an older jmec (using JME 3.2)… and other than the fact that the chicken was 11,000 meters tall (yes, really) it worked pretty much ok.
Some days later, I decided I wanted to use animation but would rather use the newer animation from 3.3 GLTF… so I updated my JMEC to use a newer JME. (3.3.2 stable)
Bizarrely, now the chicken doesn’t render. Even though it still says it’s huge, it renders super tiny and some parts appear/disappear as the camera moves as if it’s out of frame. The different animations all loaded, though, and I can see the idle animation cycle in whatever tiny parts happen to be there.
If I mess with the scale of the chicken to the point where I can see it, I can never look straight at it.
So something that worked fine in JME 3.2’s gltf loader is not working find in 3.3’s loader.
I then decided to try to use the FBX and export directly from blender (2.82). This works better. Scale is more reasonable. I can look almost directly at the chicken but still parts get culled at strange times. All of the animations but idle are also gone… so sketchfab knows some magic that blender doesn’t or I’ve selected some incorrect options on export.
I hope those of you more familiar with using GLTF can help me figure out which parts of this are bugs in JME, which parts are bugs in Blender’s exporter, and which are “operator error”.
It’s especially troubling that this actually worked better in an older version of JME.