FORUMS: list search recent posts

Expression attach Displacement Map Values to an Angle Control effect

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jesse richards
Expression attach Displacement Map Values to an Angle Control effect
on Apr 7, 2020 at 5:01:06 pm

Hi

I'm not sure if it's possible but I'm trying to get the direction in which my Displacement Map is displacing to be linked to an Angel Control effect slider.

So if the Angle Control was set at 90 degrees then my Displacement Map values would be:

Max Horizontal Displacement: 100 (any positive number really)

Max Vertical Displacement: 0

And if it was set to 180 degrees it would be

Max Horizontal Displacement: 0

Max Vertical Displacement: 100

and so on....

Any ideas?

Thanks in advance

Jesse



Return to posts index

Darby Edelen
Re: Expression attach Displacement Map Values to an Angle Control effect
on Apr 7, 2020 at 5:54:46 pm

Sure, for your example you'd apply this to the horizontal displacement:

amp = 100;
angle = 45 //replace with angle control value here
amp * Math.cos(degreesToRadians(angle)- Math.PI/2);

And vertical displacement:

amp = 100;
angle = 45 //replace with angle control value here
amp * Math.sin(degreesToRadians(angle)- Math.PI/2);

I've written these from memory and haven't tested them, so let me know if something doesn't work.

Darby Edelen


Return to posts index

jesse richards
Re: Expression attach Displacement Map Values to an Angle Control effect
on Apr 7, 2020 at 6:30:00 pm

Incredible! It works perfectly thanks so much.

Jesse



Return to posts index

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