|07 July 2013|
West City, USA
Lookat Constraint on Single Axis per object
I'm driving myself crazy trying to do something that SHOULD be dirt simple, but constantly confounds me by breaking itself.
In two different instances I'm trying to make turrets I can aim by simply moving a dummy around the scene. Video games do this sort of thing all the time, so it shouldn't be the least bit difficult in 3dsmax.
But the program keeps breaking it.
One instance is a quadrotor I modeled with a bottom-swinging turret. It's meant to work by having the gun itself rotate vertically for pitch and the lower component it's attached to rotate horizontally for yaw.
Simple right? Could easily animate this manually, but it'd be simpler to apply lookat constraints.
I've been told I can use lookat constraints on only one or two axese by locking rotation of the axis in the link section of the hierarchy panel. Okay, done. Does it work?
Of COURSE it doesn't work. Somehow the constraint finds a way to roll 90 degrees and ruin the effect, or pull a full 180 if I move the target behind it.
How useless is this constraint if it breaks this easily? It pulls this every time I try to lock it. It either outright ignores the locks, or finds a way to cheat.
Okay, so I try another tactic by making dummies that use lookat constraints, wiring their rotation to the turret pieces, and using float limit controllers on them to keep the pieces within their axis.
But of course, as soon as I try to parent the pieces, their rotation changes angle for some reason, resetting the parameters of my limits and driving its plow through a mud-puddle I happen to be standing next to.
I'm sick of Max doing this, I'm sick of applying an IK HI solver to a robot arm, only to see the end effector doing everything in its power to keep at least three yards away from the goal object, ruining my rig, when I know full well it could find a way to reach the goal object under its given constraints. I shouldn't have to FIGHT the program to make it do what it should already be doing.
|08 August 2013|
Glasgow, United Kingdom
Here's a good tutorial on doing a LookAt constraint on 2-axis only by Autodesk's own Louis Marcoux: http://area.autodesk.com/louis_tuto..._on_2_axis_only.
Someone asked something similar about constraining turrets over on The-Area quite a few months ago and I created a simple test scene demonstrating the 2-axis LookAt effect which I've attached.
Also, I believe that the locks you mentioned in the Hierarchy panel only prevent you from keyframing your objects, it doesn't stop them from inheriting transformation information from constraints, IK, wire parameters, etc..
So you have to limit it yourself, you can see in the test scene I've got a 2-axis LookAt constraint and I used a ExposeTM helper (the one with the axis tripod) to calculate the angle created by Point005 and Point004. You also notice that I've got a spinner/slider UI on the circle shape Circle001 which allows you to define the limit angle. I use these two pieces of information in an if statement which is on the turrets 3rd rotational controller in the x-axis.
As for your IK problems (lets assume you're using Bones), if the distance between the IK goal and the start joint is less than the summed lengths of all the Bones in the linked chain and the end joint is not sticking to the IK goal, then it's probable that you're working on a small object. If this is the case, then select the IK goal and go to the Motion panel and reduce the Position threshold value to something smaller, perhaps 0.01.
Hope this gives you somewhere to start,
|08 August 2013|
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|