Home Technical Talk

Quick rigging question

Hey guys,

Could anyone explain how to quickly set up an easily keyable squash deformer in Maya?

I'm just trying to add some S and S to a ball bouncing, but I can't get figure out how the squash deformer works.

I've looked in Maya's help, but I can't seem to click help links since installing 2012.

Thanks

EDIT:

Alternatively, if someone could explain how to set up a rig like this, that would be awesome too. The rig is great, but it uses a NURBS sphere, and if I want to use my own geometry, let's say I model a basketball, then I have no idea how to switch it out into the rig. In fact I don't even know if it's possible.

http://artofjoe.blogspot.com/2009/12/animation-rigs-ball-11-includes-tail.html?m=1

Replies

  • Wrath
    Options
    Offline / Send Message
    Wrath polycounter lvl 18
    I would set up a rig that's a heirarchy of 3 nodes. The root node will be for translation in the world. Then a child of that node will be used for orientation of your squash and stretch deformation. Finally your 'ball' object would be a child of that node, so that it's rotation could be animated independantly but still be affected by the squash and stretch deformation relative to its parent node.

    Something like that should work pretty well.

    If you haven't figured something out by then, I'll take a look at it later this evening. Right now, have to tote the kids off to see Kung-Fu Panda 2 (speaking of bouncing balls).
  • Tom Ellis
    Options
    Offline / Send Message
    Thanks Wrath. Unfortunately my rigging expertise are nowhere near at a point I could set something up based on those instructions.

    I understand what you mean, but I have no idea how to set it up.

    Enjoy Kung-Fu Panda, looking forward to seeing that when it comes out over here.

    EDIT:

    Ok I got something basic set up, just added a squash attribute to the ball and keyed it to the factor on the squash node.

    It works, but any rotation of the ball breaks it obviously and I have no idea to set it up the way you described so the squash node stays constant regardless of ball rotation.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    K going to throw this right at the start. But I have 0 rigging/messing with node experience. So tried doing what Wrath mentioned and think its what he said. Hopefully its correct XD

    Anywho, what I did is:

    1. Create a sphere. Poly or nurbs whatever suits ya :)
    2. Open up hypergraph. Gonna be easier to select stuff.
    3. Click your sphere and apply your squash deformer. (create deformer -> non linear -> squash)
    4. In your hypergraph, the squash node should pop up
    5. Click your sphere node in the hypergraph (pSphere1 etc) and middle mouse and drag to the squashHandle node in the hypergraph
    6. I changed the low and high bounds of the squash handle so its easier to see. Mine was at -2 and 2
    7. Create a Nurbs circle to be used as the controller for translation
    8. Scale and position to about middle of sphere or whenever you feel you want your controller to be. Freeze transform and delete history.
    9. Click your squashHandle node in hypergraph and middle mouse drag to nurbsCircle node.
    10. So nurbsCircle is your main node, the squash handle is the squash deformer and sphere is mesh. Now to lock and hide so easier to animate
    11. Click the main control (nurbs Circle) and shift click from rotate to ScaleZ and lock and hide selected (right click -> lock and hide selected)
    12. Don't know if there is a way to expose the controls of the squash to be like translate. Maybe someone can help with that though hopefully clicking the squash node in inputs isn't that bad.
    13. Click the pShere node in the hypergraph and lock and hide the translate (which is now being controlled by the main control, ie nurbs circle) and scale, unless you want it.

    There ya go. Hopefully explained everything and by some luck I got this right
  • Tom Ellis
    Options
    Offline / Send Message
    Nice one Haidda, that's a great breakdown.

    Can I add an attribute to the control curve and link it to the squash factor? Just makes it easier to change the squash without grabbing the transform handle every time, it also means I can constrain it to like -10/+10 or something.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Yeah trying to figure that out. I know you have to set driven key just no clue how I expose the inputs.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Ok got it. Easier than I expected.

    1. Click your main root control and go to Modify - > Add Attribute
    2. Put the long name to Factor
    3. For minimum put -10, max to 10 and default to 0
    4. A factor attribute should show up in the channel editor
    5. So now we need to link the factor on the main root to the factor in the squash node
    6. Click the main root control
    7. So go to Animate -> Set Driven Key - Set (Dont close this window)
    8. Click Load Driver
    9. Click the squashHandle in the hypergraph, and then go to graph -> input and output connections
    10. click Squash (or squash2,squash3 etc) in hypergraph
    11. Click Load Driven and it should show up in the set driven key window
    12. Make sure your factor is 0 on the squash.
    13. Now click factor on the driver and click factor on the drive and hit key. What is has done is set the neutral pose
    14. Click the main controller and expose the squash node under outputs.
    15. Change the factor on the main controller to -10 and then put in the factor you want for the squash. I set mine to -0.5 and hit key
    16. Now change the factor on the main controller to 10 and then put in the factor you want for the stretch. I set mine to 0.5 and hit key

    There ya go. An attribute on the main controller that drives the factor for squash and stretch.

    File for download
  • Tom Ellis
    Options
    Offline / Send Message
    Lol sorry man, shoulda said I can already set up driven keys, save you the effort ;p.

    That's great though, thanks a bunch for going through that!
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Tom Ellis wrote: »
    Lol sorry man, shoulda said I can already set up driven keys, save you the effort ;p.

    That's great though, thanks a bunch for going through that!

    haha no problem. I learned something on the way :)
  • Tom Ellis
    Options
    Offline / Send Message
    Ok I put something together, which seems to work pretty perfectly for what I want.

    After spending more time than I wanted to on this, I was finding the problem was that I wanted to keep the squash deformer at a constant 0 rotation while still being able to rotate the ball, but obviously the squash deformer needed to follow the translation of the ball.

    So after messing with various contraints and parenting, I think I got it.

    An experienced rigger or tech animator will probably look at this and think 'yeah that's easy' but my rigging knowledge sucks so if anyone could take a look and maybe see whether they could spot any potential problems or improvements that's be cool.

    http://dl.dropbox.com/u/4627207/Animation/BasketBallRig.mb

    EDIT: One problem I can't figure out is how to make the rig scaleable. If I add a new 'main control' and parent the lot to it, it scales everything but it breaks the relationships of the other controls.
  • Wrath
    Options
    Offline / Send Message
    Wrath polycounter lvl 18
    Wrath wrote: »
    I would set up a rig that's a heirarchy of 3 nodes. The root node will be for translation in the world. Then a child of that node will be used for orientation of your squash and stretch deformation. Finally your 'ball' object would be a child of that node, so that it's rotation could be animated independantly but still be affected by the squash and stretch deformation relative to its parent node.

    Something like that should work pretty well.

    If you haven't figured something out by then, I'll take a look at it later this evening. Right now, have to tote the kids off to see Kung-Fu Panda 2 (speaking of bouncing balls).

    I gave this a try in 3DS Max last night and with one small modification, it works great. I needed to add one more object into the chain so that the node that's doing all the squash and stretch can rotate around the center of the ball. Otherwise, it causes unintended rocking.

    So to recap:
    The Ball. Simple sphere. I put a gradient ramp in the diffuse material mimicing a stripe, so it's easier to see the rotation. This is placed at the world origin with its lowest point resting on the XY plane (ie, ground plane)

    The ball is linked to a dummy node that will do the scaling (Squash & Stretch). This node is placed at the world origin. So it's pivot is at the bottom-center of the ball. I like using point helpers for these types of nodes because there's more options for how to display them and they're easier to resize than a standard dummy object. That lets me rotate the ball any way I want and allow it to deform. Works almost like a space warp this way, but more straightforward with keyframes in a graph editor.

    That scaling node is linked to another point helper which is aligned with the center of the ball. This lets me rotate the scale helper around the circumfrence of the ball and scale it in any direction.

    Parent node. I used a spline circle for this, placed at 0,0,0. This is where all of the translation is done.

    If I were going to take this further, I'd probably wire evertything up to custom attributes on the parent node so everything could be keyframed in one place. But here's a quick proof of concept showing everything works:
    https://docs.google.com/leaf?id=0B44eENePuFOBMzgwZTMyNmUtODNjZi00NGEwLWFjZTctMTA4Yjc5ZDE1ZWNi&hl=en_US
    Download the .mov and you can step through the frames.
  • Tom Ellis
    Options
    Offline / Send Message
    Nice one Wrath, thanks.

    Your link isn't working though, I get a 'Doc not available' page.
  • Wrath
    Options
    Offline / Send Message
    Wrath polycounter lvl 18
    Try again. I have to get the 'share' settings right. It's hard for me to tell because I have a google account and it's my doc...so it always works for me.
  • Tom Ellis
    Options
    Offline / Send Message
    Got it, thanks, yeah definitely works great.
Sign In or Register to comment.