One of the outstanding features of Adobe's After Effects v 5.5 is its ability to create and use 3D space to develop a motion graphics composition. While After Effect comes with 3D cameras, lighting and scene development, it also permits you to directly import camera motion and objects created within Alias|Wavefront's Maya 4.
This technique is quite useful if you have to composite or work directly on elements within a 3D rendered file; for example, you have a rendered scene that places certain objects in motion relative to a camera. You can use this scene info directly from Maya 4, and replace nodes while keeping the same camera movement and views in your motion graphics composition in After Effects. However, being able to actually do this isn't as straightforward as it could be. So we developed this tutorial to walk you through some of the important steps in this process.
In this particular tutorial, we use Maya 4 and After Effects 5.5 Production Bundle. Shortly, Maya 4.5 will be out on Mac and PC platforms, but for now, we'll focus on the PC version of Maya 4.
|---What You Need to Get---
Obviously, having both Maya 4 and After Effects 5.5 Production Bundle would be very helpful. We've created some work files in Maya 4 that you can import into After Effects if you don't have Maya already. In the near future, Maya 4.5 will be released for both Mac and Windows platforms, so the files can be opened in that version. But since Maya 4 was only a PC version (the Mac OSX version of Maya 3.5 is not fully compatible with the Windows version of Maya 4), bear with us on the file formats.
Here are the files related to this project (download the files from the green bar above.):
- Maya_to_AE.ma -this is our sample scene file from Maya 4;
- Maya Camera Import.aep -this is the sample After Effects composition;
- a.jpg, b.jpg, c.jpg -these three files are the sample layers used in the *.aep file.
|---Things You Do in Maya---
First off, we won't even pretend to try to teach you how to use Maya... we make the assumption that you know enough about the user interface and feature set to get by. But here's a thing to keep track of: as you work in Maya 4, remember that in your world coordinate system, the Z axis is where your face is pointing, so use your Channels Box to double-check things if you get lost.
1. Use a Locator
Go to Create>Locator. This places a reference in 3D space for you to observe the orientation
of your object. This orientation of the XYZ axes will be imported and used directly with After
Effects later. In our example, we created three instances of the locator by duplicating the first one by typing the CTRL-D keyboard equivalent in Windows.
2. Name Your Locator Correctly
In order for After Effects to read the information properly, it is important to conform to the following naming convention:
null_XXXX; where XXXX can be any text or numbers.
For example, some valid names are null_object23, null_strawberryjam, null_trythisout. Each of these has the correct prefix. Some invalid names (ie, ones that can't be read by After Effects) would be nullthingy03 (no underscore character) or meteorfrag6 (no null_prefix).
In our basic scene, we simply placed the three locators in the 3D space. But, you have the potential to change the orientation of the axes of the locators, rotate them, or position them as you wish. The eventual choices are up to you. Use the Outliner Box to change the name of the locators to valid names that you understand.
3. Create the Camera
Go to Create>Camera, or click on the Camera icon on the Shelf. As you move your camera, be aware that the properties you key in the Channels Box will be the only things that are keyframed within After Effects.
Take a good look at your locators; notice how they show the alignment of their own XYZ axes within the World View. These locators are going to be considered as NullObjects in this tutorial, since when you import them into After Effects, you will replace these NullObjects with graphic elements of your choosing... video layers, still images, precomps, etc. Set your camera path to animate using these NullObject positions as reference markers for now.
4. Bake the Simulation
Once you have the Camera selected, go to Edit>Keys>Bake Simulation. You must do this or AE won't read the file correctly! AE does not read information from the Perspective View, so Baking the Simulation is the only way to get After Effects to read this scene info directly.
5. Set the Composition Size
Go to Window>Rendering Editor>Render Globals to set the resolution. It is critical to match the comp size here before you migrate into After Effects. This will save a lot of grief later!
Under the Resolution Tab, set the Width & Height to match up to what you want to work with inside After Effects. If you do not do this, then you may face all sorts of size and aspect ration problems, since your Maya file may not match to anything you require within After Effects. As long as you plan ahead, you can streamline this process greatly.
6. Save the 3D Scene
Save the scene file as a *.ma file. Now you are ready to bring it into After Effects.
|---Things You Do in After Effects---
OK, now that you have your scene saved in Maya, you can start to think about bringing it inside After Effects. Here are some things to watch out for...
- this is not perfect. There are some problems that pop up during import, that at times cannot be explained, at least not by us. Don't send hate mail. We get confused too. -with large scene files, After Effects can really bog down. Slow down and wait for it to catch up to you on import... remember that After Effects is processing a huge amount of data, so this is not like a standard 2D file import. If you encounter some of these problems, you may be working on a machine that cannot adequately handle the data load, since this import is a very highly memory and processor intensive task.
- save often. It's not only smart, but it makes sense not to lose track after all this effort!
1. Import As Comp
Begin by starting After Effects 5.5, and creating a new Project (File>New Project).
Locate the *.ma Maya file, and import it as a Composition. -from time to time, this may not work... a work-around is to physically drag it from the desktop to the Project Window. Under the Resolution Tab, set the Width & Height to match up to what you want to work with inside After Effects. If you do not do this, then you may face all sorts of size and aspect ratio problems, since your Maya file may not match to anything you require within After Effects. As long as you plan ahead, you can streamline this process greatly.
In our sample, we've included three sample files (JPGs of the letters A, B and C). Go ahead and replace the three NullObject layers that you have in the Composition with these sample files.
To do this, highlight the Timeline Window, and select the NullObject layer you want to replace. Then go to the Project Window and hold down ALT and then drag the desired footage onto the Timeline Window layer you want to replace (for Mac users, Option-DRAG) and replace the three NullObject layers with the A, B and C sample .JPGs.
2. Change the Anchor Point Locations
Once you replace the three NullObject layers with the sample files, you will notice that the Anchor Point axes are now located at the top left corner of these image planes. Hmmm, this is going to get confusing! A simple solution to this will be to adjust the center coordinates of the image plane to match to the location of the Anchor Points, since the Anchor Point position will not change. Here goes...
- select all three layers with the sample images so they are highlighted in the Timeline Window.
- type the letter A on the keyboard to toggle the Anchor Point Property for all three layers. Move the Anchor Points so that they align to the center of the layer objects. If all your layers are different sizes, then of course you'd need to do this one layer at a time.
Since you can get the file dimensions from the information in the ProjectWindow, you can easily calculate the layer's center coordinates (ie, half the height and half the width) to get the pixel values for center. Type this into the Value for each of the layers you are working with. Since all three layers are the same dimensions in our example file, you can do this step all at once for all three selected layers.
3. So, Why Can't I See Anything?
The simple reason, although we certainly don't claim to know why it is set this way, is that the Transparency is set to ZERO by default.
- since all layers in the Timeline Window are selected, type the letter T to toggle the Opacity (Transparency) Properties.
- set the Opacity value to 100% and bingo -- there are your layers in the Comp Window!
4. Season to Taste
Now that you can see what is going on, you can Preview your composition by hitting the Zero key on the numeric keypad, up to the limits of available memory. Remember that you can reduce the resolution and comp size in the Composition Window if you are running low on memory.
Try these basic ideas:
- use Blending Modes to make the layers interact as the After Effects camera moves through the Composition.
- if the layers are still too big, scale to size.
- change the position of the NullObjects to fit the new scene. Remember that the Camera info is there... but where you place objects and layers in relation to what the Camera is doing is up to you. Have fun!
A copy of the final After Effects animation can be viewed here.
René de la Fuente and Will Scates are part of a design collective known as The Cellar Door Experiment, specializing in postfx clean-up, compositing and 3D animation here in Phoenix, Arizona. If you have questions, you can reach us at email@example.com. We will do our best to answer all your emails as promptly as possible.
René de la Fuente
---Will Scates, René de la Fuente
Please discuss question regarding this tutorial in either the Maya forum or the After Effects forum at CreativeCow.net.