I'm not 100% sure if this is a Blender issue or an assimp issue. I've built a rigged model in Blender, and I'm exporting it into a custom engine using assimp. I need to get all the bone data, including the location, rotation and bone length because it will be interacting with the physics system.

I've tried exporting to Collada and FBX, and the results are the same: the bone origin locations and rotations are preserved, but the bones all have a scale of 1. Here's a subset of the armature transforms I get from assimp:

|(1.0, 0.0, 0.0, 0.00252628303)|
|(0.0, 0.999999881, 0.0, -0.156933203)|
|(0.0, 7.45057971e-09, 1.0, -0.00477445079)|
|(0.0, 0.0, 0.0, 1.0)|
  |(1.0, 0.0, 0.0, 0.0)|
  |(0.0, 0.999999881, 7.45057971e-09, 0.123953901)|
  |(0.0, 7.45057971e-09, 1.0, 1.27631497)|
  |(0.0, 0.0, 0.0, 1.0)|
    |(1.0, 7.27596022e-12, 0.0, 0.0)|
    |(-1.42374007e-14, 0.999999881, -7.45057971e-09, 0.1790445)|
    |(0.0, 3.72528985e-09, 0.999999881, 3.62223196)|
    |(0.0, 0.0, 0.0, 1.0)|

I know there must be information available about bone length: if I import an FBX into UE4 I can see the skeleton with bones of the correct size in the skeleton view.

How can I get this information out of blender and into my application?

  • 1
    $\begingroup$ I am not totally sure, but I think Collada does not use this information. But you have the child bone location instead. $\endgroup$ – lemon Jul 5 '16 at 11:23
  • $\begingroup$ Do you know if there is another format which would contain this information? $\endgroup$ – sak Jul 5 '16 at 11:25
  • $\begingroup$ Again not sure, but I think the point is about the connected to parent option. If all your child bones are connected to their parent, and if possible in UE4, just take the positions to calculate the lengths. But I don't know if this helps for your skeleton. $\endgroup$ – lemon Jul 5 '16 at 11:45
  • $\begingroup$ Thanks I'll give it a try. It's not a perfect option as this would not account for the leaf bones, and there's some ambiguity for bones not directly adjacent to the parent bone (i.e. hips->pelvis) but it should probably be good enough for now. $\endgroup$ – sak Jul 5 '16 at 13:11
  • $\begingroup$ Do you have "tip_x tip_y tip_z" somewhere in the file ? $\endgroup$ – lemon Jul 5 '16 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.