MIR Procedural Flight
This AE project file contains a procedural flight camera for Trapcode Mir. Note that these expressions are not mathematically correct, they just give an appearance of a flying camera.
In order to achieve flight motion, firstly the Scroll Y parameter has an expression (time*1000) so it appears the landscape is moving towards the camera. To get motion sideways there is an expression on Scroll X as well. This is more complex:
Simply changing the seedRandom value here will change the entire flight path. The rest of the expression is a smoothing window to smooth out the result of a wiggle expression. The wiggle expression creates the randomness and uses the aforementioned random seed to do so.
To get the banking effect (roll of camera) an expression is used on the Camera Z Rotation:
// smooth the velicity values to avoid jumps
sum = 0;
for(i=-4; i<5; i++) {
sum += thisComp.layer("MIR").effect("Mir")("Scroll X").velocityAtTime(time +1 +i*0.1);
}
-0.1*sum/10 // change the value (0.1) to change the amount of banking
Here we are again smoothing the alredy smoothed values of Scroll X. Lots of smoothing is needed! By sampling the velocity of the Scroll X motion we get an approximation of the banking needed for such a turn. One second is added to the sampling time so that the banking happens first, before the actual turn.
Lastly there is an expression on for the sideways direction of the camera (yaw). This is so that the camera aims in the direction of flight. The expression is:
// smooth the velicity values to avoid jumps
sum = 0;
for(i=-4; i<5; i++) {
sum += thisComp.layer("MIR").effect("Mir")("Scroll X").velocityAtTime(time +i*0.1);
}
-0.03*sum/10
Download Adobe After Effects CS6 project file: MIR_Procedural_Flight_CS6.aep
Reader Comments