Hello, i am currently learning about the glTF format and most of it makes sense except the Skins part
I am mostly confused about the joints array, what data is written there?
this is an example from the gltf tutorial about skins
and i don’t understand what the ‘1’ and ‘2’ refer to
also how is a joint defined in glTF?
from the specification: The skin contains an array called `joints` , which lists the indices of the nodes that define the skeleton hierarchy.
but i don’t entirely get what that means so any explanation would be appreciated
Yes, because i have a custom model format that i first need to convert to glTF, therefore i need to write my own glTF exporter(and i’ve made really good progress, only thing left is animations) before i can import those models in JME
Your best bet is to look at the JME code that reads the format.
It may be difficult to reverse engineer “how to write XYZ” from “how we read XYZ”… but that’s the direction any of the JME GLTF experts would be coming from, too. We never had to write it, only read it… and usually we tried to make sure JME could read the canonical examples, things exported from Blender as GLTF, and GLTF files downloaded from sketchfab. (Not necessarily in that order since the original author of our GLTF support has moved on and now works at Sketchfab.)
Personally, the animation+skinning stuff is that part of GLTF that I’m least familiar with.
If it were me, I’d probably be attacking from multiple fronts. On one side, I’d have a simple model open in Blender to look at what it produces for scenarios common to my own format. On the other side, I’d have the JME source open to try to figure out how it’s interpreting said data.