-
intersect and sampleimage??
hi there all.
i’m trying to raise my skills with expressions.
my goal was to draw a line on a layer where a other layer intersect’s
with the color’s of that layer.a too high goal for a expression roocky like me 😉
so i first tried to simplify my goal by making my layer that has to be sampled just rotate in Y and make a different solidlayer(the dots) change color and place it self on the place where the 2 intersect. (i guess the picture explain my goal a bit more)
the sampling is going well but the placement goes wrong.
it never crosses the middle of the layer and foldback!it’s a bit hard for me to explain my goals i hope you understand what i mean.
is this the way to go for my final goal see begin post or am i thinking to difficult
grt
Mauricefor the color of the fill effect
---------
target=thisComp.layer("tobesampled2.jpg");
angletarget=thisComp.layer("tobesampled2.jpg").transform.yRotation;
angletargetRAD=degreesToRadians(angletarget);
distancetarget=10;
x=Math.sin(angletargetRAD)*distancetarget;
a=distancetarget*distancetarget;
b=x*x;
z=Math.sqrt(a+b);
XsamplePos=target.width/2-z;
target.sampleImage([XsamplePos, 300], [0.5, 0.5])for the position of the layer
---------
target=thisComp.layer("tobesampled2.jpg");
angletarget=thisComp.layer("tobesampled2.jpg").transform.yRotation+90;
angletargetRAD=degreesToRadians(hoeklaag);
distancetarget=50;
x=Math.tan(angletargetRAD)*distancetarget;
a=distancetarget*distancetarget;
b=x*x;
z=Math.sqrt(a+b);
XsamplePos=(target.width/2-z);
Xpos=XsamplePos;
Ypos=index;
[Xpos,Ypos,50]People saying they don’t make mistake’s often make nothing at all!
Sorry, there were no replies found.

