PDA

View Full Version : Targeting and teeth gnashing...


michaelb
07-30-2003, 12:57 AM
Hi,
I was hoping someone could shed some light on a problem I’m having with LW’s Targeting function. I put together two quick scene files in a .zip archive that will demonstrate it:

http://yourpage.blazenet.net/michaelbarnes/Targeting.zip

What I basically want to do is have a light on a hinge point at a target, but the light and the target are both children of separate nulls that rotate. In the “TargetOK” scene, everything is fine as long as I keep everything in its original zeroed out orientation. In the “TargetTwisted” scene, just keep your eyes on the light as it rotates. I moved the TargetBase null a meter off the 0 position, and it’s all thrown out of alignment. The light should remain centered above the LightHinge null and pointed at the Target null, but it’s off in space pointing a whole different direction. It’s almost like the Targeting function is additive, and it affects children more and more the deeper it progresses into an object hierarchy. Am I just doing something wrong here, or is it really supposed to be this way? Is there a way around this by using expressions, counter angled nulls parented to the target nulls, etc.? Any and all help or suggestions would be appreciated!

Thank you,
Michael A. Barnes

kretin
07-30-2003, 02:15 AM
It's because you have 2 items in a heirarchy that are both targeting other items. What is happening is that the targeting for the child is happening before the targeting for the parent. This is unfortunately how targeting currently works, and there's not alot that can be done, except to try to work around it.

I've come across this many times in my rigging, and it's a real pain in the ass, but one way to covercome for what you're trying to do is to "force" the parent rotation to be calculated first by making it rotate using IK instead of targeting.

I've set it up quickly in the attached scene

michaelb
07-30-2003, 10:36 AM
That seems to work very well. I had considered using IK for the whole rig, but I wasn't sure if it would twist in on itself like the targeting seemed to. It was a real eye-opener when you said the targeting for the child is happening before the targeting for the parent. I never would have considered that. Thanks for taking the time to share. I appreciate it! :D

Best regards,
Michael A. Barnes

kretin
07-30-2003, 11:19 AM
No probs :)

Use targeting wherever you can though, it's easier to setup and manage than IK, and faster to calculate.

CGTalk Moderation
01-15-2006, 06:00 PM
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.