ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Effect or expression to display a layer's position values

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
William PorterEffect or expression to display a layer's position values
by on Jul 13, 2012 at 1:28:22 pm

Does anybody know if there is a way for a layer to display it's own position values?

To clarify I mean so that the position values are rendered next to, or on the layer itself. Just like on an air traffic control radar. (Please see reference images)

I don't want to simulate the numbers, I need them to be real and displaying their actual position.

I'm not sure if this has already been looked into, but I can't find anything on the subject.

Thank you in advance for any enlightenment!

4397_atlanta.jpeg.zip
4398_lax20radar.jpeg.zip


Return to posts index

Brian CharlesRe: Effect or expression to display a layer's position values
by on Jul 13, 2012 at 2:32:31 pm

You'll need 2 layers. The moving object and a text layer. On the text layer use the following expression for the Source text property:

p1 = thisComp.layer("Object").transform.position[0];
p2=thisComp.layer("Object").transform.position[1];
[p1,p2]

Replace the word "Object" in the expression with the name of the moving layer.



Return to posts index

Brian CharlesRe: Effect or expression to display a layer's position values
by on Jul 13, 2012 at 3:12:02 pm

To round the numbers you could use this:

p1 = thisComp.layer("Object").transform.position[0];
p2=thisComp.layer("Object").transform.position[1];
[(Math.round(p1)),(Math.round(p2))]



Return to posts index


Bill PorterRe: Effect or expression to display a layer's position values
by on Aug 15, 2012 at 2:46:00 pm

Apologies for the late reply! Thank you, that is elegant and fantastic!


Return to posts index

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