Home Technical Talk

[Maya] Is it possible to control this with driven keys?

Turbopasta
polycounter lvl 5
Offline / Send Message
Turbopasta polycounter lvl 5
Hi! I've been trying to set up a rig for this "whip sword" and I've been running into some trouble. I was wondering if anyone here could help me with this problem because I just have no idea how to solve this one. I'm new to using driven key stuff, so I feel like I must be missing something obvious. 

So, I've got this model rigged up with good paint weights and binded skin. I created a nurbs object with this attribute "Control sword length" which changes the x-scale of every joint of the entire upper skeleton, from 1.00 to 0.00. Right now it's at 34. It goes from 0-100. If I bring it down to 0...



This happens. This is fine so far. The problem comes from giving the skeleton rotation in the joints. 



Here, I selected the upper part of the skeleton and gave the entire thing rotation on it's Y axis. 6 degrees of rotation on each joint to be exact. Watch what happens if I bring it down from 100 to a lower number...



It doesn't look "bad", but I don't think it's correct either. It's more obvious if you see it animate into that position. It also clips into itself if I go down to 0 value as it's set up right now. It would look way more natural if the thing actually went back into the upright position that I showed on the 2nd picture, but I have no idea how to create a rig that can handle something like that right now. I also wouldn't just be correcting for rotation on the Y axis, I'd be correcting for all axis' at the same time.

Are there any rigging tricks I could use to make this easier? The solution I have set up right now is messy and takes forever to animate, in addition to not really looking correct once it's finished. I'd really appreciate any and all help for this, thanks!

Replies

  • kwyjibo
    Options
    Offline / Send Message
    kwyjibo polycounter lvl 7
    If you want it to snap back to a straight position when at minimum length, you could have 2joint chains that you blend between using the length attribute as the driver. So you have one short joint chain that represents the minimum length straightened out sword (You could animate this FK if necessary), and another chain that can be lengthened using your length attribute and maybe animated with a spline IK. Then you have a third chain which the actual geometry is bound to. Set it up so the rotation of this third chain is weighted to the minimum length straight sword chain or the extendable whip sword chain. Alternately you could make have one joint chain which you construct at straight and at minimum length. You then create an IK spline to control it. Set a keyframe for each joint rotation and translation at the minimum length position, and then use the IK blend attribute on the IK handle to blend between IK driven rotations/translations and the keyframed ones. You could use driven keys to link the length and IK blend attributes. One more thing, scaling joints can sometimes cause funkiness due to non uniform local space, so to lengthen the whip, it might be better driving the x-translation of each joint rather than the x-scale.
Sign In or Register to comment.