Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Our phone compositing process illustrates a really important concept inside of After Effects, and that's the idea that you can have a 2D element in After Effects that sticks to a 3D render from CINEMA 4D. And in this movie, we're going to be doing just that. We're going to take a piece of footage, and we're going to put it inside of pre-comp and stick it onto the front of our phone screen. So let's start off by importing a piece of video that we can use. First, I'll start off by just cleaning up this window here. I'm going to close up these folders, and actually, I'll reopen the Video folder. And in the Video folder, I'm going to select the High Res folder.
When I import this piece of footage now, it's going to go right into that High Res folder for me, so I don't have to organize it later. So I'll go to the File menu, do Import > File. I'm inside of the Exercise Files in the Video_Assets folder. And if I select this Lake Tahoe clip, and that's a snowboarder going over jump and I hit Open, it's going to import that file. Now what I want to do is I want to get this piece of footage into a pre-comp that matches my final project size, and so I need to make that comp first, and so I'm going to scrub down. I'll select the Pre-COMP's folder, and I'm going to do that so that when I make this new composition, it goes right into that Pre-COMP's folder for me.
So if I click on the Create New Composition button, and I'm going to call this one Phone Screen PRE. And the Phone Screen PRE, I want to make it 960 x 540, 30 frames per second, and I'll make it 5 seconds long. So my frame rate, my size, all match my finished composition size, and that's very important in this case. So I'm going to hit OK here, and you can see my Phone Screen pre-comp went right into that Pre-COMP's folder. And so now I take this, and I want to get it into the Phone Pass Pre, so let's open up that Phone Pass Pre.
I'll double-click on that guy. Before I put this phone in the Phone Pass pre-comp, I need to add the video to that pre-comp. So I'll click back here on this tab, and I'm going to drag the Lake Tahoe clip right into this folder. And you can see it's a little bit larger. That's because this clip is 1280 x 720. So I'm going to hit S on the keyboard to reveal the scale, and I'm going to scale this down. And I don't want to make it exactly the same size; I'll just make it just a hair larger, so that there is no artifacts around the edge of the frame. So right about 76% on the Scale. So now what I might do is get this pre-comp into our Phone Pass pre-comp, and so I'll click on that, and I'll drag the Phone Screen PRE right into the composition.
It's going to come in as a 2D layer. Now, what I want to have is this 2D layer stuck onto my 3D phone, and so I need to first make this a 3D layer. I'm going to click the 3D layer Switch here, and when I do that, my layer jumps out of the way. That's because now it's honoring the 3D space that is being set up by our camera. And so I'll need to have this 3D layer now stick to the front of phone. Because of After Effects and CINEMA 4D's really tight integration, I have this awesome null here called Phone Screen. And this null sticks right to the front of my phone, and so I want this layer to stick to that, so all I need to do is parent them up.
So if I take my Phone Screen and use the parenting pick whip and parent it right to the Phone Screen null object, it looks like nothing has changed. But when I hit P for Position, this Position information is now relative to that null. So if I zero it out--and I'll just put in 0, 0, 0--it now jumps right to the position of the Phone Screen, and that's really, really important, the idea that information is relative and it makes this whole process a lot easier. The first thing you'll notice about our video is that it's really dark.
The reason that it's dark is because the lights that came in from CINEMA 4D are actually affecting this 3D layer. We're not going to need that for our compositing process, so I'm going to delete those lights out of the scene completely, and you can see our video now returns back to its normal brightness. Next thing I want to do is I want to size it up a little bit better, and first, I'm going to zoom in on my comp by hitting the Period button. That's going to blow my comp up a little better. I'm going to enlarge the window as well. And now I'll select my Phone Screen PRE and hit S on the keyboard and just Scale it down.
When I do that, you can see that it's not exactly centered up on the phone, and that's because the anchor point for our null object is actually down here at the bottom-left corner. So what I'm going to do is take the Phone Screen and go back to the position information and move it 50 units, 50 x 50 on X and Y. One thing you'll notice about the screen video is that it's offset from there, and you can see that it's actually at the bottom-left corner of that null object. And that null object, I happen to know from experience that when you bring coming from CINEMA 4D, the anchor point for that null object is actually at the bottom-left.
But if you move your attached Video layer 50 units on X and Y, then it'll jump right to the center, and that's a really handy tip, and that makes the centering- up process a lot easier. So now what I need to do is to scale it down a little bit more. But before I do that, I want to chop off the edges. Right now, my phone screen fill is a lot larger than the phone, and I want it to able to see inside the phone before I start playing around with the position. So I'm going to go into my Video > Cinema4D Imports, into the Phone Special Passes folder, and grab the object buffer. This object buffer was generated by CINEMA 4D, and what it does is give me an alpha channel just for the screen. And when I drag this in here, you'll see.
I now have this black-and-white layer that's exactly the same shape as the screen on the phone--not the whole phone, just the screen. So if I go to my Switches and mode, switch them over, and I set this to be a track matte for my layer, I'll set it to be Luma Matte Phone_Object_ 1, it's now chopping off my video. And if I select the Phone Screen, you could see that the Phone Screen is now being chopped off by the alpha channel, so the transform handles show me where the outer boundary of my Video layer is. So let's zoom in a little bit closer now and take a look at the screen up close so we can get it positioned better. I'm going to scrub forward in time to spot where the phone starts to move towards the camera, and right about here.
So I'm just on to next-to-the-last frame, and I could see now my phone screen fill is sort of offset a little bit. So I'm going to use the X handle now and move it over to the left just a bit. Let's move it over right about here. What I'm looking at is the transform handles, and I'm watching the space between this transform handle and the edge, and this transform handle and the edge, and by sliding it over just a bit. And I'm going to now adjust the Scale just a little bit more, so I'll hit S on the keyboard to bring up the Scale and bring it down in size by scrubbing to the left. And that's too small, and 24 is still just a hair too small.
I am going to make it 24.5. So now, if I scrub through the video, you can see that the phone video is sticking right to it and it's perfect. And actually, when the phone turns around, you can see the phone contents actually disappear with that object buffer, and that's one of the magical things about this process is that phone video sticks right to it and looks just like it's always been there. It's missing a couple of important pieces though, and that's the reflections that are on the phone screen. In the video, we don't want the phone contents to actually come on until about four seconds into the animation, so I'm going to move my time slider to a 4-second mark, and then at the 4-second mark, I'm going to take the Phone Screen PRE, and I'm going to move its start point right over to 4 seconds.
I will hold down the Shift key so that it snaps right into position. And now that it's snapped into position, I want to get the reflections that are on the phone screen to show up on top of my video. So in order to do that, I'm going to duplicate some layers, and I'm going to enlarge my screen just a little bit here. And I'm going to take this Reflection Pass and just hit Command+D or Ctrl+D on the keyboard and bring it up to the top of the stack, and now you can see there is a faint line there. I'm going to scrub forward in time on the video. There we go. And you can see there are some reflections here on top of the phone screen.
They're a little bit hard to see, but they are there, and it's a very subtle effect, but it's important for making the phone screen look like it's stuck into the phone. So what I want to do is take this Reflection Pass now and chop it off. You can see I lost my alpha channel when I did that. That's because this Reflection Pass doesn't have an alpha built in, and now it's above my stencil alpha layer. So what I need to do is take this Phone_reflection pass and use the object buffer to matte it out, the same way I did for the screen. So if I duplicate the object buffer and move it up top, and if I take the Track Matte settings for that and set it to be Luma Matte for the phone object, and now it's going to chop that reflection out.
You can see there is a subtle reflection on top of there. If I turn it off and on, it becomes really easy to see. This phone set up is a crucial part of our entire production process. What it allows us to do is to stick a piece of video on the phone screen and then change it out at will without having to go back to After Effects. CINEMA 4D's and After Effect's tight integration together really makes this process a lot easier.
Get unlimited access to all courses for just $25/month.Become a member
100 Video lessons · 8542 Viewers
107 Video lessons · 37410 Viewers
94 Video lessons · 26734 Viewers
147 Video lessons · 6176 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.