StackExchange Blender

Mocap Data to pose animation

Hey there!

I’m having a CSV mocap file as my input to blender. The file line consists of frame number and 17 keypoints XYZ relative to the center of the world/body coordinates (all the way up to 52 columns) . I’m able to successfully parse it into series of 17 meshes and their XYZ coordinates and place them within respective keyframes. Thus within a Blender I'm now able to confirm mocap data is quite clean.

Now I’m into trying to come up with an actual pose animation for that file. For that matter I’ve created an armature visually close representing a number of bones within a shot and parented my model to that. Now I want to actually animate the armature. Considering my input file format I'm treating that as assigning head/tails coordinates within a pose mode.

The problem is it seems bpy is not able to assign head/tails coordinates other than on Edit Mode. Meaning head/tail coordinates are not editable within a Pose Mode. Meaning I cannot actually animate the armature. So at this point I’m kinda stuck.

Any comments or advices on how to approach the task given the format I'm working with would be highly appreciated! I’m really into something promising with machine learning and stuff for character animation but I’m stuck with trying to show the demo within a blender.

EDIT (for the sake of clarity): CSV contains keypoints coordinates where main bones connect not actual bones coordinates. Example: elbow left, knee right, etc

  • $\begingroup$ Recommend checking out the code of the bvh importer. You don't animate edit bones, they define the armature, the rest pose or "zero" position of pose bones if you like, then animate pose bones. $\endgroup$
    – batFINGER
    Jun 18, 2020 at 8:29
  • $\begingroup$ thanks! that pretty clear in terms of edit bones and pose animation, yeah. what am I looking for at bvh importer? worth noting the problem as I see it right now is: how do I go from joints/keypoints to bones animation $\endgroup$ Jun 18, 2020 at 8:34
  • $\begingroup$ Is all in the bvh importer code, creates an armature, creates an animation. May find these some help (consider empties as joints) blender.stackexchange.com/questions/30835/… blender.stackexchange.com/questions/90171/… $\endgroup$
    – batFINGER
    Jun 18, 2020 at 8:40
  • $\begingroup$ thank you, @batFINGER! now that's a direction! so basically an idea is: 1. build an armature for the bones generated out of CSV 2. it seems to be be useful to make sure bones are directed properly with damped track constraint 3. animate on every CSV line with copy_location constraint parented to the mesh cloud out of csv keypoints? 4. bake. it seems the rotation received from bones can provide some mess? any tips on bpy for that? again, thank you so much for pointing, this is tremendous progress I'm having on the issue $\endgroup$ Jun 18, 2020 at 10:33


You must log in to answer this question.

Browse other questions tagged .