View Full Version : Squashy Rigging !

04 April 2008, 11:36 AM
Hi all Riggers.
Im looking for a solution for squashy bones. I know the simple If..else Script for stretching but it just stretches the bones without making in thiny. Would you help me on this please??
or is there any link which focuses on this?
I really appreciate your help. :)

04 April 2008, 06:26 AM
you might want to check out jason osipa's stop staring book. It goes over creating cartoony rig.

04 April 2008, 05:33 PM
Hmm... if you are just talking about a simple expression to show stretch... Assuming you have a set up to control the Y-stretch (Y axis pointing down the bone), you can just set this expression for the x and z axis:

joint.scaleX = 1 / joint.scaleY;
joint.scaleZ = 1 / joint.scaleY;

If you are looking for a more complete example of how to make a stretchy chain for a full on character rig, let me know and I'll try and post a scene file.


04 April 2008, 07:49 PM
MikeRhone :bowdown: ... maaan you did a massive help. thanks so much, saved alot of time fore me. i have been wrestling with this thing about a month.
wish the best for you.

05 May 2008, 05:01 PM
Hi. Im back again with a new problem :hmm: .
i used a simple script for the arm stretch (not squash). it works fine when the hand helper goes far but when it is coming back my arm bones dont have the stretchy figure . i mean they are stretched but as the helper is coming back the arm is also bending.
here it is my playblast.
hope to hear from you again.

the playblast:
playblast.avi - 0.22MB (

the script :
if(distanceDimensionShape1.distance>= 15.14 ){

joint14.scaleX=distanceDimensionShape1.distance/15.14 ;
joint15.scaleX=distanceDimensionShape1.distance/15.14 ;

}else { joint14.scaleX=1 ;
joint15.scaleX=1 ;


05 May 2008, 07:53 PM
I always use utility nodes for everything if i can get away with it, the are always faster. I would connect the distance from the distanceDimentionShape node to a a mulitiplyDivide node. divide it by the length of the joints (add all the tx values, except the first joint). send that output to a colorIfTrue node, firstTerm. set the second term to 1.0. and GreaterThan. connect the output of the multipleDivide node to the colorIfTrue. and leave the Color if false at 1.0. now connect the output of the colorIfTrue node to the scaleX of the joints, except for the last one.

Thats what I do. if you want to know how to make it squash and stretch, get Jason Shleifer dvds!

05 May 2008, 10:10 PM
Hmm... well you are getting an unusual thing happening in your scene. Your expression looks like it should work, so the problem is likely on how you have your objects set up/parented. I wouldn't be able to tell you whats going on without actually looking at the scene myself, but make sure that:

-distance locator 1 is parented to joint 14
-distance locator 2 is parented to the IK handle
-The ik hand is constrained to to your control

As for the expression, in the interest of keeping things cleaner I would try this expression instead: (I love the clamp expression/node for things like this)

joint14.scaleX = clamp(1,1000, distanceDimensionShape1.distance/15.14);
joint15.scaleX = clamp(1,1000, distanceDimensionShape1.distance/15.14);

If you want to see a working version of this, here is a quick and dirty version of what I think you are trying to accomplish:

05 May 2008, 11:17 AM
thank you for replies.
unfortunately i cant open this maya file. dont know why?
here it is my scene : - 0.06MB (

MikeRhone>>> i have done all what you said but doesnt work . It works fine when i drag it by mouse but not when i animate it. :shrug:

05 May 2008, 07:50 PM
I saw the file and so far what I have found is that due to cycles in your setup things are getting messed up while animating and they are not evaluated properly. If you move the wrist control yourself manually it works fine, but while animating it will give you problems since maya will try to interpolate frame by frame and it wont know what you were trying in earlier frame. So cycle is messing up. I know there are better ways to do stretchy joints but still i would try to debug this to find the solution and to understand more.

And yeah cycle is generated because of the way locators are parented right now. Logically thinking actually everything is dependent in a cyclic manner. For example right now locator2 is parented under IKhandle which in turn is dependent of scale of joints and joints are dependent on location of locators. So that's a cycle there.

05 May 2008, 08:10 PM
Alright I found the problem. Cycle is mainly due to locator1 instead of locator2. Since it's parented under joint1 it's also receiving scale from that joint which I think is messing it up. (Though I think scale should not affect locators as such, not at least position). Also dont parent locator2 under IKhandle, it's messing up the calculations when you actually animate it. I can see that IKhandle lags in moving because of that.

But here is what you need to do. Do point contraint of locator1 on joint1. And then parent locator2 to nurbs control. This is working fine on my end. If this does not work for oyu let me know.

05 May 2008, 09:08 PM
theFlash has answered it correctly; Having the locator parented to the root joint (that is scaling) is causing this weird update issue. Also, the expression I posted above does not need to be in an if/else statement. The clamp part of the expression replaces the need for if/else.

Let us know if there are any further issues.


05 May 2008, 07:00 PM
wow...thanks so much it worked.
theflash>> thanks for your attention and your help.
MikeRhone>> thanks so much for spending time helping amatuers like me.
i am at the beggining of maya rig :) so there will be more and more to learn ( i will be back soon :wavey: )
wish the best for you guys.

05 May 2008, 07:51 PM
Thanks. I am glad I was helpful.

CGTalk Moderation
05 May 2008, 07:51 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.