AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sun May 19, 2013 11:58 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: camera revolving
PostPosted: Sun Nov 09, 2008 9:55 am 
Offline

Joined: Thu May 31, 2007 1:45 pm
Posts: 5
Hello,

I have a work to do that involves camera movment. I'ts a 3D scene like the universe for exemple. And I would like to make a camera revolving around this universe, in a perfect cercle. Some time ago I had a usefull script that allowed me to do that.The camera was revolving and pointing a the center a the same time. Could you help me ?

detomaso


Top
 Profile  
 
 Post subject: Re: camera revolving
PostPosted: Mon Nov 10, 2008 12:28 pm 
Offline

Joined: Wed Jul 20, 2005 12:07 am
Posts: 139
Use expressions:

rCenter=thisComp.layer("center").position;

rRadius=200;

X=rCenter[0]+Math.sin(time)*rRadius;
Y=rCenter[1];
Z=rCenter[2]+Math.cos(time)*rRadius;

[X,Y,Z]

Simply pin down your point of interest with a pickwhip expression to a Null and you are set. Modify values as needed.

Mylenium

_________________
[Pour Mylène, ange sur terre]


Top
 Profile  
 
 Post subject: Re: camera revolving
PostPosted: Mon Nov 10, 2008 2:03 pm 
Offline

Joined: Thu May 31, 2007 1:45 pm
Posts: 5
Thx a lot. Tha's F... cool.
I can see the revolution now. But I have few more questions now...
How can I manage the pace of the animation. In the clip I want to do, I have to stop sometimes to reveal some planet and some text.


Top
 Profile  
 
 Post subject: Re: camera revolving
PostPosted: Mon Nov 10, 2008 3:26 pm 
Offline

Joined: Fri Dec 07, 2007 10:11 am
Posts: 128
Instead of "time" in Mylenium's expression, add a Slider Control to a NULL object (or any other existing layer), pickwhip it's value to a variable t and multiply it by "Math.PI/180". Then use the Slider Control as the rotation angle in degrees:
0 - is the starting angle
360 - is the angle after one full revolve
etc.
So by keyframing the Slider Control you can control the rotation, and make it stop at any angle you want.
It should look something like this:

rCenter=thisComp.layer("center").position;
rRadius=200;
t = thisComp.layer("Null").effect("Slider Control")("Slider")*Math.PI/180;
X=rCenter[0]+Math.sin(t)*rRadius;
Y=rCenter[1];
Z=rCenter[2]+Math.cos(t)*rRadius;
[X,Y,Z]

Koby.


Top
 Profile  
 
 Post subject: Re: camera revolving
PostPosted: Tue Nov 11, 2008 3:30 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
Or you could just put a 3D null in the center of your universe, parent the camera to it, and rotate the null.


Top
 Profile  
 
 Post subject: Re: camera revolving
PostPosted: Tue Nov 11, 2008 8:37 am 
Offline

Joined: Thu May 31, 2007 1:45 pm
Posts: 5
Thx for your answers, but there might be something I don't understand. No matter what I do, Null or not, with or without slider, the thing is revolving even with no key frame...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group