Advertisement
  1. 3D & Motion Graphics
  2. Motion Graphics
Cgi

Create And Composite A Mobile Phone App Demo Template

by
Difficulty:IntermediateLength:LongLanguages:

In this tutorial you will learn the workflow on how to set up a scene for an animated pack shot of a phone in CINEMA 4D and composite it in After Effects. Perhaps you have developed a revolutionary iPhone app that you want to show off to the world, or maybe you just want to learn the basic workflow of compositing 3D passes in After Effects. Either way I hope this tutorial will help you along the way.


We'll start off by setting up the scene in CINEMA 4D, animating the phone model and go through the necessary render settings for getting our files into After Effects. After that we'll compose our scene in After Effects using luma and alpha mattes. We'll also create a background and a reflection on the floor using a few simple steps.

The phone model used in this tutorial is made by Anders Kjellberg who runs Dogday Design. You can download it for free from here.

Step 1

Start by creating a new scene in CINEMA 4D. In the Top Menu go to Render>Render Settings… or hit Command + B. In the render settings choose Output and check the Camera Width and Height. I put up the camera to be 1280 x 720 for this tutorial.

.

Step 2

Now let's add our phone to the scene. In the Top Menu go to File>Merge… or hit Command + Shift + O and choose your phone model from the project files.

.

Step 3

Now when we have our phone in the scene we'll need to create a new Plane Primitive that will represent the content of our display.

.

Step 4

Double click the Plane you just created in the Objects Manager to rename it. Let's call it "Display". Parent it to the phone by dragging and dropping it within the phone hierarchy.

.

Step 5

Change to front view and change the Orientation of your Plane in the Attributes Manager to +Z so it lines up with your phone. Make sure the Plane is big enough to fill out your screen. In this tutorial the Plane is 111 x 168 cm but the size may vary depending on the scale of your scene and the model of your phone. Reduce the Width and Height Segments to 1.

.

Step 6

Change to Right View and push the Plane back slightly so it's just behind the glass of our screen. Go back into Perspective View.

.

Step 7

To get the data that we need for compositing our screen in After Effects we need to add an "External Compositing Tag" to our Display Plane. To do this, select your Display Plane in the Object Manager and from the top menu of the Object Manager go to Tags>CINEMA 4D Tags and find the "External Compositing Tag" in the list.

.

Step 8

We need to make some adjustments to the Tag's settings so Click the Tag, next to our Display Plane in the Object Manager to reveal it's settings in the Attributes Manager. Make sure the checkbox "Solid" is ticked and adjust the Size X and Y so it matches the size of our Display Plane. In this case the Size X would be 111 and the Size Y would be 168.

.

Step 9

We also need to add an Object buffer to our Display Plane. The Object Buffer will let us Composite the display separately in After Effects later. To do this select the Display Plane in the Object Manager and go to Tags>CINEMA 4D Tags and choose "Compositing Tag" from the list.

.

Step 10

Click the "Compositing Tag" in the Object Manager to reveal it's settings and press the tab called "Object Buffer". Enable the checkbox for "Buffer 1".

.

Step 11

Since the frame around the phone is made from a different material than the glass at the front and back of the phone, we might wanna composite it separately in After Effects. Therefore we'll group the parts "Frame", "On/Off", "Ring/Silent" and "Volume up" by selecting all of the elements and hitting Alt + G. This will create a Null Object containing all the parts of the frame. Double click the Null to rename it. Let's call it "Frame".

.

Step 12

Add another Object Buffer to the Frame-group by adding a Compositing Tag. This time we'll enable "Buffer 2".

.

Step 13

To make this shot interesting we're gonna animate our phone and add a camera to our scene. Close the Render Settings and select the group called "iPhone" from the Object Manager. In the Attributes Manager, under the tab "Coord." set a keyframe for the Heading Rotation (R . H) by Command + Clicking on the small "o" next to the setting. Make sure the Time Indicator is at frame 0.

.

Step 14

Now move the Time Indicator to frame 25 and write 360° in the Heading Rotation. Make another keyframe by Command + Click on the small "o" again. We should now have the phone rotate around it's own axis 360°.

.

Step 15

We also want to animate the scale of the phone so that it scales up as it rotates. To do this, make sure you have the iPhone Group selected and that the Time Indicator is set to frame 25 and add a keyframe to all of the axes of the Scale Settings (S . X/Y/Z) just as we did with the rotation.

.

Step 16

Now move the Time Indicator back to frame 1 and change the Scale Settings to 0 in all axes and add new keyframes.

.

Step 17

Add a Camera to the scene from the Light Object Menu.

.

Step 18

Activate your Camera by Clicking on the little black icon in the Object Manager.

.

Step 19

In the Attributes Manager of your Camera change the Focal Length to about 15 and position the camera closer and slightly below the phone. This will give us a bit of foreshortening and more interesting perspective to our animation.

.

Step 20

Add an Area Light from the Light Object Menu.

.

Step 21

In the Attibutes Manager of the Area Light, under the "Details" tab make sure the Show in Reflection checkbox is ticked. Also change the Size for X and Y to 500.

.

Step 22

Switch between the Top View and the Right View to move the Area Light away behind the Camera. Rotate it so it faces the phone. This will give us a nice looking reflection in the glossy display. You can play around with the position and the rotation of the Area Light as well as the X and Y Size until you get a look that you like.

.

Step 23

Copy the Area Light by holding Command while dragging the light in the Object manager.

.

Step 24

Move and rotate the new Area Light so it mirrors the position of the other light, but move it further away and further up from the Camera to even out the light a bit. You might also want to uncheck the Show in Reflection checkbox on this one so it doesn't interfere with the reflection from our previous Area Light.

.

Step 25

Now go into the Render Settings by choosing Render>Render Settings… in the Top Menu or hit Command + B. Press the "Multi-Pass…" button and choose "Object Buffer" from the list.

.

Step 26

Tick the checkbox for Multi-Pass and make sure that the Object Buffer Goup ID is set to the same number as the one you enabled in the Compositing Tag of the Display Plane. In this case the Group ID should be set to 1.

.

Step 27

Add a second Object Buffer for our Frame-group by repeating the process and setting the Group ID to 2.

.

Step 28

To get full control of our render in After Effects, we'll need to add multi-passes for Reflection, Diffuse, Specular and Shadow. Add them from the "Multi-Pass…" button.

.

Step 29

Under "Output" make sure that Frame Range is set to All Frames

.

Step 30

Under "Save", specify an Output Path for your Regular Image and copy the path for you Multi-Pass Images. Tick the checkbox for Alpha Channel and untick the checkbox for Multi-Layer File.

.

Step 31

Under "Compositing Project File", tick the boxes for "Save" and "Include 3D Data". Also make sure that the Target Application is set to After Effects. Then press the button "Save Project File…" and specify a path for the file to be saved at.

This will save a project file for After Effects that include all your Multi-Passes and exported 3D data from CINEMA 4D. This will include your camera and any lights you might have in the scene. For the Data to be exported properly you'll need to install the Exchange Plugins for After Effects. You'll find them in your Maxon directory.

.

Step 32

Render the scene to the Picture Viewer by hitting Shift + R or by pressing Render>Render to Picture Viewer in the Top Menu.

.

Step 33

When your scene is rendered, open up the After Effects Project that you saved from the Render Settings in CINEMA 4D. There are three folders in your Project Files. Reveal the files of the Folder that's named after your Project File. Open the Composition within.

.

Step 34

You'll notice that there's already a Camera and two Lights in your Composition. These represent the Camera and the Area lights that we added in CINEMA 4D. There's also a Solid called "Display". The Solid is a result of the External Compositing Tag that we added to our Display Plane in the 3D software. We also have a few of the different Multi-Passes that we added in the Render Settings.

.

Step 35

As you scrub through the timeline you'll notice that the red "Display"-Soild fit's the screen of our phone perfectly, though it does not scale with the phone.

.

Step 36

To solve this, simply select the "Display"-Solid and press "S" on your keyboard to bring up the Scale for the Display. Then go to frame 25 in the Timeline (the end of our animation in CINEMA 4D) and add a keyframe by pressing the Stop-Clock Icon.

.

Step 37

Go back to frame 0 and set the Scale of the Display to "0%" to add another keyframe.

.

Step 38

As you scrub the Timeline now you'll see that the Solid does not quite fit the screen as it should. That's because CINEMA 4D eases keyframes by default. Therefore we will need to ease our keyframes in After Effects as well. To do this select both of the newly added keyframes, Right-Click on one of them and select Keyframe Assistant>Easy Ease from the menu.

.

Step 39

Now the "Display"-Solid should fit perfectly to the screen of the phone, but we don't want to have a red Solid within our phone, do we? We'd want to replace it with the graphic that we want to have on our phone, be it an image or a movie. To do this we'll add our graphics to the project by Double-Clicking in our Project Files Window. Select the image or movie that you want to use and import it to the Project. In this case it's the "display.jpg" that you'll find within the project files.

.

Step 40

To replace the red Solid with our image, select the "Display"-Solid in the Composition and Alt + Drag the image down from our Project Files onto the Solid in the Composition.

.

Step 41

If your footage-file is too big, simply go to frame 25 in the Timeline, where we have the end of the scale-animation and scale the footage down until it fits within the screen, without leaving any gaps. For the image in this tutorial I've turned the Scale down to 18%.

.

Step 42

Still something is not quite right about our display. When we scrub through the animation we can still see the display, even though the phone is turned away from us. This is where our Object Buffer comes in handy. It will work as a matte for our display and remove the parts of the animation which is not seen by the Camera.

.

Step 43

You will find the rendered out Object Buffer in the folder called Special Passes. Drag the pass called object_1 into the composition and place it above the "Display"-layer.

.

Step 44

We will use the Object Buffer as a Luma Matte for our "Display"-layer so press the "Toggle Switches / Modes"-button to reveal the Track Matte setting in the Composition. Choose Luma Matte from the drop-down menu on the "Display"-layer.

.

Step 45

Now the "Display"-layer stays hidden when the phone is turned away but we don't have any reflections on the screen. To solve this, simply take the Reflection-Pass and place it above the Object Buffer-Pass.

.

Step 46

I think the "Display"- layer looks a little too bright compared to the rest of the phone so I want to darken it down a bit. Since the "Display"-layer is a 3D Object it is affected by the Lights in the Composition. I will therefor lower the intensity of both Lights in the Composition to make the display less bright. Do this by Double-Clicking on the Lights one by one to bring up the Light Settings and lower the Intensity to about 60% on both Lights. Remember to remove any keyframes before you adjust the Lights, since any animation on the Light Intensity will be exported from CINEMA 4D.

.

Step 47

I also want to brighten up the highlights of the frame on the phone to give it a bit more of a metal-feel. This is where we'll use the second Object Buffer, the one called "object_2" in the Project Files. So drag it down into the Composition and place it above the "Specular"-layer.

.

Step 48

Use it as a Luma Matte for the Specular by pressing the Track Matte Setting on the "Specular"-layer and choosing Luma Matte from the drop-down menu.

.

Step 49

This will remove the specular from everything except the frame of the phone, so we need to make a copy of the "Specular"-layer together with it's Luma Matte. Do this by selecting both layers and pressing Command + D on your keyboard.

.

Step 50

Still we only have a Specular for the frame of the phone. To fix this, press the Track Matte Setting on the "Specular"-layer you just copied and choose Luma Inverted Matte. Now we'll have a Specular for both the frame and the glass pieces of the phone, but we can control them both separately.

.

Step 51

To make the Specular glossier for the frame of the phone, add a Curve to the first "Specular"-layer by selecting it in the Composition and navigate to Effect>Color Correction>Curves in the Top Menu.

.

Step 52

Mess around with the Curve a bit until you get a look you're happy with. Brighten the highlights of the Specular by pressing in the upper left corner of the Curve.

.

Step 53

I also want to brighten the Reflection a bit, so add a Curve to the "Reflection"-layer by navigating to Effect>Color Correction>Curves. Make a very small adjustment to the lightest part of the Reflection by clicking in the upper part of the Curve, close to the right corner.

.

Step 54

The last thing that we're gonna do is to add a background to our animation and add the illusion of a floor by creating a reflection below the phone. To do this we'll need to give our phone an Alpha to make the background transparent. To do this drag the Composition down from the Project Files Window down onto the little icon that looks like a film roll. This will put the Composition within a new composition with the same dimensions and length as the previous one.

.

Step 55

Hit Command + K to open up the Composition Settings and rename the new Composition. Let's call it "Main Comp".

.

Step 56

We need an Alpha for our Composition and since we checked the the box for Alpha in our Render Settings in CINEMA 4D, the 3D program rendered the RGB-image with an Alpha Channel. We can use this Alpha Channel with the help of a Track Matte to make our background transparent. Drag the RGB-image from you Special Passes Folder down to your Composition and place it above the Composition of your phone.

.

Step 57

Choose Alpha Matte from the Track Matte Settings on your Phone Composition. This should make the background transparent.

.

Step 58

Now add the Image called "background.png" to the Scene and put it below the other Layers in the Composition.

.

Step 59

Duplicate the Phone Composition and the Alpha Matte by selecting both layers and pressing Command + D.

.

Step 60

With both layers selected, hit "S" on your keyboard to bring up the Scale for both Layers.

.

Step 61

Uncheck the Constrain Proportions Symbol on both layers and change the Scale for Y to "-100%".

.

Step 62

Move both layers down along the Y-axis and place them right under your phone.

.

Step 63

Hit "T" on your keyboard to reveal the Opacity Settings for both layers. Reduce the Opacity to about "40%".

.

Step 64

So that's it! If you've followed all of the steps above your result should look something like this.

I hope you've found this tutorial helpful and/or inspiring. If you have any questions, post a comment and I'll try my best to answer them.

.

Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.