ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Parent Position of a Layer to a Layer in a different Comp with different resolution

FAQ   •   VIEW ALL
 Parent Position of a Layer to a Layer in a different Comp with different resolution on Aug 8, 2017 at 10:27:13 am

Hey folks,

maybe someone can relieve me of my headache caused by my lack of understanding how to parent the position property of a DUIK-Controller_Null in one comp to a position property of a Solid (which is driven by motion capture data originally in 3D and converted to a 2D-position using toComp() ) in a completely different Comp with a different resolution.

My goal is to drive the entire Character via Duik Auto-Rig Nulls in the comp "Valdemar side" but have these Nulls be controlled by the Solids in the Comp "[..]_TrackWalk".
For a first try, i tried to pickwhip my C_C_PELVIS position to the Position of the Solid which represents the Hip in the Motion Capture Comp but i can't wrap my head around the layer and comp space transforms i have to do in order to achieve my goal.

I uploaded a Screenshots of the two Comps side by side in order to help express my problem. I hope some of you lovely people could help me out, and i hope i described my problem enough to understand it.

 Re: Parent Position of a Layer to a Layer in a different Comp with different resolutionon Aug 8, 2017 at 9:02:20 pm

For starters, you need an algorithm that defines the spatial relationship between the two comps. How does a particular position in the null comp relate to a position in the character comp?

Dan

 Re: Parent Position of a Layer to a Layer in a different Comp with different resolutionon Aug 31, 2017 at 3:41:42 pm

First you would like to have the same ratio for the two composition, in the pictures the first one (character) is vertical while the second one (capture) is horizontal.
Modify the size of the first one, for example if its 750px x 2000px you should do a 3556x2000px comp, assuming that the second one is in a HD ratio (1920x1080).

Then you need to multiply your source positions by the ration between the two comps.

In this exemple the ratio is 1,85208333333333 because 3556/1920 = 1,852083333333First you would like to have the same ratio for the two composition, in the pictures the first one (character) is vertical while the second one (capture) is horizontal.
Modify the size of the first one, for example if its 750px x 2000px you should do a 3556x2000px comp, assuming that the second one is in a HD ratio (1920x1080).

Then you need to multiply your source positions by the ration between the two comps.

In this exemple the ratio is 1.85208333333333 because 3556/1920 = 1.85208333333333.

the resulting expression would be something like that

comp("2017-07-21_15-25-33_TrackWalk »).layer(« _ »Hip).position*1.85208333333333

The only problem is that you'll not be able to adapt your positions, so you can add the value if your layer like that:

value+(comp("2017-07-21_15-25-33_TrackWalk »).layer(« _ »Hip).position*1.85208333333333)

The only thing is that you'll need to change all your positions to 0,0 so it will not do strange staff.

`value+(comp("2017-07-21_15-25-33_TrackWalk »).layer(« _ »Hip).position*1.85208333333333)`

`value+(comp("2017-07-21_15-25-33_TrackWalk").layer("_Hip").position*1.85208333333333)`