← All tutorials

Adobe After Effects Basics - Compositions

After a few more advanced tutorials, I am finally continuing my basics series with this new tutorial covering the fundamentals of compositions and their many uses in Adobe After Effects.

What is a Composition?

A composition is a container for your visual elements. Whenever you want to create a visual effect in Adobe After Effects, you will have to create a composition first. You then add your visual elements, be they images or video footage, as layers into this composition.
You can then modify the layers, blend them together and apply all sorts of effects before exporting your composition into a final video :)

You can also use compositions to group together a number of layers. You do this by pre-composing a number of layers and nesting them in a new composition. This new composition then replaces the original layers.

The advantage of this grouping is that you can now deal with all the layers you pre-composed as a single layer and move them around or apply effects to the entire group.

Finally - to me the most powerful aspect of compositions - is that you can use compositions to create reusable elements for your effects. You add a number of visual elements into a composition and then you can use copies of that composition as often as you want.
If you now change the contents of this composition, you will affect all instances of it across all of your layers!

Setting Up

Before we get into this tutorial, I will assume that you already watched my Adobe After Effects For Absolute Beginners video.

I am going to use 2 pieces of footage for this tutorial:

  • A small clip of a park from my After Effects Explosions tutorial. However, it doesn’t matter what footage you use, just use something that looks cool if you add some explosions to it :)
  • A stock footage explosion clip that you can download for free from detonationfilms.com. You can click this link to download the clip directly

Here’s a peek at the explosion stock footage we will be using :)

Creating Compositions

As you know, to create any visual effect in After Effects, we first need to create a composition that we can drop our footage into.

There is more than one way to create a new composition. You can go to the menu and select Composition -> New Composition. You can also right click into the project window and select the ‘New Composition…’ option from the context menu. If you’re not a fan of menus, you can also click on the little ‘Create a new composition’ icon just below the project window.

Let’s go with the menu option. No matter which option you choose, you will see the Composition Settings dialog box pop up where you configure your new composition.

You can give your composition a name. For this tutorial I will call mine ‘Creating Compositions’.
Make sure you set up your resolution as required and that you set up the correct pixel aspect ratio to match the footage you want to work with. I am going to leave this on Square pixels which suits the footage shot with my DSLR.

You can also change the frame rate either by typing it into the text box or by selecting one of the most common options from the drop down menu. I filmed my footage at 23.976 frames per second so I will leave it at the default setting.

Below that, you can define the start time code. This specifies the start value of the time indicator in your composition. Sometimes it’s useful to alter this, but for this simple tutorial you can just make sure it is set to 0.
At the bottom, can change the duration of your composition to suit whatever effect you want to create. Set it to around 30 seconds.

Finally, you can define the background color used for your composition. This is used for working with your composition only and will not have an effect on how it is rendered. Just leave it on black.
Click OK to create the composition.

You just created a new empty composition! It will be black if you scrub through it, but that’s because we haven’t added anything into it yet. Note that you can see the currently selected composition at the top of the preview window, in the timeline tab and you should see your newly created composition in the Project window as well.

We can now drag our base footage into it and create a new layer. As I mentioned, this is the same clip I used for my explosion tutorial and is just a simple scene of a park. You can use any video you have for this, I chose this footage simply because it suited adding some explosions into it.

Next, drag the explosion stock footage into your composition on top of the base layer.

We now have a simple explosion in the scene, but it looks pretty bad.

It starts out with the detonationfilms logo and has a massive black box around it.

As I’ve shown you already in my After Effects Basics Beginner tutorial, we first want to trim out the first few frames to get rid of the label.

Then we will set the blend mode of the layer to Add to blend it more organically into our scene.

Playing this composition back you should now see a single explosion appear in your scene. I will reposition the explosion and scale it a little bit to sit nicely on the right side of the shot.

Let’s add more explosions! If one explosion is good, more must be better!

Make sure the explosion layer is selected and duplicate it. You can press Control-D (Function-D on a Mac) for this or you can go to the main menu and select Edit->Duplicate.

Move the copy of the explosion to a different part of your scene. I am going to move it to the very left side of the frame. Scale it a little bit and drag it forward on the timeline so it does not start at the same time as the first explosion. Now we have 2 consecutive explosions in our composition.

Repeat the process and add a 3rd explosion somewhere into your scene. I am going to add another into the back of the park and scale it down so it looks like it is further away. It doesn’t really matter where you add it, we just want to have 3 separate layers for our explosions in our composition.
Again, delay the 3rd explosion on the timeline so you now have 3 explosions being triggered.

You should now have 3 consecutive explosions in your scene :)

Let’s add some glow to our explosions! For this, move to a time position where you can see one of the explosions, select it and search for the Glow effect in your Effects & Presets panel on the right side of the interface. Double click on it or drag it onto your explosion layer to apply it.

In the effects properties window on the left side, increase the glow radius to something fairly large like 200, decrease the glow threshold to around 30 and also jack up the glow intensity until you can see the effect clearly.

If we scrub through the footage, you will notice that our the explosion layer we added the Glow effect to now has a nice intense glow to it.

Note that the other 2 explosions do not have the glow effect. To achieve this, we need to apply the same Glow effect to the other 2 explosion layers as well.

Simply select the Glow effect and copy it - either via Ctrl+C or via the menu Edit->Copy - then select the next explosion layer and paste it. Select the 3rd explosion and paste the same Glow effect onto it.

Now all explosion layers in our composition have the same Glow effect.

But this is a bad way of applying the same effect to multiple layers! Let’s use compositions to be a bit smarter about it. First, delete all the Glow effects you applied to the explosion layers.

Grouping Layers and Pre-Composing

Select all 3 explosion layers.

We are going to nest these layers into another composition by pre-composing them. Again you have two options! You can either right click and select ‘Pre-Compose’ from the context menu or go to the main menu and select Layer-> Pre-compose…

I am going to call this new composition ‘Explosion Group Comp’.

Note that we are given two options.

  • Leave all attributes in ‘Creating Compositions’. Choosing this option will leave any effects and transformations we applied to the layer we are pre-composing in the current composition and only nest the layer itself. This option is not available if you are pre-composing more than a single layer.
  • Move all attributes into the new composition. Choosing this option will move all selected layers, any effects and transformations on them into the new composition. Since we have 3 layers selected, this is the only option available to that, but that’s cool. Just click OK.

Note that our 3 explosion layers have been replaced by a single layer called ‘Explosion Group Comp’.

This is our newly created composition and it contains our 3 explosion layers. If you go to the Project Window you will also see the newly created ‘Explosion Group Comp’ composition in there.

You can open the composition by double clicking on it, either in the project window or in the timeline. You will see the 3 explosion layers we pre-composed inside of it. Note that they are still at the same positions and timing as when we originally set them up.

If we now return to our original composition and scrub through the effect, we will see our 3 explosions appear like before. However, they have regained their ugly black boxes! This happened because the new composition we created is set to Normal blend mode.

We can fix this by setting the blend mode back to Add.

Now this might look exactly like it did with our 3 separate explosion layers, but this setup allows us to assign the Glow effect to the explosion Group Comp layer and it will apply to all of our explosions. Again, increase the Glow Radius and Glow Intensity and lower the Glow Threshold so you can see the effect clearly.

We have used the composition to group together our explosions and we can now treat them like a single layer.

Besides pre-composing to nest compositions, you can also drag one composition into another, given that you are not creating a circular reference.
Go back to the project window and drag another copy of the Explosion Group Comp into your composition. This will add another 3 explosions into your scene!

Set the blend mode for this new layer to Add to get rid of the black boxes again. I am also going to flip this layer horizontally so the explosions don’t line up exactly.

Offset this second explosions group by a little bit so we end up with 6 consecutive explosions all happening at different times and in different spots in the scene.

Scrub through your footage and a barrage of explosions should appear! Note that if we disable the visibility a single Explosion Group Comp layer, we hide all elements inside of it. By hiding a single pre-composed layer, we are hiding all 3 explosion layers inside of it.

Have you noticed that only the explosions from our first Explosion Group Comp have the glow effect applied to it? Again if we wanted the Glow effect to be applied to all 6 explosions we will have to copy it across from the first layer onto the second one.

But again that would not be a smart thing to do. Instead, we can pre-compose our layers. Note that we can pre-compose any type of layer, whether it is footage, text, solids, shapes or other compositions.

Before we do this though, first delete the Glow effect from the Explosion Group Comp layer.
Now select both Explosion Group Comp layers and go to Layer -> PreCompose.
I am going to call this new composition ‘6 Explosions’ and hit ‘OK’.

Set the blend mode back to Add on the new composition. This layer now contains two Explosion Group Comp layers which contain 3 explosion layers each.

Since I’m getting bored of the Glow, let’s instead add a Tint effect to the 6 Explosions layer. You can find the Tint effect in your Effects & Presets browser.

Change the Map White To property to a funky colour like blue.

All 6 explosions in your scene are now… um… strange blue puffs! They look like ghost explosions :D

Not particularly pretty, but I just wanted to show you that you are free to pre-compose any elements that you want.

Creating Reusable Elements with Compositions

Finally, let me show you what I consider to be the true power of compositions - creating reusable elements.

If we dig into our Explosion Group Comp (by double-clicking on it) we can see our 3 fireball stock footage elements layers just like we added them into our original composition. Note that each of these elements is essentially the same, they’re just scaled, positioned and timed differently.

With this set up, if we wanted to change the look and feel of the individual explosions we would have to apply effects to each layer separately and that’s not a good way to manage complex effects.

Instead, we should create a composition that contains nothing but our basic building block - a single stock footage explosion element. We can then reuse that composition everywhere where we currently use the raw explosion footage.

What this allows us to do is to change the look of all explosions because we can tweak how it looks inside that very basic composition.
If that sounds confusing, it really isn’t.
Let me show you what I mean!

For this, go to your project window and select the explosion stock footage element. Drag this element onto the ‘Create a new Composition’ button at the bottom of the project window.
This will skip the configure settings dialog box and create a new composition with the same name, dimensions, frame rate and duration as the footage you dropped onto the icon.

As we did with the explosion we added at the beginning of this tutorial, trim out the first few frames of the stock footage to remove the logo.

Now return to the Explosion Group Comp.
We now want to replace all layers that use the raw stock footage explosion with our newly created composition.

There is an easy way to replace a layer: first, make sure the layer is selected. Then select the layer you want to use as replacement - in this case our FireballAgainstBlack01 composition - in your project window. Now, holding down the ALT key on your keyboard, drag this composition onto the layer you want to replace!

Voila! The layer has been replaced, maintaining the timing, transform and all effects that were applied to it.

Select the next stock footage explosion layer and repeat the process: drag the new FireballAgainstBlack01 composition onto the layer while holding down the ALT key. Repeat once more to replace the last layer.
All your explosion layers should now be instances of the FireballAgainstBlack01 composition which contains the explosion stock footage.

If you scrub through the Explosion Group Comp, it should look exactly like it did before with 3 consecutive explosions in different parts of your scene.

Now for why this is a much better setup than what we had initially!
Double-click on the FireballAgainstBlack01 composition to open it up.

Go to a time where you can clearly see the explosion and go over to the Effects & Presets panel. Search for the CC Vector Blur effect and apply it to the explosion stock footage layer.

Increase the Amount to around 30. Feel free to play with some of the other parameters to change your explosion effect until you’re happy!

This will distort your explosion in a very sinewy way and make it look almost like an energy ball. Pretty funky :D

Let’s further shift it away from a natural explosion by colouring it slightly blue. For this, search for the Color Balance effect and apply it to the layer.

Increase the Highlight Blue Balance to around 60 to give the energy explosion a nice blue-ish tint in the bright colours.

Your explosion should now look like a blue energy ball explosion!

If you now return to the Explosion Group Comp and scrub through it you will notice that all of our explosions have changed into the energy ball explosion! If you go to our original composition and play it back you will see 6 energy explosions go off!

And all we had to do was tweak the single composition that contained our base explosion stock footage element!

If you look at our composition setup, we have the 6 Explosions composition which contains 2 copies of the Explosion Group Comp which contain 3 layers with the Explosion Comp each. Explosion Comp layer points to the same composition and therefore, changing this single composition will affect all of its copies :)

Creating reusable elements is where the true power of compositions lie and it is an essential technique for building very elaborate visual effects.

6 Comments

  • Ndhe

    Hi There ( i don't know Yr Name, Yet :P )
    Maybe i'm first who comment here...
    Very Great Tutorial and also Help Me...
    Thanks...

  • Karubaky

    Really great! Thank you!!

  • Nick

    Hey Tobias,
    I've been editing for a little while now and wanted to expand my Affter effects skills. Your tutorials are great! i really appreciate you taking the time to put these together and have the different experience levels to work through. Your the man, keep up the great work!

    • Tobias

      Thank you very much :) Glad you're enjoying my tutorials!

  • Alok Sharma

    Hi!

    Thanks for all the hard work you are putting in .

    Best

    • Tobias

      Thank you very much!