In-Depth

Understanding The Render Order In After Effects

by

A few years after my first light saber, I learned how to track footage, then eventually I was able to put in a cheap animated 3D spider robot... I was getting to the place where I thought I knew the basics of After Effects pretty well. Then one day my professor at college told us briefly about render order in After Effects... I found this fascinating and wanted to know more. Today we'll do some experimentation and go through After Effects' render order!

What is the Render Order ?

It's just the way After Effects proceeds from the source files to the rendered footage (in the RAM or in a file). In other words, it's the order in which all the calculations are made by After Effects in processing your source files to get the rendered footage in your composition window, or in your exported file.

In order to fully understand this concept, remember that a video clip or a digital (rasterized or vector-based) picture, is just math. If you think that a pixel is a small square or rectangle with a unique color... you are wrong. Or should say, you're not quite right. Before being graphically represented like this, pixels, vector-based pictures and video clips are numbers, the way all digital data is.

After Effects is software which is able to tweak, modify, and change those numbers in lots of different ways. All the processes are based on algorithms.... Effects are algorithms... the Camera Layer is based on algorithms... Motion Blur is even based on algorithms.

Okay, so everybody already knows that, but what I wanted emphasize here is that your final rendered video is the result of all the algorithms that you apply on your source footage which is calculated one after the other. After Effects doesn't show you the intermediate states of the processes on your picture, it just displays the final result. And because After Effects is based on non-destructive editing, learning how After Effects works is a useful skill that can really help you improve your workflow.

An hexadecimal representation, by Henkster on stock.xchng.

A Basic Comp, Step by Step

To get a better idea of the concept, we will take a simple experimental composition which we can see below, with layers, a Track Matte, two Pre-comps, Effects, an Adjustment layer, 3D layers, a Blending Mode, a Light and a Camera. In a composition, the layers are calculated from bottom to top and non visible layers are not calculated. Don't forget that the composition has a default mono-color background which can be rendered if need be (but it can blend with the layers, using Blending modes). So, to understand the render order of a composition, we first need to understand the render order of a layer.

Our beautiful test composition based on the AE CS5 logo.

The First Layer

Here, it's is the AE CS5 logo in PNG format. It could be any kind of layer or source material. The first step for After Effects consists of decoding your picture :codec, pixels, fields, frame-rate etc...

The AE CS5 logo.

Just after that, comes the Masks. Here is just a circular Mask around the "AE". The Mask are rendered from top to bottom. So if you have two Masks, the second is relative to the first.

Then the Effects of our layer is calculated. Here we have a Bevel. As you can see, the Bevel is applied at the edge of our Mask. It shows that Effects comes after the Masks. If there were several Effects, they will be applied from top to bottom.

The Transform properties are applied right after the Effects. This way, the Scale, Opacity, Position etc... of the Effects are relative to the layer Transform properties.

Then, there is the Blending mode. Here it's just the normal mode, because it's the bottom layer. The other modes are useless in this position.

Now that our first layer is calculated, we can continue with the rest of our composition.

The First Layer of our Comp.

The Rest of the Comp

Next comes the Track Matte. The Track Matte layer is calculated completely (Masks, Effects, Style) and then the Matte is applied to our first layer. Here, our Matte is a pre-composition, in which the letters of the logo are white. In fact, the Pre-composition is calculated first, before any layer of the composition. As you can see, the Bevel effect is not applied to the letters of the logo. That proves that the Effect of the bottom layer is calculated before the Track Matte. Note that a Track Matte cannot be applied on a 3D layer if that latter has a Layer Style (that's why there is no Layer Style in our first layer). Note also that the Style Layer of a Track Matte does not take into account if that Track Matte is 3D. Anyways, using a 3D Track Matte on a 3D layers isn't really a good thing, but this is just for the experimentation.

The Track Matte in Action.

Next in our composition appears the Light layer. The Light layer deals with the 3D layers, casting their shadows and illuminating them if they are in its beam. That means that the visual appearance of a 3D element changes after it was calculated in 2D. To avoid problems, be sure that your Track Matte, (if it's in 3D) doesn't accept lights and shadows.

Then, Camera layer. I don't think it's necessary to explain how it works here.

The Light and the Camera.

Next in our composition comes our Adjustment layer which affects the layers under it (except Camera and Light layers) in a 2D way (it flattens the composition). Below I've applied the Glow and the Curve effects.

The Adjustment Layer : a Curve and a Glow.

Next comes a simple Grey Solid with a colorful Gradient effect applied to it. Note that the Blending Mode is applied after all process done on the layer, except the Alpha layer.

The Blending mode of the layer come after the Effects.

Finally, the Motion Blur is applied, depending on the camera movement and the layers movement. Here, there is none.

Particular Cases

The Continuously Rasterized Vector Layers

For that kind of layer, the Transform properties are applied before the Effects. That means that the size of the Effects (as a glow, a blur, a fractal noise...) are not relative to the size of the layer. The trick is putting your layer at the right size, and then link the "size" (length, radius, or other properties like that) of your Effects to the scale of the layer.

Don't forget that the Transform properties can be applied as an Effect, if needed. Just go to the Effects panel and write Transformation. This can be useful in some cases.

Also remember that the shadows of that kind of layer don't take into account the Effects applied to that one.

When the Scale grows up, the relative Scale of the Fractal noise stay the same.

Pre-composition

If you check the "Collapse Transformation" for a pre-comp, the Transform properties will be calculated before the Masks and Effects. It's basically the same thing as the Continuously Rasterized Vector layer. But the point here is to collapse the Transform properties of the containing composition with the Transform properties of the layers in the Pre-composition, in order to keep the best quality. Be careful: if you put that Pre-composition in a 3D comp, all your layers (in the pre-comp) have to be in 3D (so, no Adjustment layer...).

The Continuously Rasterized button for a vector layer becomes the Collapse Transformations button for a Pre-composition.

The Shape Layers

With a Shape layer, the group at the bottom is calculated first, and the shape at the bottom of a group is calculated first. Then, the Path operations are calculated from top to bottom. And then, the Paint operations are calculated from bottom to top (they use Blending Modes, like the layers), but we can change that in selecting "Composite : Above Previous in Same Group."

The shapes at the bottom are calculated first.

Parent, Child, and Link between properties

If a value depends on the value of an other layer (for example, if one layer is child of an other, or if a value is linked to an other), the reference is calculated first.

Layer Styles

They are calculated from top to bottom after the layer Blending Mode, with their own blending mode. We could think that, because the Transform properties are calculated before, the Interior-glow will not rotate if I rotate the layer... But, the glow seems to rotate as if it was applied before. To see what really happens, just put the noise of your Interior glow at its maximum level, and rotate your layer. You can see that the noise doesn't rotate. The layer styles are calculated after the Transform properties.

Note that the opacity of the Layer Styles is relative to the opacity of the Layer. Once again, the Transform properties are calculated before.

If you want that the Interior Styles use the Blending mode of the layer, you can select "yes" to the Blend Interior Style as Group in the Advanced Blending options. It doesn't change the render order.

Layer Styles uses the Track Matte of the layer too. This one is calculated before the Layer Style.

The style come after the Track Matte, so after the Transform properties.

Preserve Transparency

This is last process calculated by AE to render a layer.

Preserve Transparency, last in the chain.

Conclusion

Deeply understand the After Effects' render order is not such an easy process when we have a complex composition with a huge variety of layer types, styles, 3D, pre-comp and vector pictures.

This sums up the different render orders based on our experimentation in After Effects :

Rasterize Layer Render Order

• Source
• Masks (from top to bottom)
• Effects (from top to bottom)
• Transform
• Track Matte
• Blending Mode
• Styles (from top to bottom, with their own Blending mode and Opacity relative to the Transform properties)
• Preserve Transparency

Continuously Rasterize Vector Layer and Pre-composition Render Order

• Source
• Masks (from top to bottom)
• Transform
• Effects (from top to bottom)
• Track Matte
• Blending Mode
• Styles (from top to bottom, with their own Blending mode and Opacity relative to the Transform properties)
• Preserve Transparency

Shape layer Render order

• Groups (from bottom to top)
• Inside a group : Paths (from bottom to top) and Paths Operations (top to bottom)
• Inside a group : Paint (default : from bottom to top; depending on the Composite parameter)
• Inside a group : Transform properties
• Transform properties of the Layer
• Effects (from top to bottom)
• Track Matte
• Blending Mode
• Styles (from top to bottom, with their own Blending mode and Opacity relative to the Transform properties)
• Preserve Transparency

Composition Render Order

• Background color (if needed)
• Pre-composition
• Other Layers (from bottom to top)
• Lights
• Cameras
• Motion Blur
• Audio

For more technical details, you can go the Adobe Help online and see these articles below. I suggest that you test all the information issued in this tutorial or the Adobe Help to really understand how it works.

I hope you enjoy that article. Feel free to use my After Effects project for your own experimentation. :)