Close
    Search Search

    Create a parallax effect with After Effects

    Create a parallax effect with After Effects By Digital Focus (Create a parallax effect with After Effects@Lesnums), Samuel Boivin Posted on 17/01/17 at 09h00 Share:

    If you are accustomed to slideshows or the integration of photos in a video, you are surely aware that it is often flat and daunting, due to the lack of volume of the photo. Very often, to animate your images, you only have the option of zooming in or zooming out. In this tutorial, we will learn how to create animations of depth in your photographs thanks to the parallax effect.





    Definition

    The parallax effect is a visual effect that consists of simulating 3D in a 2D image. It is often used (and you must have seen it before) in photo slideshows or documentaries. This effect creates camera movement, or even subject movement, in a still image, giving the impression of 3D. This is called the "2,5D" effect.

    Prerequisites

    For the parallax effect to work properly, you need to use a photo that has at least a well-defined foreground, midground, and background, preferably with a landscape orientation.

    On the software side, you will need to use Photoshop (or equivalent) and master the clipping via layer mask, as well as the duplication tools. And of course you will need After Effects, with which we will use the camera effects in 3D space.

    Clipping in Photoshop

    Now that you have chosen the photo you want to animate, you need to separate the planes by clipping them in Photoshop. If you are not very comfortable with clipping, it is strongly advised not to choose a photo that is too complex to start with.

    On the photo above, we can easily distinguish 3 plans:
    – the foreground, made up of vegetation,
    – the second shot or medium shot, including the rock and the person on it,
    – finally the background, made up of the mountains and the sky.

    For clipping, duplicate your photo in as many planes that compose it and isolate them using fusion masks. At first, do not hesitate to roughly outline and then refine, or even completely remove an unnecessary or complex element. This is the advantage of clipping with a layer mask: the modifications are not final.



    Once the planes have been clipped, use Photoshop's fill function (Edit menu > Fill) to fill in the gaps left by the excluded areas. It is important to improve some inconsistencies with the Healing Brush tool or the Clone Stamp to refine the connections. It is mainly the seams that will be visible in your animation.

    Editing in After Effects

    Now that your PSD file with the different planes is ready, it's time to put them together in After Effects. To do this, create a new project and import your PSD into a new composition, like below.

    At this point, you find your Photoshop layers in an After Effects composition. Start by converting them into 3D objects by checking the cube icon on the right of the layer. Also remember to check that they have been imported in the correct order, that is to say the foreground at the top of the list, and the background at the very bottom.

    To animate your image, create a camera by going to the "Layer > Create > Camera" menu and choose the "35mm" preset.

    Once your layers have been imported and your camera created, you will have to generate the impression of distance by spacing out your different layers. Right now, your image is still flat, and if you play around moving it around, you'll find the effect is non-existent. To obtain it, and in order to better visualize and understand the changes you are going to make, divide your preview space into 2 views. On the left window, you will then see the location of your different layers in space and the angle of your camera.



    Your "medium plane" layer being your main subject, it is advisable to leave it at level 0 of the workspace. On the other hand, you will have to move your foreground towards the camera, and move the background away by modifying the 3rd position factor in the "Transform > Position" menu of the layer concerned.

    As you can notice, by acting on their placement in depth, the layers have grown or shrunk. It is now necessary to modify their scale to readjust them and restore them to their original size. Pretty much your image in the preview should look like your original image.


    On the left, the long and close shots. Same thing on the right, once these are put back to the right scale.

    Before moving on to the animation of the camera, it is possible to operate a final cleaning of the layers. As you noticed in our example, the details in the foreground branches weren't cropped very well in Photoshop. Once in After Effects, it is possible to repair this detail in a very simple and effective way, by applying the "Masking by color" effect to the layer (Menu Effect > Masking > Masking by color).

    Using the eyedropper, select the color to exclude and adjust the Tolerance and Smoothing level as necessary until you achieve the desired effect. If necessary, and in order not to degrade the image quality too much, duplicate this effect and go in stages.


    At the top, before applying the color masking effect and at the bottom after applying the effect.

    Now it's time to animate the camera and finally create your parallax effect. Start by moving the footage slider back to the beginning if you moved it. Then activate a key image for the "Target point" and "Position" values ​​which are those used to move your camera. Now move the cursor to the 5th second, for example, and create keyframes by changing these two values ​​according to the effect you want to create.

    This is when you will be able to see if the empty areas of your layers are filling enough or consistent. Indeed, with the movement of the camera, you will visualize the areas that you have filled in Photoshop, if necessary return to the software to retouch them, and update your layers in After Effects in order to update them according to the modifications. Once the movement of the camera is well adjusted, you can optimize and smooth it by selecting all the keyframes and pressing the F9 key.

    If you like the rendering, all you have to do is export it in the format of your choice to integrate it into another composition, or convert it to an animated GIF to share your photo in 2,5D.

    Of course, in this example, it is only a very simple editing in order to become familiar with the concept, but it is possible to go much further by multiplying the layers of plans and the camera effects under After Effects. You now have the keys to take control of this effect and let your creativity speak for itself!

    Create a parallax effect with After Effects, part II: add movements in the image

    add a comment of Create a parallax effect with After Effects
    Comment sent successfully! We will review it in the next few hours.