4
$\begingroup$

So I have some data exported from OpenCV that captures human movement from videos, such that each joint is mapped to a point in 3d space for each frame of the video, and saved into a CSV for later use.

I have a rough idea about how to load these points through an import script in blender, and sequence the frames into an animation, but is there any way I could possibly take these points and turn them into a proper rig? Is there a plugin that does this already? I've done some googling with no luck, and the recent questions don't seem to ask about this specifically. I understand there might be some complication in describing relative rotations from translations alone. If this is the case, I'm fine trying to figure it out on my own.

$\endgroup$
1
$\begingroup$

I would do it this way, requiring Blender and Blender Add-On: Sverchok and/or maybe Animation Nodes (!).

Supposedly all this can be done using Python Script, but for artist, maybe Sverchok or AN Animation Nodes is A LOT easier.

  1. You start with some kind of data of point cloud. In CSV or whatever. I supposed you have recorded the data for each frame. I will start with just a single frame, this will be for the Rest Bones. enter image description here

  2. Load the CSV data into Sverchok via Text In node. Right away here, I am turning the point cloud into group of edges, merge, and this will be for the Bones, via Skin Modifier.

enter image description here

  1. Poly Edge -> Skin Modifier -> Create Armature -> Bones! Magic! enter image description here

Here, sometimes you need to Clear Parent for the Bones.

  1. Next, we simply pipe in the animation data into the Pose Bone, frame by frame using Animation Nodes or Sverchok. Here is Sverchok way:

enter image description here

So.... that's pretty much it the basic idea. enter image description here

$\endgroup$
0
$\begingroup$

You're (probably) talking about a Scripted Rig. Now that you know the term, your research will become a lot easier ;-)

Essentially, it's a script that builds a rig, piece by piece. Many are complicated, most are VERY complicated... which is why they're scripted instead of built and modified by hand. In the case of Blender, this will be written in Python, but there should be a wealth of resources out there about building scripted rigs, especially with Python.

It's common to use scripted rigs because it's often just easier to modify a line of code to add a bone between two others, than it is to manually break them apart, create the bone, and put them back together. In your case, you want to create a rig based on some slightly different rules. Therefore, definitely look into scripted rigs, but know that their goals are likely different from yours.

$\endgroup$
  • $\begingroup$ Do you know of any examples that might have a similar application to mine? Or any wiki resources? I'm guessing you're talking about things like Rigify, but there doesn't seem to be anything coming up in specific about "Scripted Rigs". $\endgroup$ – John Sullivan Aug 10 '17 at 19:20
  • $\begingroup$ ...and as I went to look for just such a thing, I'm surprised at how few there are. You're right, Rigify is a (very sophisticated) scripted rig. I'm talking about something a great deal simpler, though I'm not able to find anything in the way of examples. $\endgroup$ – Matt Aug 10 '17 at 19:23
  • $\begingroup$ You could likely build the rig (relatively) easily with Python, but I don't know that animating it programmatically would be possible. That's an interesting idea, though... $\endgroup$ – Matt Aug 10 '17 at 19:25
0
$\begingroup$

Just an idea - if your points can be arranged in some meaningfull hierarchy, then you can try to create simple rig based on edges, formed with your points. This can be done with "Skin modifier" (programmatically or by hand)

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.