Linking Control Empties To Rigs?

Hi All,

I am playing around with BVH again…

This time I thought I would try the approach of just using empties to animate a character. But I seem to run into the same flaw in with every character.

My workflow is to import the BVH as empties.
Ok, now I have a dancing skeleton made up of empties.
I have heard and seen tutorials where you can link the empties to control bones on a rig and have the BVH take over animation. This is ideal, but I can not get it to work.

What happens is as soon as I parent the hip empty from the BVH to the armature, the whole rig is affected by a single empty (ScaleRotLoc). Because these control bones are part of the armature (which seems to be typical rig setup), there is no way to use this technique.

Am I missing something here, is there a way to link empties to control bones and drive a rig with BVH animation?

I have looked over the few posted tutorials on this, but they are years old and don’t work with new rig setups.

Anyone try this technqiue with the George Rig or the Tielman’s Ink guy?

I think you need to add an IK solver to the bone that you want to track the empty. I’m interested in this subject too, it seems you cannot parent a bone to an empty, or copy location…curious.

Attachments

Ik-Empty.blend (136 KB)

Do you mean make the bone a child of an Empty? Or add a Constraint to the bone with an Empty as the target OB:? Don’t know about the parenting part, haven’t tried that, but you can certainly use a Copy Location Constraint on a bone and use an Empty as its Target, that’s how I set up the leg IK for my Katrice model & rig.

Here’s the basic setup:

Shinbone has an IK Constraint with a “free-floating” (unconnected) bone called IKActivator as its Target. IKActivator has a Copy Location Constraint with an Empty (IKHandle) as its Target. When IKHandle is translated, the IKActivator moves with it and the IK chain flexes at the knee.

Using an Empty that only translates is handy (or “footy”?) because then I can rotate it in Normal space and position the Pivot handles in convenient ways for re-positioning during keyframing.

I have a similar setup for the arms but rarely use it as the DOF in the shoulder joint makes it a bit unstable. Mostly I use FK for the arms.

Thanks Chipmasque, that worked. I added a CopyLocation constraint to each of the control bones and typed in the name of the companion empties for the target. I am wondering, should I add another set of constraints just for rotation? The rig seems to work fine without it. At least in my dancing BVH test file.

@NOOBIE: I tried the IK constraint, and it did not work as well as Chipmasque suggestion. The IK solver also has very poor performance and brought the BLEND file to a grinding halt. So if you are interested, try his suggestion.

Attachments



Not sure what kind of rotation you’re talking about here. I’m not at all familiar with BVH data and what it provides as “marching orders” for driven rigs. I guess whether or not you need other constraints would depend on the nature of that data.

If (and this is complete conjecture) the BVH data is only translations, then you won’t need any rotational constraints because any rotation of the figure is probably “built in” to the BVH data – if the figure rotates, the BVH points translate as needed to reflect the rotation. If you want to add some rotation to the entire figure on top of the BVH control, I think you could probably do that by keyframing the Armature as an Object, which is how I handle the jumps and spins the Katrice rig is going through. But don’t take this as gospel because like I said, I’m not familiar with BVH in detail.

I went ahead and added the CopyRotation constraint after the CopyLocation constraint in the modifier stack. There certainly is rotational information in the BVH empties I was using. It seemed to produce the most effect on the terminating bones, like feet, hands, head and waist even though it was in the middle of the armature.

So I think if you are going to use this technique, go ahead and add CopyRotation as well, at least to the end points of your skeleton.

A script is forming, I feel it in the winds…:spin:

A short video is here:
http://www.vimeo.com/7074343

Attachments


i like that, and with me being a modder, we at our site have almost cracked The Movies game animation files and what we have at the moment is just empties, which makes me think they are set up like a bvh, so a tutorial on how you did this atom would come in very very useful

The BVH Connect script version 0.1 is posted for download. The script is in the BLEND file.

This script will take a list of empties and a list of bones and connect them via CopyLocation and CopyRotation constraints. This script performs all the steps I did manually in the Blender interface to connect the empties to the rig.

Attachments


atom dude you rock…

gotta get our resident coder to check it out now, hope you dont mind if its included as part of another script.

Howdy

Interested in this too. I have made some progress on bvh using a proxy amature, created from the bvh and constrained to my models rigs. THe model is a cartoon character, he has a “ludwig” rig, and a rig constrained to the bvh. The proxy armature then works for all the bvh files.

Works well most of the time… but alas not all … and then there are the differing bvh formats …

cheers.

I have added a second character to the list of supported bone mappings.
http://www.malefico3d.org/blog-en/?page_id=81&preview=true

I think if we can put together a short list of rigs and a few of the popular bone naming techniques in BVH a fairly painless mix and match can occur.

Here is code for the Mayloyo rig. I have set up an IF/THEN series to pick an choose rigs by simply changing the variable n.


n = 1
apply_location_constraint = False
apply_rotation_constraint = False
if n == 0:
    #Name of empties from the ballet BVH.
    bvh_empties_list = []
    bvh_empties_list.append("Head")
    bvh_empties_list.append("Neck")
    bvh_empties_list.append("Chest")
    bvh_empties_list.append("RightCollar")
    bvh_empties_list.append("RightUpArm")
    bvh_empties_list.append("RightLowArm")
    bvh_empties_list.append("LeftCollar")
    bvh_empties_list.append("LeftUpArm")
    bvh_empties_list.append("LeftLowArm")
    bvh_empties_list.append("Hips")
    bvh_empties_list.append("RightUpLeg")
    bvh_empties_list.append("RightLowLeg")
    bvh_empties_list.append("RightFoot")
    bvh_empties_list.append("LeftUpLeg")
    bvh_empties_list.append("LeftLowLeg")
    bvh_empties_list.append("LeftFoot")

    #Name of bones from the MTI_stickman_rig.
    apply_location_constraint = True
    apply_rotation_constraint = True
    armature_name = "MTI_stickman_rig"
    character_bone_list = []
    character_bone_list.append("head")
    character_bone_list.append("chestIK")
    character_bone_list.append("spine_center")
    character_bone_list.append("shoulderIK.R")
    character_bone_list.append("elbowpole.R")
    character_bone_list.append("armIK.R")
    character_bone_list.append("shoulderIK.L")
    character_bone_list.append("elbowpole.L")
    character_bone_list.append("armIK.L")
    character_bone_list.append("upperbody")
    character_bone_list.append("hipIK.R")
    character_bone_list.append("kneepole.R")
    character_bone_list.append("legIK.R")
    character_bone_list.append("hipIK.L")
    character_bone_list.append("kneepole.L")
    character_bone_list.append("legIK.L")
if n ==1:
    #Name of empties from the ballet BVH.
    bvh_empties_list = []
    bvh_empties_list.append("Head")
    bvh_empties_list.append("Neck")
    bvh_empties_list.append("Chest")
    #bvh_empties_list.append("RightUpArm")
    bvh_empties_list.append("RightLowArm")
    bvh_empties_list.append("RightHand")
    #bvh_empties_list.append("LeftUpArm")
    bvh_empties_list.append("LeftLowArm")
    bvh_empties_list.append("LeftHand")
    bvh_empties_list.append("Hips")
    #bvh_empties_list.append("RightUpLeg")
    bvh_empties_list.append("RightLowLeg")
    bvh_empties_list.append("RightFoot")
    #bvh_empties_list.append("LeftUpLeg")
    bvh_empties_list.append("LeftLowLeg")
    bvh_empties_list.append("LeftFoot")
    
    #Name of bones from the Mayloyo rig.
    apply_location_constraint = True
    apply_rotation_constraint = True
    armature_name = "maloyo_rig"
    character_bone_list = []
    character_bone_list.append("head")
    character_bone_list.append("chest")
    character_bone_list.append("belly")
    #character_bone_list.append("biceps.R")
    character_bone_list.append("forearm.R")
    character_bone_list.append("wrist.R")
    #character_bone_list.append("biceps.L")
    character_bone_list.append("forearm.L")
    character_bone_list.append("wrist.L")
    character_bone_list.append("root")
    #character_bone_list.append("hipIK.R")
    character_bone_list.append("pole_knee.R")
    character_bone_list.append("foot.R")
    #character_bone_list.append("hipIK.L")
    character_bone_list.append("pole_knee.L")
    character_bone_list.append("foot.L")

This rig posed some problems and even the author claims there are some bugs in the rig. But the dang thing sure is cute.

I discovered that adding rotational constraint to the feet of this rig is a no-no. So I did some hand editing on the rig after running the script. There is some kind of bunching up in the shoulder area as well. I’m still not sure if it is the BVH data is not scaled correctly or the data is man-handling the rig in a brutish way that causes problem. It is still nice to see little Mayloyo dance.

Attachments


Hi Atom,

I have a similar problem even though I am getting my empties through MoCap postion maker data. However, I can’t manage to rig an armature to the dynamic marker positons :frowning:

Thanks a lot !