0

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:

pelvis
|(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)|
  spineLower
  |(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)|
    spineUpper
    |(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?

sak
  • 101
  • 1
    I am not totally sure, but I think Collada does not use this information. But you have the child bone location instead. – lemon Jul 05 '16 at 11:23
  • Do you know if there is another format which would contain this information? – sak Jul 05 '16 at 11:25
  • 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. – lemon Jul 05 '16 at 11:45
  • 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. – sak Jul 05 '16 at 13:11
  • Do you have "tip_x tip_y tip_z" somewhere in the file ? – lemon Jul 05 '16 at 13:47
  • I have seen in the source code that the Collada exporter uses a parameter called "use_blender_profile"... In this case, the leaf bone node may contain its size as additional information and also the information about the connection, in the Collada file... but... I dont know where to set this option in Blender... (the names in the file are 'tip_x', 'tip_y', 'tip_z' and 'connect') – lemon Jul 05 '16 at 14:06
  • FYI, I have posted this http://blender.stackexchange.com/questions/57252/where-to-set-use-blender-profile-option – lemon Jul 05 '16 at 14:38
  • I don't know if you have seen that ? there is an answer about the problem http://blender.stackexchange.com/questions/57252/where-to-set-use-blender-profile-option/ – lemon Jul 28 '16 at 05:43

0 Answers0