So - after all that fuss I made a little note late at night - so I wouldn't forget.
Mocap drives (p) to locators
Locators drive (p) IK handle and Pole vector
Locators drive (p) Control Rig (curves) upper groups
Bake IK group
Bake Control group
Controls constrained to IK
Controls constrained to IK Rig
Ik Rig Constrained to Skin Rig
All rigs must be in the same physical space - no offsetting rigs.
Layer separate rigs and hide.
-----------------------------------
Can build all.
later..
Import mocap to rig scene.
Drive locators with rig.
Script made to bake IK group
Script made to bake Control Rig
voila!
[end of notes]
What this does is sandwich the Control Rig (that drives the IK Rig and IK controls) between two baked rigs (the IK controls and the Control Group).
[trying to explain] This animates the group of controls separately to the mocap - but they imitate the same movements. Within that animated group sits the real controls that pull on the IK rig - which is driven. Meaning that I can key IK changes without disturbing the mocap data.
So with this I plan to build a rig for a character that has the the same bone position/count etc as the mocap rig. This can be translated to fit the character - and will simply mean that retargetting will be much smoother.
I'll even be building ALL of the dependencies into the rig. The only 'piece of the puzzle' that would need adding will be the mocap rig and the baking of the IK and control groups.
What I've done is researched the what the mocap rig is named as when more rigs are present (what its constant namespace is). It stays the same as a BVH - out of IpiSoft or MotionBuilder.
So based on that I've written a small repeat script as a shelf button (nothing fancy AT ALL) that does two things;
1. It matches the correct locators to the joints on the mocap rig and allows itself to be driven.
2. Double clicking the shelf button will both create the locators (all with the correct names) and be driven by the mocap rig.
The next step will be an even simpler script that will select the IK controllers and the Control Rig groups and bake them for the entire timeline.
This is so simple that I'm leaving it until I actually get around to making a rig FOR a character - it's been trialled manually - so I see no point of automating it now - as the start rigs will have to be translated into place of the current character.
What I also plan to do is make another layer of controls that directly affect the motion capture data - just in case it needs manual (and destructive) editing. (My main reason for this was to zero some of the movement from the feet in the Y axis - to keep the feet from jumping and to ground them more. This coupled with the extra IK is really strong.)
In terms of long-term building, I'll only have to build two rigs (roughly), as I only have two character types in the 3rd year project. I'll have many variants of one - but they will essentially have the same polygon make-up.
I feel really proud of this rig setup - it really was quite a headspin getting it working.
No comments:
Post a Comment