Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions toWorld Expression not working.

  • toWorld Expression not working.

    Posted by Simeon In ‘t veld on November 15, 2017 at 10:26 am

    Hey creative Cows!

    I want to add a an optical flare effect to a solid which has a wiggle effect and is also child of another null to determine the global position.

    Here’s my expression to do this:

    L=effect(“Optical Flares”)(“Position XY”);
    L.toWorld(thisComp.layer(“Flare solid”).transform.position);

    I get the error saying: L.toWorld is not a function.
    I must just be making a simple typo here but I have been wrestling with this for a day and cant seem to fix it.

    Any of y’all have a solution for me?
    Much apreciated!

    L=effect("Optical Flares")("Position XY");
    L.toWorld(thisComp.layer("Flare solid").transform.position);

    Dan Ebberts replied 8 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    November 15, 2017 at 4:32 pm

    I’m really confused by how you have this set up, but usually you would apply the Flare to a stationary comp-sized layer and apply an expression like this to the Flare’s position parameter so that the flare tracks a moving, parented solid (named “Wiggle Solid” in this case):

    L=thisComp.layer(“Wiggle Solid”);
    L.toComp(L.anchorPoint);

    Dan

  • Simeon In ‘t veld

    November 16, 2017 at 10:15 am

    My bad. What you are describing is exactly the case. I do have the flare on a comp size solid. And wanted to parent the flare position
    this is the L=effect(“Optical Flares”)(“Position XY”); in my exppression. I will give you expression a shot with the .toComp instead of .toWorld.

  • Simeon In ‘t veld

    November 16, 2017 at 11:35 am

    Awesome! We’re a step in the right direction. it follows the object nicely. But its offset a bit wrong (say 400 px in x and 600 px in Y) How do I adjest this? (I have difficulty adding the 2 dimension expression in in there.) Adding a simple +400 works. but only for the X axis. How do I Adjust the Y axis too? Thanks for your help so far, you are the man!

  • Dan Ebberts

    November 16, 2017 at 4:05 pm

    It should work fine if the solid with the flare is 2D, comp-sized, centered in the comp, and not parented to anything. If that’s not the case, you could try it this way:

    L=thisComp.layer(“Wiggle Solid”);
    fromComp(L.toComp(L.anchorPoint));

    but that shouldn’t be necessary if you have it set up correctly.

    Dan

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