ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

toWorld Expression not working.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Simeon in 't Veld
toWorld Expression not working.
on Nov 15, 2017 at 10:26:20 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);


Return to posts index

Dan Ebberts
Re: toWorld Expression not working.
on Nov 15, 2017 at 4:32:06 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



Return to posts index

Simeon in 't Veld
Re: toWorld Expression not working.
on Nov 16, 2017 at 10:15:56 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.


Return to posts index


Simeon in 't Veld
Re: toWorld Expression not working.
on Nov 16, 2017 at 11:35:43 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!


Return to posts index

Dan Ebberts
Re: toWorld Expression not working.
on Nov 16, 2017 at 4:05:44 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



Return to posts index

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