FORUMS: list search recent posts

My expression and approach is Ack Basswards

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
George Goodman
My expression and approach is Ack Basswards
on Dec 10, 2013 at 10:11:55 pm

I fought with the most manual approach to this expression as I could to come up with for usable results. I know it's a really dumb way to do it though. I would love it if someone could straighten me out with this.

I have a layers that is wiggling it's y position. It has a a circle shape layer as a shadow below it. As the y position increases in value (goes down) I want the x scale of the circle layer to decrease.

It would probably be better to specify value ranges somehow? I don't know, but I realize I took the wrong approach.

Thanks in advance,

George

ypos=thisComp.layer("FolderNULL").transform.position[1]
xscale=transform.scale[0]
yscale=transform.scale[1];

[xscale/(ypos/500),yscale]


Return to posts index


Dan Ebberts
Re: My expression and approach is Ack Basswards
on Dec 11, 2013 at 1:33:04 am

Maybe something like this:

ypos=thisComp.layer("FolderNULL").transform.position[1];

startY = 0;
endY - 500;
startScale = [0,0];
endScale = [100,100];
linear(yPos,startY,endY,startScale,endScale);


The numbers won't be right, but the idea might work.

Dan



Return to posts index

George Goodman
Re: My expression and approach is Ack Basswards
on Dec 11, 2013 at 5:41:47 pm

Thanks Dan!

This was the expression I was trying to recall. I knew I needed to map values, but I couldn't remember it for the life of me.

I posted the expression I ended up using below. The starting y position of the layer was 562 (pre-expression) and the wiggle was 75 - so I subtracted and added those values from the original value. Was there an easier (or better for the sake of changing) way to do this using "value"?

I had to map my values such that the startScale was larger than the endScale since I wanted the shadow to shrink as the item got lower to the ground.

ypos=thisComp.layer("FolderNULL").transform.position[1];

startY = 562-75;
endY = 562+75;
startScale = [140,100];
endScale = [100,100];
linear(ypos,startY,endY,startScale,endScale);


Return to posts index

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