|We are going to build: one 3D comp, pre-comp it, duplicate it four times, we are going to use metal-junk images in our camera path to "avoid hitting", and use one camera. Is that it?! No, but the rest is just "a second coating on car paint", where we add some lights and additional images and animate a little "junk" thrown in.
I'm not going to tell you when to save your project but keep things simple by saving this project in the same folder as Take a ride and name it: "Take a ride", and if you're like me whenever I have done anything right (well, it happens), I save it.
We need to understand how we look at an object in XYZ ( I don't mean the hard rock group "XYZ" from the late 80's!) that is in front of us. Most of us knows the X/Y positioning, but what about the "Z stuff"?!
Well, imagine yourself on a beach, standing looking down at the sand, you are holding a thin stick in your hand and with it you draw a "boxy" cross with the base of it at your feet. Now "get down on your knees" (no, we are not going to pray), and draw a line in the middle of the cross, from the base of the cross straight up to the "x-ing". That's what we call, Z (depth). Now, at the "x-ing" draw the line all the way to the left end of the cross. That's what we call X (left and right). When you look up, you see your partner looking at you as if the person thinks you're insane. Well, that's what we call Y (up and down that is). It's not difficult, you will have so much fun once you understand the fundamentals of it, and now you do.
We are actually going to build that "cross" with 3D-Corridors, and turn left at the "x-ing", and on our way we avoid crashing into the three objects in a "zigzag" move and simulating additional "crashing into" avoidances. It' not Star Wars but it's kind of cool anyway.
Feel free to add your own images. You may even have your own favorite cockpit image to follow in front of the camera!
Building the Corridor.
Create a new comp, click on the new comp icon in the project window and choose these settings:
- Composition Name: Main Comp.
- With: 640
- Height 480
- Pixel Aspect Ratio: Square pixels
- Frame Rate: 25
- Resolution: Full, for now while building the corridor "cross". (You may need to adjust this depending on the amount of ram your computer has.)
- Start Time Code: 0;00;00;00 (base 30)
- Duration: 0;00;10;00 (ten seconds)
And then click on the Advanced tab at the top of the window, and click on the Rendering plug-in pulldown, and choose: Advanced 3D.
If we use the standard 3D plug in we get all sorts of problems with the corridor, since it's unable to render intersecting layers like our corridor, which is intersecting at all four corners. When you're done, click OK.
In your project window, create a new folder and name it Comps. (or whatever you prefer, we will only have two comps in it when we are done).
Drag your "Main Comp" into your Comps folder. Make sure your Comps Background color is set to Black.
Next, import these images and place them in a folder in your project window and name it Graphics: (Download these images with the project file above in the green bar -- if you haven't already.)
1. We're going to start with building the Corridor, at time 0 start dragging these images to the timeline:
- Wall.jpg X 2 (we use the same wall for left and right side).
- Rename the two Wall.jpg layers to Right Wall and Left Wall.
2. Enable the 3D layer switch for all layers (and make sure their in-point is at 0;00;00;00 and out-point is at 0;00;10;00)
Switch to best Best Quality for all layers, remember to do this with all images you add in the tutorial.
Adding a camera to the comp:
Layer-New-Camera, and choose the 15mm camera from the preset window.
Highlight the camera layer and press P to twirl down position for the camera, and change the Z position to -900, so you can see better what is going on in the comp window. We need to turn off the "Point of Interest" for the camera so we can move around more freely with the camera.
If we leave it on the camera wants to look towards that point, and that makes it harder to move around, (we will add it later on though!).
To turn it off we go to: Layer/Transform/Auto-Orient and choose Off, click OK.
Now, we have to position the images so they form a corridor, we use both position and rotation for this, as shown in the screenshot:
Highlight all the image layers (ctrl-click) and press P and shift R to reveal position and rotation for all the images. Scrub or type in by clicking on the value:
Position: (X) 320,0 (Y) 390,0 (Z) 0,0
X Rotation: 0 x -90
Z Rotation: 0 x +90
Position: (X) 320,0 (Y) 90,0 (Z) 0,0
X Rotation: 0 x +90
Z Rotation: 0 x +90
Position: (X) 620,0 (Y) 240,0 (Z) 0,0
Y Rotation: 0 x +90
Position: (X) 20,0 (Y) 240,0 (Z) 0,0
Y Rotation: 0 x -90
Now we see what is going on, we just built one corridor. That wasn't hard, was it?
4. Pre-compose the image layers by highlighting all four layers and go to : Layers- Pre-compose. Name the pre-comp: Corridor, leave everything else as it is and click OK.
5. Now, we need to enable the pre-comp Corridor's 3D geometry by turning on the Collapse Transformation and the 3D switch.
And rename it Corridor 1 (highlight the Corridor Pre-Comp and hit enter to rename it).
Building the "Cross", using the Corridor pre-comp.
1. Highlight the Corridor Pre-Comp.
2. With the Corridor 1 layer selected, hit ctrl+D four times, to duplicate the layer four times.
3. Rename the four new layers (top to bottom): Corridor Back, Corridor Right, Corridor Left, Corridor 2.
The last one is your Corridor 1 Pre-Comp, already renamed.
Positioning the Corridors.
- Corridor Back Position: (X) 320,0 (Y) 240,0 (Z) 3000,0
- Corridor Right Position: (X) 1220,0 (Y) 240,0 (Z) 2100,0
Y Rotation: 0 x +90
- Corridor Left Position: (X) -580,0 (Y) 240,0 (Z) 2100,0
Y Rotation: 0 x -90
- Corridor 2 Position: (X) 320,0 (Y) 240,0 (Z) 1200,0
- Corridor 1 Position: (X) 320,0 (Y) 240,0 (Z) 0,0
If we move our camera to (X) 320,0 (Y) 240,0 (Z)1500,0 we can see a little better at the "x-ing", where we need to add a roof and floor + one end wall to "Corridor Left", and two doors to end the "Corridor Back".
1. Add the roof:
Drag a copy of Roof.jpg from the Graphics folder to the Timeline, below your Corridors and rename it "X-Roof".
Position: (X) 320,0 (Y) 90,0 (Z) 2100,0
Z Rotation: 0 x +90 X Rotation: 0 x +90
2. Add the floor:
Drag a copy of Floor.jpg from the Graphics folder to the Timeline, below your Corridors and rename it "X-Floor".
Position: (X) 320,0 (Y) 390,0 (Z) 2100,0
Z Rotation: 0 x +90 X Rotation: 0 x -90
3. Add the back wall to "Corridor Left":
Drag a copy of EndWall.jpg from the Graphics folder to the Timeline,
drag it to the end of your layer stack and rename it "End Wall Left".
Position: (X) -1180,0 (Y) 240,0 (Z) 2100,0
Y Rotation: 0 x -90
4. Add the doors to "Corridor Back":
Drag a copy of BackDoor-L.jpg from the Graphics folder to the Timeline,
drag it to the end of your layer stack.
Position: (X) 470,0 (Y) 240,0 (Z) 3600,0
Drag a copy of BackDoor-R.jpg from the Graphics folder to the Timeline,
drag it to the end of your layer stack.
Position: (X) 170,0 (Y) 240,0 (Z) 3600,0
The extra floor and roof doesn't look right but we'll fix that later when we add lights to the comp. We won't add a back wall to "Corridor Right", since we're taking a left turn at the "X-ing" we won't see the end of "Corridor Right".
Now is a great time to play with your camera without setting any keyframes, highlight your camera layer and press P, now let's go forward in Z depth position to about: 2100.0 and you see the back doors in front of you, if you press Shift+R to reveal your X Y Z Rotation values for your camera you can turn around with Y Rotation. (To see the left corridor, scrub or type -90, behind you -180, to your right +90.)
Now, lets go outside: Scrub your cameras Y position value to about -600 (not rotation), and start scrubbing the X Y Z rotation values around to see what happens, i.e. change the X Rotation to -90 and you find yourself looking down at the "X-ing". Keep scrubbing away to get a feel for the camera. Take your time.
A good thing to use is the ability to look at the comp in different angles, you can make use of the three shortcuts F10, F11 and F12 and change them to your preference. To do this you select the view you want, i.e. Top in your Comp Window and hit Shift-F12, that makes the shortcut F12 your Top view. I use F11 for my Left view and F12 for my Top view, and I use them alot. Remember to zoom out to about 12? -6.25%, so you can see the hole path. You should also make friends with the three track camera tools: Orbit Camera, XY Camera and Z Camera. But I would suggest that you don't use them when you are in Active Camera view because if you have set any keyframes, any move in the comp window with those tools, sets another keyframe, so use them in Custom View 1-3. That way no keyframes will be added.
Now lets move the camera back in position and rotation: At time 0:00:00:00, set position values to: (X) 320,0 (Y) 240,0 (Z) -900,0
and set all your rotation values to zero. Screenshot: CameraBack.psd
Adding some "junk" to avoid hitting.
Lets add some images to avoid crashing into with our camera, it gives you a reason to bank and turn.
The short movies you're about to import are compressed with the Animation codec and has an Alpha channel, so import them as straight - Unmatted in the Interpret footage dialog-box and select OK.
Import all the "Junk" movies from the JunkMovies folder, create a Movie-folder in your project window, drag the movies into that folder. We also need to loop the movies three times, go to File - Interpret Footage - Main and select Interpret footage - Main - Loop and change the value of loop to three times , click OK., do this on Junk1, Junk2, Junk3 and Junk4.mov one at the time.
At time 0:00:00:00, add Junk1.mov, Junk2.mov and Junk4.mov, to your timeline below your Corridor Pre-Comps:
Junk1.mov Position (X) 370,0 (Y) 260,0 (Z) -225,0
Junk2.mov Position (X) 380,0 (Y) 290,0 (Z) 400,0
Junk4.mov Position (X) 380,0 (Y) 290,0 (Z) 3600,0
Let's put one in the left corridor too. At time 0:00:05:00 (5 sec) drag Junk3.mov to the timeline.
Junk3.mov Position (X) -520,0 (Y) 240,0 (Z) 2130,0
Twirl down the Material Options for all the Junk-movies and enable Cast Shadows.
We'll animate these later, but first we'll animate the camera.
Animating the camera.
We start with three keyframes, one at the beginning, middle and at the end. And we will add "Point of Interest" for the camera now too, so go to: Layer - Transform - Auto-Orient and check the "Orient Towards Point of Interest" check box and click OK. Press P to reveal the cameras position and if you don't see the Point of Interest press Shift A to reveal it.
- At time 0:00:00:00 set a position keyframe: (X) 320,0 (Y) 240,0 (Z) -2700,0
- At time 0:00:05:00 set a Point of Interest keyframe: (X) 320,0 (Y) 240,0 (Z) 2100,0
- At time 0:00:05:15 set a position keyframe: (X) 350,0 (Y) 220,0 (Z) 1530,0
- At time 0:00:08:12 set a Point of Interest keyframe: (X) -1600,0 (Y) 240,0 (Z) 2100,0
- At time 0:00:09:00 set a position keyframe: (X) -960,0 (Y) 240,0 (Z) 2110,0
Now we have our "Main" keyframes that makes our path, and in between them we start adding rotation keyframes and move sideways inside the corridors. We are also going to change our speed (Z position) from time to time to make it look smoother. I'm just going to point out where in time you should set keyframes and at what position, you will notice when there's an increase/decrease of speed when we change the Z position. When we will change position inside the left corridor strange things will happen, X position will take over the Z position and vice versa from "our point of view", but you get the point when time comes.
It's up to you to preview whenever you need to see what is going on and I suggest you do it often when we start adding rotation keyframes.
We start adding position keyframes:
- At time 0:00:02:00 set a position keyframe: (X) 320,0 (Y) 240,0 (Z) -840,0
- At time 0:00:02:27 set a position keyframe: (X) 495,0 (Y) 310,0 (Z) -140,0
- At time 0:00:03:28 set a position keyframe: (X) 120,0 (Y) 190,0 (Z) 565,0
- At time 0:00:07:00 set a position keyframe: (X) -220,0 (Y) 250,0 (Z) 2000,0
- At time 0:00:07:20 set a position keyframe: (X) -475,0 (Y) 290,0 (Z) 2220,0m
- At time 0:00:08:10 set a position keyframe: (X) -715,0 (Y) 270,0 (Z) 2100,0
Now we select all camera keyframes including the Point of Interest keyframes by dragging a marquee around all keyframes, right click or go to Animation - Keyframe Interpolation, in Temporal Interpolation where it says Linear choose Bezier.
Preview your work and you will notice that when we turn into the left corridor it's not very smooth, but we fix this after we have added the rotation keyframes, so lets start with those:
- At time 0:00:02:00 set a Z Rotation keyframe: 0 x +0,0
- At time 0:00:02:27 set a Z Rotation keyframe: 0 x -16,0
- At time 0:00:03:28 set a Z Rotation keyframe: 0 x +16,0
- At time 0:00:06:20 set a Z Rotation keyframe: 0 x -25,0
- At time 0:00:07:12 set a Z Rotation keyframe: 0 x +30,0
- At time 0:00:08:12 set a Z Rotation keyframe: 0 x -25,0
- At time 0:00:08:25 set a Z Rotation keyframe: 0 x 0,0
This is what we call Banking (Aviation talk for turning sideways), but this doesn't look very smooth either, so draw another marquee around the Z Rotation keyframes to select them and right click or go: Animation - Keyframe Assistant - and choose Easy Ease. That will make the Banking smoother.
Let's fix that left turn into the left corridor. Make sure that you can see all keyframes in motion path, if not go to Edit - Preferences - Display and choose All Keyframes in Motion Path. Now, make sure which keyframe to adjust, it's the position keyframe at 5:15 and move your camera all the way to the end so it's not in your way. Lock all your corridor comps and in your Comp Window select Top for your camera view and zoom out to about 25%.
In the timeline select the position keyframe at 5:15, right click or go to Animation - Keyframe Interpolation and select in Temporal Interpolation: Continuous Bezier and keep an eye on the Comp Window while you do that and click OK, now what we want to do is to grab the right Bezier handle and drag it down and out a little bit.
When you're done, go back to Active Camera view at 100% and Preview a selection just before the keyframe at 4:20 and to about 6:20, if you're not happy, go back and adjust some more, it can take some time to get it right. When you're happy with what it looks like, save and Preview what you've done so far.
Animating the "Junk".
Now, we'll make things more "alive" by animating the Junk-movies towards the camera.
At time 0:00:00:00 set a position keyframe: (X) 200,0 (Y) 300,0 (Z) 1200,0
And another at time 0:00:02:25 set a position keyframe: (X) 360,0 (Y) 300,0 (Z) -140,0
C set a position keyframe: (X) 390,0 (Y) 290,0 (Z) 1800,0
And another at time 0:00:03:20 set a position keyframe: (X) 390,0 (Y) 296,0 (Z) 408,0
At time 0:00:01:00 set a position keyframe: (X) 300,0 (Y) 240,0 (Z) 3600,0
And another at time 0:00:04:20 set a position keyframe: (X) 420,0 (Y) 300,0 (Z) 1000,0
We need to turn this movie in Y Rotation so it's facing the camera, turn it to: Y Rotation 0 x -90,0
At time 0:00:05:00 set a position keyframe: (X) -1100,0 (Y) 240,0 (Z) 2130,0
And another at time 0:00:07:20 set a position keyframe: (X) -455,0 (Y) 240,0 (Z) 2130,0
Preview what you've done so far.
Now, we're done with the hard part of this tutorial, we are going to put lights and some additional images to complete the overall look.
We'll start with the Front panel that goes in front of our Corridors to cover them up. Drag the FrontPanel.jpg to the New Comp icon in the Project Window, and make sure the duration of the comp is 10 sec., press Ctrl+k to bring up Composition Settings and check the duration of the footage too.
Zoom out to about 12.5%. Why are we doing this? Well, there's no opening in the image and that's what we're going make. Why not just use a mask to make a hole in the image? Well, we need it to be exact in the middle and the opening to be 600x300, that's just going to be a waste of time trying to do it that way.
Next we'll add an Black Solid in our FrontPanel.jpg Comp. Go to Layers - New - Solid and make it: Width: 600 and Height: 300 and black for color. I named my solid Entrance. In switches/Modes switch from Normal to Silhouette Alpha for the Solid, done. (If you want a border around the entrance, you could just use a solid i.e. in a dark grey color and make the size 630x330. Put it between the FrontPanel and the Entrance solid, choose an effect like Emboss, go to: Effect - Stylize - Emboss and adjust to taste, but make sure you adjust it some more after you added the lights to make it look a bit more real, add some blur if it's to hard looking.) I added an Rectangle Mask with a lot of feather on the FrontPanel image to make it look a little nicer, but that's just me.
Now close the FrontPanel Comp and return to the Main Comp. At time 0:00:00:00 drag your FrontPanel Comp into your timeline below the corridors. Enable the 3D layer switch for the Comp and set the position: (X) 320,0 (Y) 240,0 (Z) -600,0
We need some doors too, so we have to import two more images and place them in our Graphics folder. In the tutorials image folder select: FrontDoor-L.jpg and FrontDoor-R.jpg
Still at time 0:00:00:00 drag both images to the timeline below our corridors and enable the 3D switch on both doors.
Set the position for FrontDoor-L.jpg: (X) 170,0 (Y) 240,0 (Z) -595,0
And the position for FrontDoor-L.jpg: (X) 470,0 (Y) 240,0 (Z) -595,0
This makes the doors slide up and hide behind the front panel.
We need to open them too, so at time 0:00:01:00 set a position keyframe for both doors, move ahead in time to 0:00:02:00 and change the X Position on FrontDoor-L.jpg to: (X) 118,0 and FrontDoor-R.jpg to: (X) 758,0. To make the doors open a bit smoother select all the position keyframes we just added on both doors and go to: Animation - Keyframe Assistant and select Easy Ease Out. Preview what you have so far.
Adding the final touch -- lights.
I'm not going to go into what light to use, instead I'm just showing you the way I did it, so feel free to explore on your own.
First we add a Ambient light that affects the hole comp, at time 0:00:00:00 go to Layers - New - Light and select Ambient in the Light Type pulldown, name it: Ambient and select white for color and leave everything else and click OK. We'll change the color and Intensity on this light when we have a few more lights inside the Corridors. Put all lights as topmost layers in the timeline window.
Next we add one spotlight to the comp the same way we did with the Ambient light, except this time we choose Spot in the Light Type pulldown.
Name the spotlight: Front Spotlight.
Positioning the Front spotlight at:
(X) -200,0 (Y) -200,0 (Z) -2000,0
Turn of the point of interest for the light, go to: Layer/Transform/Auto-Orient and choose Off, click OK.
and rotate the light:
X Rotation 0 x -35,0
Y Rotation 0 x +25,0
Twirl down the Options for the spotlight and select a yellow color (R=255 G=255 B=128) and set Intensity to 40%.
Now we add two Point-lights, one in the Back Corridor and one in the Left Corridor.
Go to Layers - New - Light and select Point in the Light Type pulldown.
Name it: Left Cor Light. Choose the same yellow color and set Intensity to 40%
Positioning the Left Cor Light at: (X) -1500,0 (Y) 240,0 (Z) 1900,0
Give the next Point light the same color and intensity, and name it: Back Cor Light
Positioning the Back Cor Light at: (X) 320,0 (Y) 240,0 (Z) 3700,0
Now, go back to the Ambient light and twirl down the Options for that layer.
Change the color to the same yellow color as before and set intensity to about 50%.
That's almost it, I said we would fix the X-ing (X-Floor and X-Roof) before and we will.
Go to time 0:00:05:00 and you can see that the X-Floor and X-Roof is standing out from the rest of the images. Twirl down both layers Material Options and change the Ambient value to about 50%, that's it.
You have now finished the Take a Ride tutorial!
The main goal was to provide you with some knowledge about the 3D feature in After Effects 5.5 and to have an relaxed attitude about it. It's not scary, it's fun!
I stopped with the Left Corridor to give you the option to take this wherever you want to take it, you can blow up the wall with the shatter plug-in and go through, shoot laser guns, add a cockpit to the camera, replace the wall with doors that opens and you keep flying through into your own 3D environment, replace the images and make a Star Wars episode out of it, it's all up to you!
I hope you had fun while doing this tutorial, I know I did, while making it I had a hard time to not let my imagination run out of control with this one. The Final project is included in the Project folder. You can look through the file if you have any questions. Feel Free to discuss this technique in the After Effects forum here at CreativeCOW.
I am extremely thankful to Ron and Kathlyn Lindeboom, the herd leaders at the Creative Cow forum for giving me the opportunity to do this. Thank you Ron and Kathlyn.
Click here to see the full effect in Bjorn's demo reel.