View Full Version : Target expression?

04-05-2007, 01:57 PM
I'm trying to setup some nulls that will point to a target using the bank channel. Problem is, only H and P is valid for this, so I'm wondering if an expression would do the trick?

I'm not expression savy, so if anyone can help out, its appreciated!

04-06-2007, 06:12 AM
Why not use IK? Just turn on IK for the bank, add a child, and make it an IK goal. Should work great unless you already got a complex hierarchy of IK and modifiers.

04-06-2007, 07:07 AM
I wasnt able to get the kind of motion I'm after with IK. The attached image shows what I need to set up. The scene faces down the Z axis so my bank handles are facing towards me.

I've tried parenting to Nulls spun on the Y axis, but I'm running into gimball lock. So I thought its worth giving expressions a try to resolve things...

04-06-2007, 08:24 AM
I don't know how your scene is setup currently. But this stuff is totally doable just relying on IK and parental relationships. Since you only need to rotate the piston and chamber on one axis gimbal locking shouldn't be much of a problem using IK, nomatter how you have stuff oriented to start with.

Just to prove my point I built what is attached. Personally I prefer to use 100% weightmaps and work with bones as this gives full freedom in the rigging phase as opposed to using objects and getting their pivots in the right spot and orientation.

Short notes on the setup: The wheel is keyframed. The piston is aiming for the center of the chamber. And the chamber is aiming for the base of the piston. But perhaps you want to control this by keyframing something else?

04-06-2007, 08:50 AM
Thanks for the scene, this is a great help!

The piston and chamber action is exactly what I needed. I dont fully understand how these goal objects work, but I think I obviously need to!

Thanks again!

04-06-2007, 10:22 AM
It wasn't all sunshine and roses on my part either as I did stumble upon one of the pitfalls of LWs ancient motion architecture. In this case it didn't pose a problem though. Perhaps I could make a video tutorial out of this to highlight the usefullness of IK in non-character-situations and make it clear to alot of people who seem either unaware or oblivious as to why LW isn't more than ok for rigging and animation and why NT should reinvent the motion architecture first instead of just keep giving us more motion modifiers and black boxes like IKBooster. Only Pooby sofar has been so specific (demoing a video from XSI highlighting what LW doesn't have and can't do).

04-06-2007, 10:27 AM
Btw, it's really just to short IK chains pointing towards eachothers bases. Nothing more, nothing less. If you can make a two bone IK chain you have all the technical skills you ned for this. Just make two of them and point them towards eachothers bases (which must be animated via keyframes or a modifier evaluated before IK, otherwise you fall into the pit :)).

04-12-2007, 02:32 PM
I managaed to sort out a rig for my scene, with your help - so thats great!

I'm wondering if you might be able to cast your eye over this slight variation where the piston remains fixed?

I have almost fixed it up, but I cant get the goal to stay fixed in the Z axis. If I can get a bone to slide with the motion that would be fantastic! :)

04-12-2007, 02:34 PM
Only Pooby sofar has been so specific (demoing a video from XSI highlighting what LW doesn't have and can't do).

I feel the pain, I was using XSI and MAX just a few months ago in another job. It really shows up the holes in LW's animation system.

However, I'm sure all this is going to change in the 9.x cycle. It has too really!

04-15-2007, 06:05 PM
Can't figure this one out with IK alone. With an Expression/modifier on the null (tied to the wheels rotation naturally) it should work out ok though.

04-16-2007, 01:58 AM
Yeah, thats what I was thinking. However I have been able to make it work, keying the goal along the Z and using the wheel to drive cyclist. Not an elegant solution, but at least it works ;)