After Effects tutorial: Discover projection mapping to animate photos in 3D

We Are Pitch Black apply camera mapping for enhanced realism

Intro


One of the simplest animation techniques is camera mapping – projecting a picture or video onto a relatively simple 3D geometry. This generates a 3D space, built from nothing more complex than an image or a series of images, that the camera can navigate. Unlike with a traditional take, you can keep refining the sequence after the shot is finished – and it’s very easy to comp in CG and greenscreen elements.

Hollywood films often use camera mapping to apply matte paintings to backgrounds, but as you will see here, the technique can be used front and centre. A fine example is the title sequence to David Fincher’s Panic Room, in which 3D type was composited onto a city fly-through.

In this masterclass, Dimitris Katsafouros and Sotiris Kapnitis –  aka We Are Pitch Black –  show how to create camera maps in Cinema 4D, how to use After Effects to export the textures you need and how to create the final animation. Always ready to mix things up, Dimitri and Sotiris used this workflow to incorporate several different camera moves into of a single time-lapse sequence by Jeremy Goldberg (jeremygoldberg.com), which can be watched below.

To follow along, you’ll need either a still image or an image sequence of a cityscape (if you are working from a video, bring it into After Effects and save it out as an image sequence). Whatever your source, it’s important that you perform lens correction beforehand, as all straight lines must be truly straight for your geometry to be mapped correctly.

Time to complete

5 days

Tools

Maxon Cinema 4D R12 or higher, After Effects CS4 or higher

Step 1

STEP 1

Begin by setting up your animation in Cinema 4D: hit the Edit Render Settings button and enter the dimensions and frame rate for your image sequence. In our case, we used the rate at which we wanted to output the time-lapse sequence.


Step 2

STEP 2

Select the Doodle Object tool (Tools > Doodle > Add Doodle Frame). Set the size to match your frame size and hit Import.

The image will now cover the whole screen. To see through it to the elements we will create, apply a Display tag (Tags > Cinema 4D Tags > Display) to the Doodle Object and adjust the opacity so it does not obscure what you are about to make.

Advertisement. Article continues below

Step 3

STEP 3

It’s important to establish the camera angle of the photograph manually, since this determines how the geometry is built up. Take your time and be as precise as possible. The more accurate the set-up, the less time you will have to spend fine-tuning the geometry later to make it align properly with the source image.


Step 4

STEP 4

Add a camera to the scene and align it to the photograph using the Move and Rotate tools. Once you’re happy with the set-up, lock it (Tags > Cinema 4D Tags > Protection) to avoid messing with it by accident.


Step 5

STEP 5

Start creating your first building’s geometry using primitives. One thing we’ve learned from our experience of camera mapping is that if the buildings or other objects in the photo look close together, you should pack your geometry as closely as possible. If you set things up too far apart, the animation will feature a lot of parallax scrolling that just would not happen in the real world.

Advertisement. Article continues below

Step 6

STEP 6

Keep ‘tracing’ the objects in the image with your geometry. Don’t try to build a complex geometry: with the above building, for example, we didn’t describe every windowpane. Instead we just represented the general shape of the object and then built extra parts using a simple cube with some extrusions and knife cuts. The texture that we’ll apply later (above right) takes care of the rest.


Step 7

STEP 7

Background objects can be created as simple planes, as the results will seem realistic given how far away these objects are from the camera.


Step 8

STEP 8

Once all the geometry is ready, it’s time to create textures. Since the textures have to be animated, we will use After Effects; if you’re working with a single image you can use Photoshop to replicate the technique that we are about to explain. Note also that if part of a building is blocked from view but will be seen as the camera moves, we will need to create that area.

Advertisement. Article continues below

Step 9

STEP 9

Create a new composition in After Effects, selecting the resolution and frame rate based on your source material or desired output (we chose 2048 x 1365 at 24fps).

Load your video or sequence. If it’s a jpg image sequence, ensure the JPEG Sequence option is selected as this will load up all of your frames and treat them as a single clip.


Step 10

STEP 10

Every layer you create in After Effects will represent a texture for a piece of geometry in the Cinema 4D scene. In our piece, we needed to create a total of 21 layers, including a clean plate for the sky and the visible surfaces of the buildings in front. Use the following steps to make textures only for the areas you know will be visible.


Step 11

STEP 11

Duplicate your footage. With the Clone Stamp tool (Cmd/Ctrl + B), Alt + select part of one of the buildings as the area to be cloned, and extend the building to the ground. Try to be as precise as possible.

When you’re done, skim through the animation to make sure the duplication of the area isn’t obvious. If it is, either tone down the cloning by reducing the opacity or delete it altogether and start again.

Advertisement. Article continues below

Step 12

STEP 12

Repeat Step 11 for each of the foreground buildings, sets of background buildings and to create the clean plate for the sky (as shown above).


Step 13

STEP 13

Now export all the building textures to separate movies. Create some rough masks around the foreground objects since the buildings’ geometry will eliminate the overspill. For the background buildings, we’ll need more accurate cutouts as they will be projected onto flat surfaces. You will also need an alpha channel for each of these layers to use as a mask in Cinema 4D in order that the background shows through, so export these too.


Step 14

STEP 14

Return to Cinema 4D. Open the Projection Man window (Window > Projection Man). Drop each piece of geometry onto the camera in this window. Choose New Bitmap for each but instead of selecting the appropriate movie, select a jpg instead (any jpg will do) as there’s an annoying bug in Cinema 4D that doesn’t allow you to load a video as a texture initially. Edit the material and load up the movie file.

Advertisement. Article continues below

Step 15

STEP 15

It’s time to create and set up the camera that will be used for animation. To make the animation process easier, it’s preferable to use the camera inside a null object. This way you can control the camera’s movement using its own coordinates, while the null object governs the camera’s orientation. This means you can create this scene using just two keyframes. Set your start and end positions and animate the camera.


Step 16

STEP 16

Hit Render and you’re done. To have as much flexibility as possible, we then added segments of fast and slow motion in After Effects and rendered the final animation at a fixed frame rate.


About the artist: We Are Pitch Black

STEP 17

We Are Pitch Black is a multidisciplinary design studio in Athens, Greece. Headed up by Dimitri Katsafouros and Sotiris Kapnitis, the team loves to work on all sorts of projects – from traditional graphic design work to motion graphics and ultra-contemporary illustration. They have a passion for all things creative, and often discuss technology, music, movies and the effects that didn’t quite come off as intended in the latest blockbuster.

Contact

wearepitchblack.com

Advertisement. Article continues below