ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Text layers that rescale in relation to camera according to inpoint

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kristian Andrews
Text layers that rescale in relation to camera according to inpoint
on May 15, 2018 at 10:24:59 am

Hello! Longtime lurker first time poster here.

I was hoping someone might please be able to help with this AE conundrum i've encountered?

I'm making a credits sequence that is basically a 3D camera pullout from a map, names appear and then recede into the Z axis as if on the map. So far, I have the 3D text layers sequenced and adjusted to start at a consistent size from the camera's perspective. Effectively, this means the scale of the text layers in relation to the map are incrementally larger to compensate for the perspective of the camera.

What I want to achieve is to be able to duplicate text layers so that when their inpoint is shifted the layer rescales dynamically. That way as many credits as required can be entered and they'll all appear to start at the exact same size

...So far ive nabbed this from elsewhere on the forum:

nominalDist = 1000;
C = thisComp.layer("Camera 1");
p1 = C.toWorld([0,0,0]);
p2 = toWorld(anchorPoint);
(value*length(p1,p2)/nominalDist);

This expression rescales the text to compensate for camera perspective continuously. Is there a way to adjust it so it only applies the expression at the layer inpoint, meaning that the names appear at a consistent scale but then recede??

Thanks very much in advance for any insight you can give an AE novice

Kristian :)

nominalDist = 1000;
C = thisComp.layer("Camera 1");
p1 = C.toWorld([0,0,0]);
p2 = toWorld(anchorPoint);
(value*length(p1,p2)/nominalDist);


Return to posts index

Kalleheikki Kannisto
Re: Text layers that rescale in relation to camera according to inpoint
on May 15, 2018 at 4:15:26 pm

This is an untested guess with about 5% probability of being correct, but it might be along the lines of

...
p1 = C.valueAtTime(inPoint).toWorld([0,0,0]);
p2 = toWorld(anchorPoint.valueAtTime(inPoint));
...

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Kristian Andrews
Re: Text layers that rescale in relation to camera according to inpoint
on May 15, 2018 at 5:17:06 pm

Thanks very much for replying to my post. This is what I ended up using with a little help from Steve Kirby...

nominalDist = 1000;
C = thisComp.layer("Camera 1");
p1 = C.toWorld([0,0,0],(thisLayer.inPoint));
p2 = toWorld(anchorPoint,(thisLayer.inPoint));
(value*length(p1,p2)/nominalDist);


Return to posts index


Kalleheikki Kannisto
Re: Text layers that rescale in relation to camera according to inpoint
on May 15, 2018 at 6:27:18 pm

Oh, yes, the second attribute for layers space transformations is time -- that makes more sense.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]