Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Understanding how toComp(value) works with Shape Layers

  • Understanding how toComp(value) works with Shape Layers

  • Frankie Jones

    July 21, 2022 at 7:13 am


    Felt had ok understanding of Comp and Layer space, but something is throwing me.

    If have SOLID with Point Control [0,0] the Point is Top Left corner of the solid. It moves with the Solid as expected, as the Point Control Effect is working in the Solids Layer space so [0,0] is always top left corner regardless of position in Comp of Solid.

    If add toComp(value) to Point Control, it converts the point to Comp Space so [0,0] becomes say [200,50], so the point moves that amount from the Top Left [0,0] Layer Space position. So isn’t Top Left of Solid anymore, is pushed to the right and down a little, because Effect is still operating in Layer Space it’s just using the Comp Space value of the point. This is as expected.

    BUT This I don’t understand:

    If have SHAPE with Point Control [0,0] it sits top left corner of Comp. Which I figured was because the Shapes Layer Space fills the size of the Comp.

    1. This must be wrong, because the Point doesn’t move with the Shape. So assumed (but not sure) that Shapes operate in Comp space and therefore Effects on them also operate in Comp Space? This seemed likelyish because fromComp doesn’t do anything (why?) making me think Shape Layers don’t have their own Layer space.

    2. What confuses me even more is if toComp(value) is used on the Point Control it moves with the Shape, almost like it has been moved into the Shapes Layer Space 0_o

    It also moves if Point Control is [0,0] into the center of the Comp. I expected toComp(value) wouldn’t do anything to the point either because: Comp space is same size as Layer space for shape layers (so [0,0] is just [0,0] or because shapes operate in Comp Space (so toComp not actually doing anything). Obviously this is wrong.

    3. Whatever the answer to the above 2 is, is it the same for any layer with the Continually Rasterize * on? Have only tested with Text which it is also the same as with Shapes.

    I need a real for dummies explanation as to what is happening here, because without it going to struggle to position anything with expressions etc. correctly in future.

  • Filip Vandueren

    July 24, 2022 at 12:10 pm

    Hi Frankie,

    The main thing I suppose is that a point control is an effect, and effects get applied to continuously rasterized layers *after* they have been transformed and rendered, resulting in a composition sized “view” of the shapes.

    For example, a lens flare on shapes or text will also not move with the layer as you transform it.

    So the control-point of the effect will not move with the layer, but the mathematical operation toComp([0,0]) does do something different, as this looks at the transformations of the layer (which the effect cannot)

    In this case, the result of the expression is not: “where on the screen is that point control located” (because it stays visibly stationary), but: “where in comp space is a point with the same numerical coordinates of this control point in layer space”

    I hope that clears it up

Viewing 1 - 2 of 2 posts

Log in to reply.

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