FORUMS: list search recent posts

Scale Effect?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Elaan Dak
Scale Effect?
on Jul 31, 2011 at 12:48:12 pm

Sorry I'm asking the same question again, but I still don't know how to do it.
The thing is that I got the effect I want but the objects is getting outside the camera view, how can I modify the code to offset the objects go to the center, I mean toward the camera in Z axis?
This is now:




And I'm looking to have this result:



And this is the AE file:

http://www.box.net/shared/rugaib41hs3a6tjp7om9

Thanks in advance.


Return to posts index

Dan Ebberts
Re: Scale Effect?
on Jul 31, 2011 at 5:07:27 pm

Try this:


mouse_layer = thisComp.layer("mouse layer");
beginScale = 100;
endScale = 1500;
beginDistance = 40;
endDistance = 0;

w = thisComp.width;
p0 = value + 30;
camPos = [w/2,thisComp.height/2,-50/36*w];
v = normalize(camPos-p0);
dis = length(position, mouse_layer.position);
val = ease(dis, beginDistance, endDistance, endScale, beginScale);
p0 + v*val


If you had a camera in the comp, you would use its position instead of the calculated position.

I wasn't sure what the +30 is for, but I stuck it in there.

Dan



Return to posts index

Elaan Dak
Re: Scale Effect?
on Aug 1, 2011 at 7:45:32 am

Thank you Dan, its working nice.

One more thing is that all the objects are following the same Z distance, it should be also calculated according to where that object X position is (close or far from the camera), So the object on the very left and the very right should move a longer Z than the one in the center.

I tried to add this.x to each object's (endScale) but I ended with that the very right crosses the most distance.

Thanks again.


Return to posts index


Dan Ebberts
Re: Scale Effect?
on Aug 1, 2011 at 1:31:32 pm

I don't have time to test it, but try this:

mouse_layer = thisComp.layer("mouse layer");
beginScale = 100;
endScale = 1500;
beginDistance = 40;
endDistance = 0;
w = thisComp.width;
p0 = value + 30;
camPos = [w/2,thisComp.height/2,-50/36*w];
m = length(camPos,p0)/camPos[2];
v = normalize(camPos-p0);
dis = length(position, mouse_layer.position);
val = ease(dis, beginDistance, endDistance, endScale*m, beginScale);
p0 + v*val



Dan



Return to posts index

Elaan Dak
Re: Scale Effect?
on Aug 7, 2011 at 1:54:27 pm

Thanks guys, you are amazing..

Everything is fine unless that is goes in the opposite way not toward the camera as it was before..





What value I should add a (-) to?

This is the current code:



mouse_layer = thisComp.layer("mouse layer");

beginScale = 0;
endScale = 2100;
beginDistance = 600;
endDistance = 0;

w = thisComp.width;
p0 = value + 30;
camPos = [1440,540,-2240];
m = length(camPos,p0)/camPos[2];
v = normalize(camPos-p0);
dis = length(position, mouse_layer.position);
val = ease(dis, beginDistance, endDistance, endScale*m, beginScale);
p0 + v*val




Thanks Dan..


Return to posts index

Elaan Dak
Re: Scale Effect?
on Aug 7, 2011 at 10:17:38 pm

I tried on the camera, and the Z but still not.


Return to posts index

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