PDA

View Full Version : stretching bones (max)


Kris-Rusinek
12-28-2004, 01:47 AM
Need help on creating stretchy chierarchies on bones... is there any way to set up IK controllers there without using expressions? Any help and info... please. I'v tried to use mesh objects as bones and that worked pretty good, but that I couldn't assing a controller... grr... I'm tired of it. Please help!

Kris-Rusinek
12-29-2004, 02:27 AM
Still no reply..
Basilcly I need it for facial animation and limbs. I know how to stretch bones. It's easy. But I don't know how to setup the rig. Any comments? any help? Thanks a lot guys :)

clalan
12-29-2004, 01:02 PM
hey,

there are lots of ways to make a stretchy bone hierarchy, and using expressions, float scripts and parameter wiring makes it a lot easier. I don't know what you are looking for exactly, but here is a stretchy limb (arm) setup that uses only constraints. it might get kinda confusing, so I'll try to keep the naming as simple as possible:

1. create a line with 3 points, convert it to an editable spline and make the vertices 'smooth'. I'll use this spl_arm to control the bend in the limb (I named everything as if it was an arm)

2. create 3 point helpers for each vertex in the spline (hlpr_shoulder, hlpr_spline, hlpr_hand), align each vertex of the spline to his helper.

3. to make the spline follow the helpers I'll use a linked Xform modifier. add a 'SplineSelect' modifier to the spline and select the shoulder vertex. add a 'LinkedXForm' modifier, turn off 'Back Transform' under the parameters and pick the ControlObject (hlpr_shoulder). Do the same for the other vertices (go to your spline in the modifier stack, add SplineSelect, add LinkedXForm).

when you move the helper you'll see that the spline nicely follows, stretches and bends. most of the work is done already :)

4. now we'll add a elbow controller to control the bend and twist of the arm. I wanted to be able to stretch the arm from 3 points: the shoulder, the hand and the elbow. this way I can still give the arm a lot of curve when it's stretched out. I could directly link the hlpr_spline (middle of the spline) to a control object, but this would mean that moving the hand wouldn't affect the elbow at all, so a lot of work during animation to make everything look smooth. best thing to do is to create an attribute that can blend between fully manual and fully automated.

create a controller for the elbow (ctrl_elbow). position contrain hlpr_spline to hlpr_shoulder, hlpr_hand and ctrl_elbow. move those helpers and controllers around and see how the curve gets modified.

5. create another helper that will control the twist of the bones (hlpr_orient). position contrain it to both hlpr_shoulder and hlpr_hand (so that it will always be nicely inbetween those two). then add a look at constraint (looking at hlpr_hand, and up axis looking at ctrl_elbow). see how the helper twists when you move ctrl_elbow.

6. using hlpr_spline as our elbow point we would be able to push the elbow to extremes: long upperarm, very short forearm. I want to keep them about the same length. again, you can create an attribute to blend between the two.

create yet another helper that will become our real elbow (hlpr_elbow) and path constrain it to the spline. as I want it nicely in the middle I'll place it 50% along the path.

7. finally we are ready to add the bones. to make them stretch correctly, every bone needs a null. so create bone_upperarm with null_upperarm and bone_forearm with null_forearm. align bone_upperarm with hlpr_shoulder and link it to that same helper. position constrain null_upperarm to hlpr_elbow, the bone will stretch, but the orientation is still wrong. use a look-at constraint to point bone_upperarm towards hlpr_elbow. to keep the twist of the bone under our control, select hlpr_orient as the upnode for the look-at constraint.

now attach the forearm in a similar fashion: align and link to hlpr_elbow, position contraint the null to hlpr_hand, look-at constrain the bone to hlpr_hand with hlpr_orient as upnode.

8. now everything should work properly: moving hlpr_shoulder or hlpr_hand will cause the arm to stretch, moving ctrl_elbow change the bend and orientation of the arm.

to integrate this arm in your rig just link hlpr_shoulder to a clavicle bone and hlpr_hand to a hand controller. and done is done

...

some remarks:

- if you "overstraighten" the arm it will flip.
- if you want more bones to create a bendy arm, just add more helpers with path constraints.
- you can't create an s-shape arm (even if you had enough bones). but using a line with 4 vertices and some more helpers will fix that easily :)

maybe it's not exactly what you were looking for, but i'm sure you can use the same principles to create whatever you want.

-Alan

Kris-Rusinek
12-29-2004, 03:02 PM
Thanks a lot Alan... it sound very clean and logic... but I'm stuck in 4 on your step by step :)
When You say..."position contrain hlpr_spline to hlpr_shoulder" they jump on the same position. Is that the way it was supposed to be? Am I missing something? Thanks once again.

clalan
12-29-2004, 07:08 PM
at that moment hlpr_shoulder is the only position constrain target, so hlpr_spline jumps to this position. if you then constrain it to hlpr_hand and ctrl_elbow it will take on a position inbetween those three.

Kris-Rusinek
12-29-2004, 10:49 PM
This is absolutely amazing! I'm amazed! Now I need to dig deeper and deeper.. I wan to learn, to study rigging! So much can be done with just a bunch of good controlers...
Thank you so much calan. You are the chosen one! :)

PEN
12-30-2004, 03:52 PM
This is absolutely amazing! I'm amazed! Now I need to dig deeper and deeper.. I wan to learn, to study rigging! So much can be done with just a bunch of good controlers...
Thank you so much calan. You are the chosen one! :)
You might want to look into my DVD's:) I cover all this stuff.

Wahooney
01-18-2005, 01:47 PM
Hey Paul, when is your final DVD gonna ship? I'd like to order the whole lot in one go. Saves me having to wait between episodes ;P

PEN
01-18-2005, 02:13 PM
Hey Paul, when is your final DVD gonna ship? I'd like to order the whole lot in one go. Saves me having to wait between episodes ;P

I'm not sure at this point as I just started in on a feature film and time is short since every thing that I do on projects is very front end loaded. I might try to get to it next month as I would like to get it done before GDC where I will be giving two talks, one on rigging and one on scripting. Both are free and are being put on by Discreet.

marktsang
01-18-2005, 02:27 PM
I might try to get to it next month as I would like to get it done before GDC where I will be giving two talks, one on rigging and one on scripting. Both are free and are being put on by Discreet.

hi paul,
Do you know if Discreet archives these type of talks so people who cant go to the events can still benifit from them?

thanks
mark

CGTalk Moderation
01-20-2006, 07:00 AM
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.