How to Create a Parallax video from Photos Using After Effects and Photoshop
Here’s a tutorial showing you how to create cool motion and depth from a static photo.
Parallaxing can produce beautiful videos that work really well as landing page backgrounds, as well as in promo videos, Instagram posts and whatever else.
This technique has been a popular trend in digital design over the last decade and is still a great way of bringing life to static photos.
For this tutorial I’ve chosen to animate this beautiful photo by Nicolas Picard.
Let’s get started.
Step 1 – Choose the right photo
Parallaxing works by moving cut out elements of a photo around to create the illusion of depth. Some photos work better than others, just because their composition already has a really clear depth to them. When you’re choosing a photo, look for something with a strong foreground element, like a figure, and look for a background behind it that looks like it’s far away from the foreground. Try to avoid using a busy background because it makes things complicated later.
This pic I’ve chosen is ideal:
- Strong foreground image (biker)
- Strong background image (crowd)
- Super easy to cut out (flat background colour)
Step 2 – Setup a Photoshop file
Open up your photo.
Adjust the width of the image so it’s 2000px wide and make sure resolution is at 72.
Before we cut this photo out into separate layers, it’s useful to envisage how they’ll be interacting with each other:
- Foreground (pink)
- Background (blue)
To make the illusion of depth more real I want to get these coloured areas to overlap.
I’ll have to cut out everything in between the bike’s wheel spokes carefully so that the background will show through.
Step 3 – Prepare the foreground
Make copies of your layer before cutting it (in case we mess it up)
Because the sky behind the biker is a flat colour I’ve used a clipping mask technique to cut it out.
That might be appropriate for your image. If you have a busy background then use the pen tool to cut out your elements. You’ll get super-crisp lines that’ll make the parallaxing look convincing. If you’re pressed for time, use the ‘Quick Selection Tool’, but stay away from the Magic Wand which sucks.
Step 4 – Prepare the background
Now that we’ve made a layer for the foreground, we need to remove traces of it from the background.
Let’s make another copy of the background layer in case we mess it up.
The ‘Clone Stamp Tool’ works perfectly in this situation because the background is a flat colour and you can easily match the surrounding area.
With the brush tool selected, hold down ‘Alt’ and click in the surrounding area. Now start painting over the foreground pixels until it’s all gone. You’ll probably need to readjust the clone brush’s position every so often. Down worry if some bits look a bit suspect. We just need it to look good at a glance, not perfect.
Now we have our layers prepared. Let’s move the foreground around to see how it’s going to look. Now save each layer as it’s own file. The foreground needs a transparent background so save it as a .psd file.
Step 5 – Set up an After Effects file
Open up After Effects.
Start a new composition.
Right click in the Project box and click ‘Import’ > ‘File’ and add both of your graphics here.
Now click ‘Composition’ > ‘New Composition’ and use the following settings. The width of the composition is the same as our original photo, it’ll be 30 frames per second and will have a duration of 5 seconds. Click ok.
Next, double click on your composition in the project panel and drag both your graphics into it. Make sure that your background layer is below your foreground layer
Let’s make both images slightly bigger than the composition’s artboard. The layers are going to be moving around slightly so we don’t want any dead space appearing around the edges. Notice that the composition isn’t as tall as the original photo. I’ve actually pushed the bike down so it’s overlaying the figures in the background to get that illusion of depth working.
Step 6 – Create the movements
We’re ready to animate now. A pretty good way to do this is to make the foreground gradually bigger and move upwards, and for the background to become smaller and move downwards. You can try this and then if it doesn’t look right, just keep tweaking the animation until it looks good.
There are two changes that we’re going to apply to each layer to get this effect:
Click on both layers and hit ‘P’ (this brings up the layer’s position info)
With the current time indicator set to the start of the timeline, click on the timer symbol to add a start position.
Now move the current time indicator all the way to the end of the timeline.
With just the background layer selected, drag it ever so slightly upwards in the composition. You can also alter the Y coordinates (shown in blue).
Hit the diamond shape to add these new positions to the timeline.
Now if you play the video you’ll see the background layer move. Now click on the biker layer and make similar changes to it’s position with the same technique, but this time moving downwards.
Once you’re done, play back the animation to see how it all looks.
To edit the scale of both images, move the current time indicator back to the start, select both layers and hit ’S’ (this brings up the scale info) to set the starting scale.
Move the current time indicator to the end of the animation and make the biker bigger and the background smaller, by editing the scale statistic and clicking the diamond when you’re finished.
Here’s how our video looks at the moment (left). It’s alright, but it’s not what I wanted.
By adding in some horizontal movement and motion blur to the layers (right), it’s starting to look good.
I’ve also made the biker rotate slightly by altering the rotation (R) coordinates, to make it look a bit more realistic.
Once you’re happy with everything, add the composition to the render queue, choose your output folder and hit the render button.
That’s the tutorial complete! The resulting video’s quite short, so for the best result create two or three short compositions and stitch them all together to make a longer video. Here’s the final result I made using an additional bmx stock photo.
Thanks for reading, hope it was helpful!