-
Creating automatic camera moves with expressions
Hi,
I’m trying to create a project for my boss to do the following:
Have a grid of images which the camera moves between smoothly.
I could, of course, set this up with keyframes and it may well be easier, however he does want this to be something we can use in the future for different projects, so I thought it would be good to set up a project that would adjust itself without too much work.
Very laborious to start but I’m hoping it saves workload and time in the future.Basically I need the project to allow me to replace placeholder assets with image or video assets, then have the camera already set up to smoothly move between each image and glide over it, wherever that image is placed.
I’ve begun writing the expressions for the camera movement and as you may imagine it’s fairly heavy going.
By the way I’m using AE 5.5 as I’m at work but if there’s solutions available in later versions I’m more than happy to hear them.
The current problem I’m facing is initialising a variable which i change in the expression. It’s fairly hard to explain so forgive me if this makes no sense.*deep breath*
The camera has a variable set up (state), which is either “view” or “move”. It also has PrevTarget and CurrTarget. When it is within the boundries of CurrTarget state is “view” and once it leaves them state is “move” when it reaches the end of the boundries of CurrTarget the value of CurrTarget is moved to PrevTarget and CurrTarget is advanced to the next one. The problem is…I have to refer to PrevTarget and CurrTarget to work out where the camera is and what state it should be in, also it neeed to start somewhere, so I have to initilise it, however, as the way this thing works is it runs the code every frame, if i have an initial state set there it reverts to that state every time.
Ok. Very sorry about the long post. If anyone’s interested please leave a comment.
Cheers