Toon Character Motion Capture Rig Set Up Help?!

   15054   9   5
User Avatar
Member
2 posts
Joined: March 2009
Offline
Hey guys,

I have been trying to import motion capture data into Houdini for quite a while now and am having difficulties.

I can get the bvh data in as a motion capture skeleton through the .cmd file, and it moves around, however getting it onto the Toon Character motion capture rig has been difficult. I have even used the digital asset tool that goes with it to set up the bone stucture, but I keep getting errors. Is there a required structure needed to do this?

Could someone please describe to me a step by step process on how to apply a skeleton with motion capture applied to it, onto a character, like the toon character, and the requirments needed?! As I have not found anything else on the internet that describes Houdini and Motion Capture well. Any help would be greatly appreciated, especially since this depends on our decision to go entirely Houdini on an upcoming production. Thanks Guys!

Sincerely,

falcon22
User Avatar
Member
1549 posts
Joined: Nov. 2006
Offline
Unfortunately the steps to apply simple mocap data to the Autorigs aren't documented at all. Here's a quick start type guide I just put together.

Mocap steps for Toon character:

This description uses the dance.bclip file.

Quick steps to get going:

- Source in skeleton “source dance.cmd”

- Collapse nodes into subnet: Select skeletal structure and shift+c

- Create toon character

- Scale skeleton subnet to appropriate scale: match cog vertical size (0.442)

- Toon character > Animation Data > Generate Mocap Rig

- Select any bone of the skeleton in the viewer and Press enter

- Confusing part: Mapping all the parts on the toon character to the skeletal structure. You interactively pick what maps to what bone in the viewport. You can map multiple parts of the rig to the same bone since for example the toon guy has 5 parts to his spine and the dancing guy only has 3. Once done you can save the settings for reuse on similar names skeletons. Load the attached toon_bindings.py file for example.

- Press accept on the dialog node. The toon character is now following the the skeleton but slowly. Increase the sample rate on the mocap rig to the same rate as your animation is in (120). If the character is floating off the ground a lot you can modify the root scale offset to bring him up/down a bit.

The animation is now done using chop() expressions. Inspecting the Toon Character you can see that his spine and arms are referencing the file chop that is reading in all the animation data. To convert to keyframes, on the Mocap rig press Save and Apply keyframes. This converts all the chop channels to raw keyframes. Then applies them to the Toon rig. Refitting is also done to try and smooth out/reduce the number of keys if possible. This is controlled by the Refit Tolerance. This process to write out all the key data is SLOW. It can take a couple minutes depending on the amount of channels and length of animation. Reading them back in and refitting is pretty fast.

Once it is complete it is now possible to tweak your animation and fix up any problems.

If you go back to the Mocap rig, you can hit Apply Animation and it will reapply chops expressions to your animation rig. When the chops expressions are used it is possible to simple change the source animation by changing the file to another bclip file that is using the sameskeletal structure. You can then write out these frames as well or do whatever.

There are also parameters on the Toon character/animation rig that allow you to save/load the raw keyframes as well.

Things to note:

The tools do minimal scaling and modification to the original data. The source skeleton is modified to the proportions of the target animation rig so if the proportions are very different, such as the very short collar bones in the Toon character, your animation will look different and you will probably have some crashing with certain things. You can fix this up afterwards though.

For best initial results, it helps if your character and mocap skeletons are similar proportionally. There is a way to match/position the an Autorig from a mocap skeleton that can make things easier.

Hope that helps. Hopefully this will all make it into the docs on day.

Attachments:
mocap_quickstart.zip (2.0 MB)

Graham Thompson, Pipeline Supervisor @ Digital Domain
User Avatar
Member
2 posts
Joined: March 2009
Offline
Hey graham,

Thanks so much for replieing to me! I am so happy that you did, I got the rig working! I really appreciate the help and the detailed response. I am sure we will now be able to ditch the Autodesk ship and now work in Houdini all the way! That was the one major drag and that helped solve the problem.

Thanks again for the help!

Sincerely,

Zach
User Avatar
Member
83 posts
Joined: Nov. 2007
Offline
Thanks a lot Graham, been struggling with this for a while now. Hope it get's into the doc's soon

regards

Erik
User Avatar
Member
9 posts
Joined:
Offline
Hi graham!

It is very detailed description, out of one point.
I dont understand, how can I make the mapping between the mocap and autorig bones.

Because, If I creating the Mocap Rig, I have the possibility to select only one bone, then AutoRig script makes the MocapRig.

Wich tool, or mode I need to select in order to map bones?

Thank you in advance!
User Avatar
Member
345 posts
Joined:
Offline
Great stuff, thanks for the file Graham. I have a one problem though. Everything goes well until picking the bones and accepting the selection. Then Houdini throws a bunch of errors.

Error running callback:
'module' object has no attribute ‘mocapobjects’
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “opdefObject/mocap_dialog_node?PythonModule”, line 36, in accept
AttributeError: ‘module’ object has no attribute ‘mocapobjects’

Any idea what is wrong here.

Thanks.
Kuba
User Avatar
Member
295 posts
Joined: Oct. 2008
Offline
Kuba,

Did you ever figure this out? I've got a biped rig that I was hoping to try this out on tonight.
Houdini Models [learning3dfromscratch.blogspot.com]
User Avatar
Member
295 posts
Joined: Oct. 2008
Offline
OK I just tried this, and the error is in

houdini/scripts/python\autorig\mocaprigutils.py

line 180

avglength = distance / len(chain)

It would appear that the “chain” array is empty, so we're getting a divide by zero error.

Any idea how to fix this?

Running 64 bit Houdini on Windows Vista 64, Houdini version 10.0.554.
Houdini Models [learning3dfromscratch.blogspot.com]
User Avatar
Member
54 posts
Joined: Feb. 2009
Offline
Hey guys, thanks for the very informative post. I've managed to follow the steps and get motion capture data working with the Toon Character, however I'm running into problems when trying to get it working with the Autorig.

I've tried this on Linux Houdini 10.0.430 and 10.0.528 and I'm having the same issue.

I have linked the bones to the mocap data using the Mocap Dialog Node and resampled the Sample rate on the Biped Mocap Rig to 120, this seems to work fine and the Mocap Rig Biped elements all seem to follow the mocap data. However when I try to click ‘Save and Apply Keyframes’ I get the Houdini error's:

“Error: No animated channels found”

and

“Error: Unable to find source animation file”.



There is no error in the terminal.

When I press the ‘Apply Animation’ button in the same node I get the following error in the terminal…


Error running callback:
'NoneType' object has no attribute ‘setExpression’
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “opdefObject/biped_mocap_rig?PythonModule”, line 11, in applyChops
File “autorig/mocaprigutils.py”, line 664, in setChopChannels
AttributeError: ‘NoneType’ object has no attribute ‘setExpression’


I've attached the file in the hope that someone will be able to help.

Many thanks,
Gary

Attachments:
mocapissues.zip (648.7 KB)

User Avatar
Member
54 posts
Joined: Feb. 2009
Offline
I've been running through the setup again to make sure I was doing it correctly and I noticed another error that is generated in the terminal when clicking the “accept” in the Mocap Dialog Node:

Error running callback:
'NoneType' object has no attribute ‘parent’
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “opdefObject/mocap_dialog_node?PythonModule”, line 48, in accept
File “autorig/mocaprigutils.py”, line 1099, in doMocapModify
File “autorig/mocaprigutils.py”, line 663, in setChopChannels
AttributeError: ‘NoneType’ object has no attribute ‘parent’


It looks like the rig is not parenting to the skin for some reason.
  • Quick Links