PDA

View Full Version : Rigging Expression Help



Geffe
03-25-2005, 03:19 PM
Whats up fellow Lightwavers. I have run into a "speedbump", and I was hoping someone could help me out.

Here's the problem. I am currently rigging this model of an R/C car for an animation I am doing for a client. I have already pretty much set-up the entire rig, with only one feature of functionality missing. For each wheel and suspension assembly I have set up an Ik system consisting of 2 IK Chains, one for the steering mechanism, and one for the suspension action.

The shocks have a morph on them to compress, and when the A-arm of the R/C car rotates up to compromise terrain etc, the shocks being attached need to stay attached at the endpoints (like how any suspension works). So I applied an expression for the shock to follow the Bank rotation of the A-arm, and to my guestimated horror, the expression will only follow the bank rotation on a manually set keyframe. In other words, IK on; expression no work. If I turn the IK off for the A-arm and keyframe it manually, the expression on the shock works, as it morphs when the A-arm rotates.


So the general question is; "How do I get an expression to work with a channel that is on IK?"

I guess I can just animate the shocks indivdually with the morph mixer sliders, but it would be cool to not have to worry about animating an object that should obviously be animated through script!

I have thought about breaking the shock into 2 parts and using some bones, but that sounds avoidable. But I guess I could do that, could I not? One bone for each half of the shock and targeting each other? I have also already applied the expression to follow the Y axis for the goal object controlling the suspension, and I tried an expression to follow the chassis movement. These both worked, but both set ups require me to compensate for the position of the chassis and suspension goal object in relation to each other.

In other words, if the car lands after a jump, the chassis will move towards the ground (obviously) compressing the shocks. So what if there is a rock or slight undulation under one of the tires? I need to be able to move that suspension goal object to compensate for this. So if the expression is set to follow one or the other, the result is the shock will be out of place.

Maybe the notion that there is no "perfect" rig is situation here.
Iv'e included a pic of the front right rig for reference. Thanks for any help or suggestions anyone may have.


Geffe

lino.grandi
03-26-2005, 01:46 AM
Lightwave can't see IK modified value if the expression is applied via the Graph editor.

You have to apply your expression form the motion panel of the "expression controlled" item using the relative "Expression" motion plugin, where you're able to set "After IK" option on.

If you have to control a key-frame channel through an ik controlled item channel you have to use the lscript notation for your expression (item.rot(Time).h).

If you have to control a channel with active IK using a key-framed motion channel you can even use the classic channel expression syntax ([item.Rotation.H]).

Hope this helps.

Lino Grandi