Bones/Joints, Skeleton, difference or bug

I’ve created a simple rocky npc :slight_smile:. It has legs and arms and it would like to move them rather accurately.
Thus, I made a simple IK, yet there is a slight problem.

The first pictures shows its bones in Blender.
The second picture shows its bones in jME with the help of SkeletonDebugger.

Looking at the second picture. It looks as if 5 bones are missing, namely: Shin.R, Shin.L, Hand.R, Hand.L, Head.

The listing below shows the names of the bones, including the above ones. Thus, none are missing.

As I understand the jme Bone class, it represents a joint.
In jme the bone Shin.R represents the knee.
While in Blender, if the knee joint is selected, it represents the bone Leg.R.

Thus, there is the difference.
Do you consider this difference a bug?

I came across this as I tried to calculate the length of the bone Shin.R.

float legRLength = skeleton.getBone("Shin.R")
float shinRLength = skeleton.getBone("Shin.R")
//however in this case, Shin.R has no children
//thus exception is thrown

Jme listing of bones:

Hips bone
-Hips.R bone
--Leg.R bone
---Shin.R bone
-SpineBottom bone
--SpineMiddle bone
---SpineTop bone
----Collar.R bone
-----Arm.R bone
------Forearm.R bone
-------Hand.R bone
----Neck bone
-----Head bone
----Collar.L bone
-----Arm.L bone
------Forearm.L bone
-------Hand.L bone
-Hips.L bone
--Leg.L bone
---Shin.L bone

Well it’s not a bug… It’s just a different design. Bones’ length or bones’ tip are useless for skeletal animation. So most engines elect to have joints instead of bones like in blender. The skeleton debugger just displays what it can.
In 3.3 I made a debugger that approximate the length of the leaves joints. But it’s an approx…

Okay thanks, well in that case I will just somehow export the bones lengths and be done with it.

I guess bones’ tips might be useless for skeletal animation, but on the other hand, there are no attachment nodes on bone’s tips, which are useful.

As an easy workaroud one can add extra bone at tips.

You can emulate that pretty easily with regular nodes. Attach a node to the bone’s attachementNode and offset its z coordinates by the bone’s length, then attach whatever you want to it.

Well that’s a waste IMO, this bone will be handled like any other bones. taking more cpu cycles to update, taking more gpu cycles and uniforms slots to skin the mesh. If it’s just that for it to show up nicely in the skeleton debugger it’s really too bad.
Edit : specially when you add finger tips, that’s 10 more bones for nothing

Okay, thanks I’ll try that.

While going across the blender importer, I came across another peculiar thing.

I made a test file in blender with an armature of a single bone.
In jme, the result had two bones.

The reason was that: adds one extra bone to imported models:

bonesList.add(0, new Bone(""));

I commented out this line, and it seems the model works just fine. I’ll keep it that way to see if I’ll come into an issue later or not.

Yeah the blender importer has never been great for importing bone animation. TBH I never use it, and I never looked at the code.