Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

IK Effectors outside puppet comp

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
IK Effectors outside puppet comp
by Greg DiGenti on Aug 21, 2008 at 11:12:54 pm

I first wanted to thank Dan Ebberts for putting such helpful info on his site. I've created a puppet using his amazing inverse kinematics tutorial (http://www.motionscript.com/design-guide/ik.html), but what I'm attempting to do is to parent the effectors to effectors in the main comp.

I've been able to get the effector to control the arm by adding this expression to the position property of the effectors in the puppet comp:

comp("CompName").layer("hand_L EFFECTOR");

But the effector in the main comp isn't actually on the hand as I want it to be, it's about 500 pixels to the right and below it, and I have to move it a lot for it to control a little. I feel this has something to do with toWorld or fromWorld or toComp or fromComp or something, but I've tried every combination of those I can think of, and I can't really wrap my mind around what those expressions are doing or what I need for them to be doing.

Any help would be appreciated.

Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Dan Ebberts on Aug 22, 2008 at 1:02:53 am

Try this:

L = comp("CompName").layer(thisComp.name);
L.fromWorld(comp("CompName").layer("hand_L EFFECTOR").position);


Dan



Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Greg DiGenti on Aug 22, 2008 at 3:30:52 am

Hi Dan. Nice to get a response from the man himself.

I tried your expression (I was getting an error initially because I had changed the name of the layer in the main comp to something else, but I fixed that), and it's closer, but still not working right.

I have an effector in the puppet comp which I'm trying to link to the effector in the main comp, and with your expression, the effector in the main comp is below and to the left of the hand (and still moves slower than the arm when I drag it) and in the puppet comp the effector is off to the right. So now, neither effector actually seems attached to the hand.

Respond to this post   •   Return to posts index


Re: IK Effectors outside puppet comp
by Dan Ebberts on Aug 22, 2008 at 3:55:14 am

Is the puppet comp scaled to something other than 100% in the main comp? Or, is it the child of another layer in the main comp?

Dan



Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Greg DiGenti on Aug 22, 2008 at 4:52:07 am

I'm not sure if you heard that, but it was the sound of my hand slapping my forehead :)

Yes, it is. How would I go about compensating for that? It's 54% of the original size.



Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Dan Ebberts on Aug 22, 2008 at 5:27:05 am

Hmmm... that doesn't seem to be the problem after all. How about pixel aspect ratios. Are they the same for the puppet comp and the main comp?

Dan



Respond to this post   •   Return to posts index


Re: IK Effectors outside puppet comp
by Greg DiGenti on Aug 22, 2008 at 5:34:26 am

The comps are different sizes, but they're both set to square pixels.



Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Greg DiGenti on Aug 22, 2008 at 6:42:19 am

I figured out what was going on, but haven't solved the problem yet. The puppet comp in the main comp was in 3D space, but neither the effectors or the pieces within the puppet comp were. This was causing the discrepancy in where they were located. Stupid me.

However, I don't want the effectors to be in 3D space because they become too difficult to grab and move and I'd also have to make all the pieces inside the puppet comp 3D and the whole thing would get too complex, so I'm not sure how to get around it.

I would like to be able to keep those controllers outside the puppet comp because I was going to just make the puppet comp a few frames long and enable time remapping in the main comp to stretch it out to the length of the movie. That way all of the keyframes for motion control of the puppet would be in the main comp.



Respond to this post   •   Return to posts index

Re: IK Effectors outside puppet comp
by Dan Ebberts on Aug 22, 2008 at 4:13:05 pm

Ah, this sounds like a job for the seldom-used fromCompToSurface() transform:

L = comp("CompName").layer(thisComp.name);
L.fromCompToSurface(comp("CompName").layer("hand_L EFFECTOR").position);

Give that a try.

Dan



Respond to this post   •   Return to posts index


Re: IK Effectors outside puppet comp
by Greg DiGenti on Aug 22, 2008 at 7:09:43 pm

Wow, that's perfect! Works like magic!

So what is that expression doing exactly?

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]