FORUMS: list search recent posts

How can I revise this expression so it looks at mask position and not x,y position?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Cabestany
How can I revise this expression so it looks at mask position and not x,y position?
on Dec 14, 2015 at 9:52:47 pm
Last Edited By David Cabestany on Dec 14, 2015 at 11:53:14 pm

I'm trying to obscure a lens flare when it goes in front of another layer. I can't use Optical Flares built in foreground layers feature because it doesn't work with mask positions, but rather x,y coordinates.

Anyone know what should I revise on the expression below so it follows the position of the flare (which is being driven by a mask position (in degrees) instead of a regular x,y position value?

Thanks in advance,
D.

target=thisComp.layer("shape");
alpha=target.sampleImage((effect("Optical Flares")("Position XY")),[1,1])[3];
linear(alpha,0,1,45,0);


Return to posts index

Kalle Kannisto
Re: How can I revise this expression so it looks at mask position and not x,y position?
on Dec 15, 2015 at 3:22:33 pm
Last Edited By Kalle Kannisto on Dec 15, 2015 at 3:23:05 pm

If you precomp the masked layer (or a copy thereof) moving the mask inside the precomp, the foreground layer method will work.


Return to posts index

David Cabestany
Re: How can I revise this expression so it looks at mask position and not x,y position?
on Dec 15, 2015 at 4:05:46 pm

Thanks Kalle, but that didn't work when I first tried it, hence why I tried the expression instead. The weirdest thing is that I made a test comp within the same project and everything worked fine.

I contacted Videocopilot and they asked me to send the file, I'm waiting to hear back from them.

I ended up making a new layer (precomped) with a similar alpha, the only difference is that instead of a shape layer as a source for the precomp I used a solid with a mask, that worked. Why? I have no idea.

Best,
D.


Return to posts index


Kalle Kannisto
Re: How can I revise this expression so it looks at mask position and not x,y position?
on Dec 16, 2015 at 8:42:06 am

It should only make a difference if the mask is inside the precomp (this works) or applied to the precomp (doesn't work).


Return to posts index

David Cabestany
Re: How can I revise this expression so it looks at mask position and not x,y position?
on Dec 16, 2015 at 5:29:47 pm

It should, but for some reason it didn't work. I'm in close contact with Videocopilot's tech guys trying to sort out the problem.

Thanks for your help,
D.


Return to posts index

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