PDA

View Full Version : Blake - my new Maya rig on Highend3D


baskin
03-03-2009, 01:35 AM
Hi everyone-

Just wanted to mention that I've posted a new rig on Highend3D.

http://www.3dcentral.com/blake/blake_image2.jpg

Here are the features:

Rig features:
* Multiple appearance options and clothing accessories
* Stretchy IK back with advanced twist controls
* Stretchy arms and legs with bendy elbows/knees
* FK/IK switching with FK/IK Matching for arms and legs
* Space Switching for arms and legs
* Clavicle controls
* Elbow and knee pole vector controls
* Full Finger Controls
* Multiple foot pivots
* Breath control
* Ear controls
* Stretchable head and neck
* Scalable from the Super Mover
* Full Osipa style facial rig

http://www.highend3d.com/maya/downloads … -5644.html (http://www.highend3d.com/maya/downloads/character_rigs/Blake-5644.html)

I'd love to hear your feedback.

Best,
Jason

blackseraphim
03-03-2009, 03:22 AM
veeerrrryyyy nice! i love your IK-FK switching!

baskin
03-04-2009, 12:02 AM
Thanks for the kind words, blackseraphim!

blackseraphim
03-04-2009, 12:50 AM
also the space switching is cool. i learned a lot from your latest rig and thanks for sharing your rig.

blurgh
03-05-2009, 03:12 AM
wow, thats great! nice work

Leffler
03-06-2009, 12:08 AM
Really good work, I like it

How does your setup for "sticky lips" work technically? Would be cool to hear

// Otto

baskin
03-06-2009, 05:40 AM
Thanks for the kind words, everyone. There are a lot of really sophisticated sticky lip solutions out there, but mine was super low tech - just a blend shape for the mouth when it is open but the lips are sealed. When the sealed lips attribute is activated, the standard open mouth blend shape is set to 0, and the sealed lips blend shape is used instead. Definitely pretty limited, but it seemed to work okay for this character.

Best,
Jason

baskin
03-06-2009, 09:00 PM
Also wanted to mention that version 1.0 of Blake had some issues where various attributes of the render globals were locked up. This is fixed in version 1.1 (available for download on Highend3D). Or, you can download this simple MEL script and drop it onto your scene, and it should correct the problem.

http://www.3dcentral.com/blake/unlockGlobals.mel

I've also improved skin weighting for the fingers and ears in this release.

Sorry for any inconvenience.

Jason

Kremers
03-06-2009, 10:29 PM
wow very nice rig Jason, thank you for sharing it with us!

Sascha

giordi
03-14-2009, 09:29 PM
too nice rig! tx

DanHaffner
03-18-2009, 06:43 AM
I plan to use your rig to learn how to do some rigging tricks, such as the IK/FK matching, he found this video on youtube and sent it to me, but I already knew about the rig.

Here's a link of Jason showing off his amazing rig:

http://www.youtube.com/watch?v=nIH2hw6zxpk

gonzalimator
03-18-2009, 08:14 AM
EDIT: I wasn't keying everything properly... never mind.

Thanks Jason, another fun rig!

I plan to use your new rig in my next personal project and I was wondering about the space switching.
MISTAKE STARTS HERE When I was experimenting with Blake, I noticed that after I set keys and changed the parents, set keys etc. I found that when I scrubbed the timeline the parent switching didn't update. I had to manually click on the frame of the parent change to make the rig update itself, but then the same problem existed as I scrubbed again. I figure it has to do with the scriptJob not getting triggered during playback or scrubbing. Any thoughts? END MISTAKE


Marcos

DanHaffner
03-18-2009, 01:49 PM
Bah, you edited yours right after I posted, lol.

animatabull
03-18-2009, 05:11 PM
Having fun with it so far! I noticed a problem that when you move the cog up and down the tie seems to stretch weirdly... though this was after I'd played around with it for a bit, let me start a fresh scene with him!

gonzalimator
03-19-2009, 07:21 AM
Wow, I must have been very tired when I edited my last post. I was second guessing my memory and tested the rig again. I only checked the FK IK matching and not the space switching.

I tried it again, this time keying the parent attribute before and after the switch and found that the space switching is indeed giving me a problem. When I scrub or playblast the scene, the parent doesn't update properly. And like I suggested before I think it's because scriptJobs don't update during playback. Am I keying things incorrectly? DanHaffner? Anyone else experience this?

M

blackseraphim
03-19-2009, 09:14 AM
i think you didn't key it correctly.
the in-between of the keys tend to pop-up because you should have set key a frame before the switching. for example, in frame 1 you want it to follow the shoulders, and in frame 10 you want it to be locked, so the solution is copy the key on frame 10 (frame with lock) paste it on frame 9 and set the "parent To" on shoulder. set key. i think it will work the way you want it.
i think the rule for space switching is key Frame the parent to 1 frame before the desired "parent" so that it will not pop up. if you will notice when you switch the parent attr from one to another, the translate and rotate differs because (in my opinion) this setup relies on the world space values so that it will be a seamless space switch :D .

try it and it should do the trick.

Peter

gonzalimator
03-19-2009, 11:37 AM
I've keyed it correctly. Have you tried the Blake rig?

I'm pretty sure it's the scriptJob not triggering when you scrub the timeline or playblast.

Here's a video of the problem:

http://www.youtube.com/watch?v=ZTDZDM1soNE

The parent for the left arm is keyed to "supermover" on frame 1 and 8. On frame 9 it is keyed to "head". On frame 19 the parent is keyed to "head", and on frame 20 it's keyed to "supermover".

On the left side the playblast created from when I had the cursor on frame 24. On the right side is the exact same scene but playblasted after I clicked on frame 9 (which triggered the scriptJob and changed the parent to head and matched the position). Notice how the arm doesn't get parented to the head at frame 9 (on the left) and then is ONLY connected to the head on the right?

The scriptJob for the parenting match is not triggering during scrubbing of the timeline or playblasting. It will only update when the parent attribute is changed, but not during playback.

Is anyone else experiencing this?

baskin
03-21-2009, 02:37 AM
Hi everyone-

Thanks again for all the great comments. I'll most likely continue to modify and improve this character in the coming months, and will try to address the various requests I've received soon. Gonzalimator, you are correct that version 1.1 and earlier of Blake does not support animated space switching due to issues I've been having getting my scriptJobs to fire.

But I think I have found a work around in my latest revision (version 1.2). If you have a moment, would you mind testing this out before I post the update to Highend3D.

http://www.3dcentral.com/blake/blake_v1.2.zip

Any additional comments would be very welcome.

Thanks in advance,
Jason

DanHaffner
03-21-2009, 03:26 AM
You had mentioned that without the script file or script job the ik/fk matching won't work, but in the zip filed I got from highend it just has a scene file, is the script job in the scene file or am I missing it?

That was the main reason I downloaded the file so I could rip apart the script and see how you did it, since I am struggling with that part of my rig.

baskin
03-21-2009, 04:47 AM
Hi Dan-

Yes, the scriptJob is already part of the file. To check it out, just go to Window>Animation Editors>Expression Editor and select "By Script Node Name" in the Select Filter. I've also pasted an excerpt below (dealing only with the left arm).

Space Switching is pretty easy. All you do is assign multiple parent constraints to the transform node above your IK Control. Then, you set all of the constraint weights to zero except for the desired "parent" object which is set to 1. The only real trick is that before you switch constraint weights, you query the world space position of your Control (using the xform command), and store the translation and rotation values in variables. Then, modify constraint weight values (establishing a new "parent"), and use the move and rotate commands to move the Control into the correct position and prevent a position shift.

FK/IK Matching is handled by grabbing the translate and rotate values of dummy objects, and feeding them into the inactive controls. Tim Oberlander has a really nice little tutorial detailing the workflow on his website. You can check it out here:

http://timoberlander.blogspot.com/2008/07/tutorial-fkik-matching.html

Hope that helps,
Jason


// DECLARING VARIABLES
// RENAME THIS VARIABLE WHEN IMPORTING OR REFERENCING
global string $prefixName = "";
global string $characterName;
$characterName = "blake_";
global string $fullName;
$fullName = $prefixName + $characterName;



// LEFT ARM FK IK MATCH SECTION
proc LArmFKIK ()
{
global string $fullName;

$q = `getAttr ($fullName+"L_arm_ikFK_switch.FK_IK_Match")`;
if ($q == 1)
{
setAttr ($fullName+"L_arm_ikFK_switch.FK_IK") 0;
float $L_ShoulderRX = `getAttr ($fullName+"L_IKBicep.rx")`;
float $L_ShoulderRY = `getAttr ($fullName+"L_IKBicep.ry")`;
float $L_ShoulderRZ = `getAttr ($fullName+"L_IKBicep.rz")`;
setAttr ($fullName+"L_FKBicepControl.rx") $L_ShoulderRX;
setAttr ($fullName+"L_FKBicepControl.ry") $L_ShoulderRY;
setAttr ($fullName+"L_FKBicepControl.rz") $L_ShoulderRZ;
float $L_ElbowRY = `getAttr ($fullName+"L_IKElbow.ry")`;
setAttr ($fullName+"L_FKElbowControl.ry") $L_ElbowRY;
float $L_WristRX = `getAttr ($fullName+"L_IKWrist.rx")`;
float $L_WristRY = `getAttr ($fullName+"L_IKWrist.ry")`;
float $L_WristRZ = `getAttr ($fullName+"L_IKWrist.rz")`;
setAttr ($fullName+"L_FKWristControl.rx") $L_WristRX;
setAttr ($fullName+"L_FKWristControl.ry") $L_WristRY;
setAttr ($fullName+"L_FKWristControl.rz") $L_WristRZ;
print "Left arm FK controls moved to match IK controls";
}

else if ($q == 2)
{
setAttr ($fullName+"L_arm_ikFK_switch.FK_IK") 1;
$posIK = `xform -q -ws -rp ($fullName+"L_hand_dummy")`;
$rotIK = `xform -q -ws -ro ($fullName+"L_hand_dummy")`;
$EposIK = `xform -q -ws -rp ($fullName+"L_elbow_dummy")`;
move -rpr $posIK[0] $posIK[1] $posIK[2] ($fullName+"L_HandControl");
rotate -a -ws $rotIK[0] $rotIK[1] $rotIK[2] ($fullName+"L_HandControl");
move -rpr $EposIK[0] $EposIK[1] $EposIK[2] ($fullName+"L_ElbowControl");
print "Left arm IK controls moved to match FK controls";
}
}
scriptJob -ac ($fullName+"L_arm_ikFK_switch.FK_IK_Match") LArmFKIK;




// LEFT HAND SPACE SWITCH
proc LArmSpace ()
{
global string $fullName;
global string $characterName;
$q = `getAttr ($fullName+"L_arm_ikFK_switch.parent")`;
if ($q == 0)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 1;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.head") 0;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 0;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 0;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to super mover";
}
else if ($q == 1)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 0;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 1;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.head") 0;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 0;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 0;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to lower back";
}
else if ($q == 2)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 0;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 1;
setAttr ($fullName+"L_arm_ikFK_switch.head") 0;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 0;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 0;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to upper back";
}
else if ($q == 3)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 0;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.head") 1;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 0;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 0;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to head";
}
else if ($q == 4)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 0;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.head") 0;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 1;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 0;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to right hand";
}
else if ($q == 5)
{
$pos = `xform -q -ws -rp ($fullName+"L_HandControl")`;
$rot = `xform -q -ws -ro ($fullName+"L_HandControl")`;
$vectorPos = `xform -q -ws -rp ($fullName+"L_ElbowControl")`;

setAttr ($fullName+"L_arm_ikFK_switch.superMover") 0;
setAttr ($fullName+"L_arm_ikFK_switch.lowerBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.upperBack") 0;
setAttr ($fullName+"L_arm_ikFK_switch.head") 0;
setAttr ($fullName+"L_arm_ikFK_switch.rightHand") 0;
setAttr ($fullName+"L_arm_ikFK_switch.leftLeg") 1;

move -rpr $pos[0] $pos[1] $pos[2] ($fullName+"L_HandControl");
rotate -a -ws $rot[0] $rot[1] $rot[2] ($fullName+"L_HandControl");
move -rpr $vectorPos[0] $vectorPos[1] $vectorPos[2] ($fullName+"L_ElbowControl");
print "Left hand parent switched to left hip";
}
}
scriptJob -ac ($fullName+"L_arm_ikFK_switch.parent") LArmSpace;

baskin
03-21-2009, 04:54 AM
Oh yeah - one thing I neglected to mention about space switching. Originally I was setting the constraint weight value directly from my scriptJob. But while testing the rig, I and others discovered that the script jobs don't seem to fire when the animation is playing at normal speed. To get around this, I added some custom attributes to my FKIK controllers, which are connected to the parent constraint weights through the connection editor. The attributes are keyable, but hidden so that the animator doesn't get too confused about what needs to be keyed to switch parents. The advantage is that when the animator keyframes a parent change from the FKIK controller, the custom attributes are also keyed automatically, and those values are fed directly into the parent constraint. I haven't had a chance to test this thoroughly, but it seems to correct the problem relating to scriptJob's not updating properly. If anyone knows of a better or more elegant solution, I would love to hear your suggestions.

Hopefully that mostly makes sense.

Best,
Jason

gonzalimator
03-21-2009, 06:37 AM
Hey Jason,

You know, I was just learning about this problem because of what I was experiencing with Blake. I decided to attempt a solution on a prop I needed for my scenario. I wrote about it here (http://forums.cgsociety.org/showthread.php?f=89&t=743020). The prop is a toy windmill and the windmill blades are going to separate at one part of my sequence. I wanted to attempt the space switch match just as a learning tool (because I would normally constrain something like this to a locator in a scene).

I liked the convenience of the attribute in the channel box triggering the match. I got it working so that when I switch the "Parent" attribute on the blades control the space switch match triggers, the space switch group gets a key on the current frame as well as the previous frame (to preserve the previous parent state) and the blades control itself also gets keyed. The only drawback to this setup is that if I decide while animating that I need to change the timing of parent switch I have to remember to grab both the blades control and the space switch group above it and adjust them at the same time. In order to avoid the scriptJob needing to trigger during playback I have it trigger only when I change a non-keyable attribute. Since the space switch group is getting keyed the space switching occurs during scrubbing and playblasting. Check it out if you like.

http://www.gonzalimation.com/misc/windmill_014_withWorkingScriptJob.zip

One thing about scriptJobs, everyone is telling me not to use them. I had a horrible time debugging my script because I didn't realize that old versions were always running in the background. I started killing the jobs as I fixed things, but one thing that helps is to add the -killWithScene before the -ac in the scriptJob command. That way the job gets killed if you open another scene without closing Maya.

I'll check Blake out tonight let you know how it goes. I'm not sure if anyone mentioned this already, but as for myself, I like the FK arms to have the ability to be orient constrained to the world. I hate counter-animating things like this and usually add this ability to rigs before I animate with them. I just create a duplicate of the shoulder control, put it under a null that matches the position of the original control, then point constrain the null to the original shoulder control then orient constrain the original shoulder control to the new duplicate shoulder control. Incestuous but effective. Now I can shrug the shoulders and keep my FK arm animation. I couldn't do this on your rig (cycle error), I had to point constrain the shoulder nulls to the clavicle control. I also added a head orient constraint (same reasons, no counter-animating).

Thanks again, I'll help however I can.

Marcos

DanHaffner
03-21-2009, 06:23 PM
Thanks jason for the help, as you can see here:

http://forums.cgsociety.org/showthread.php?f=54&t=743049

I have tried all kinds of different ways of doing the switching, but due to my hectic schedule with classes I am still working on getting it resolved.

baskin
03-21-2009, 07:12 PM
Hi Marcos-

Great post - thanks for all the input. Yep, I had also considered automatically setting keyframes when the parent is switched, but typically I try to avoid auto-key work flows because I always like to experiment with different options and poses before I drop in keys. Other animators may really like it, though, so it is certainly worth considering.

I have also heard the general suggestion of avoiding scriptJobs for all of the reasons you have described. Certainly this advice has merit for more elaborate characters used in large scale productions. But I really wanted to find a way for beginning animators to access some of this more advanced functionality in my rigs without having to install a bunch of mel scripts or shelves. Right now, I'm pretty happy with the results, but I haven't worked too rigorously with this character yet.

I like your idea of orient constraining the head and FK arms to the world - a few other people have complained about this as well, so I'll probably try to implement something in the next release.

I have tested the latest version of the Blake character (v 1.2) a bit more, though, and the new space switching approach seems stable, and appears to work properly during playback, so I have posted it up on Highend3D. But please don't hesitate to post or email if you discover any problems or have any additional suggestions.

Thanks again,
Jason

gonzalimator
03-21-2009, 11:50 PM
Nice job! It's seems to work very well now. Now that the constraint weights are getting controlled by something else there aren't any playback problems! (Is it the "parent" value under the Parent enum? I didn't know you could hide an enum value like that! Very cool.) Unlike my solution there's no need to grab more than the current control for editing the animation. I like it!

The only issue I came across was that after keying a parent switch I found that you can Undo it but not Redo it. I'm guessing it's more scriptJob comedy.

Marcos

baskin
03-22-2009, 02:12 AM
Thanks, Marcos!

Actually, the "parent" attribute on my FKIK controller is triggering a script job that sets a series of hidden (but keyable) float attributes (also on the FKIK controller) - one for each constraint. Those hidden attributes are connected directly to the weight values of my parent constraint nodes. Kinda clumsy, but I haven't been able to come up with anything simpler.

I've also noticed unpredictable undo/redo issues with both scriptJobs and expressions. Not really sure what the rule is on that...

Anyway, thanks again for the input,
Jason

aaibel
10-30-2009, 05:06 PM
I have just been trying out Jason's brilliant Blake rig. I am using it to learn more about space switching as I am currently working on a way of making a series of scripts to help with the rigging process.
I am not sure if I am using the space switching feature properly as the rig does not update when I play the animation...however I know that Jason said earlier that he fixed exactly that problem by using extra hidden attributes that now force the scriptJob to update. So maybe I am doing something wrong with my key setting? I am currently having the same problem as mentioned before by gonzalimator I think, who posted a video of it on the 19th of March. Am I just missing something very very simple here, being a bit new to it?? I do have the version 1.2 as far as I know.

I would appreciate any help anyone can give me.
Thanks in advance,
Angelika

CGTalk Moderation
10-30-2009, 05:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.