Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Angle of comp automatically controls angle of layer inside comp

• Angle of comp automatically controls angle of layer inside comp

2 Members · 5 Posts
• Jeremy Allen

October 27, 2011 at 12:15 am

I have a feeling that what I’m trying to do is impossible, but I’m gonna give it a shot…

I’m creating lower 3rd comps with a spray paint effect, complete with paint drips (drip1, drip2, etc).

The hierarchy looks like this:

Main comp > L3 comp > Drip1, Drip2, Drip3

The L3’s are rotated at different angles depending on the shot they are placed over. The problem is I want the drips to go straight down no matter what the angle of the L3 is.

I figured out a way to change the angle of the drips with expression controls on a control null in the main comp. It does what I want it to do, but is not very flexible because I have to use names to make it work. Since I have a ton of different L3’s, this is not very efficient.

I could also use a control null inside the L3. Rotate the L3, then go into the L3 comp and change the angle on the control null, but again, not very efficient with the number of L3’s that I need to create.

What I would really love to do is use the angle of the parent comp to control the angle of the drips. So if my parent comp is rotated 14 degrees, all the drips in the nested comp would rotate -14 degrees. If I change it to -8 degrees, the drips change to 8 degrees.

Something like this on a drip’s rotation:
thisComp.parent.rotation*-1

I’m aware that won’t work, but that’s the idea of what I want to happen.

Or it could go the other way. If I could use an expression on the L3 to find the rotation of the L3 and then tell the drips inside that L3 to rotate (L3’s rotation)*-1.

Is there any way to do this without having to use actual names?

———————————————
8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

C4D 11.5
AE CS5 (10.0.2.4)
FCP 7.0.3
QT 7.6.4

• Dan Ebberts

October 27, 2011 at 12:30 am

There’s no way for an expression to access its comp’s parent comp, except by name.

I’m not sure it would help, but you might be able to create a script that would go through your project looking for drip layers and modifying their expressions to point at the right comp.

Dan

• Jeremy Allen

October 28, 2011 at 5:59 pm

Hey thanks for your time Dan.

Would there be any way to go the opposite way like I mentioned? Could you have an expression on the L3 comp that tells the drip inside the L3 comp to be a certain angle?

———————————————
8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

C4D 11.5
AE CS5 (10.0.2.4)
FCP 7.0.3
QT 7.6.4

• Dan Ebberts

October 28, 2011 at 6:08 pm

That’s really still the same problem. An expression can only control the property to which it’s applied, so you’d still need an expression on the drip layer to actually do the rotation, and it would have to get that value from the L3 comp, but could only do that by accessing the L3 comp by name.

Dan

• Jeremy Allen

October 28, 2011 at 6:18 pm

Ok, I was afraid of that.

My solution is to use a slider on a null layer inside the L3 comp to control the drip angles. It works fine, I just have to take the extra step of going inside each L3 and adjusting the angle of the drips. I was hoping for something more automatic but I guess sometimes you just gotta do it the hard way. 🙂

———————————————
8core MacPro, 3.0 GHZ, 18GB RAM, OSX 10.5.8

C4D 11.5
AE CS5 (10.0.2.4)
FCP 7.0.3
QT 7.6.4

Viewing 1 - 5 of 5 posts