Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Nested 3d layer point space transformation?

  • Nested 3d layer point space transformation?

    Posted by Brian Nishii on April 15, 2010 at 6:35 pm

    I have a null layer (“emission point”) inside a 3d comp (“Figurine”) that’s parented to another moving layer.
    Which is in turn, nested in a main 3d comp with collapse transformations turned on.
    I’m trying to get the coordinates of the that null layer in my main comp and am having trouble with the following code:

    ep = comp(“Figurine”).layer(“emission point”);
    p = ep.toWorld(ep.anchorPoint);
    p

    Feels like I need to do 2 transformations: one from parented null layer to its 3d world position of “Figurine” comp, and then transform to world space in main comp- something like this?:

    ep = comp(“Figurine”).layer(“remote emission point”);
    FCompP = ep.toComp(ep.anchorPoint);
    p = FCompP.toWorld(ep.anchorPoint);
    p

    Which doesn’t work….

    I’m sure I’ve missed this in the posts somewhere, but anyone have any ideas?

    Thanks in advance!
    Brian

    Dan Ebberts replied 16 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    April 15, 2010 at 7:10 pm

    Try it this way:

    L1 = comp(“Figurine”).layer(“emission point”);
    P1 = L1.toWorld(L1.anchorPoint);
    L2 = thisComp.layer(“Figurine”);
    L2.toWorld(P1);

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy