In this tutorial Naim Alwan ventures outside of After Effects for a little bit of 3D Matchmoving to create this stunning Urban Jungle effect where vector graphics are perfectly tracked to some city footage. In day 1 you will learn how to do a track using Boujou (although any matchmoving software will work for this) and then import and apply that information in After Effects successfully.
In this two part tutorial you will learn the workflow for seamlessly integrating live action footage with motion graphics elements.
The first day we are going to be spending a little time familiarizing ourselves with the camera tracking process using Boujou, and the settings we need to get right in order to export an AE camera track.
We will then use the information contained on the nulls to setup the scene. Once the track is imported in AE and scene setup we will shift our focus to Illustrator where we will cover the layer setup we need in order to import an Illustrator file into AE.
Show Video Transcription
Hi, guys. My name is Naim Alwan, and I'll be making a tutorial for AETuts. This is my first tutorial, so I apologize if I start rambling on and talking nonsense. Just remember, it is my first one, and as I make more hopefully I'll get better.
This one is called Urban Jungle. I'm just going to pop to the QuickTime to show you the finished scene. What we're going to do first is import the entire scene and create a camera track. We're going to do that using Boujou. Once we've created the camera track, we're going to import the camera track into After Effects and change some settings.
Once that is done, we're going to head over to Illustrator. I'm not going to show you how to actually make the elements, because I bought it from iStock, so I'm not entirely sure how it was made. I'm just going to show you how it needs to be set up so it's a little easier to animate. Then, we're going to position them in 3D space. Once all this is done, we're going to go to Mocha and roto this man out so we can get a nice mat to make him interact with the scene.
This tutorial will be in two parts. The first will be Boujou and importing that data into After Effects. The second part will be building the whole scene, including some Mocha training. Let's get to it.
Here we are in Boujou. Our first task is to import the sequence. I like to use these buttons by here. If for whatever reason you don't see an import sequence button, then right-click on an empty one and go to Setup and choose the import. Obviously, the tick box, because it's already there. Also, you can actually go to the Setup and import sequence that way, or Control + I. Personally, I like to use the button. It's a lot easier for me.
I'm going to navigate to my E: drive, and my tutorial is walking street sequence. Now I just have to select the first frame of the sequence and Boujou will automatically select the rest as long as they're named sequentially, as you can tell these are. If you've got a big HD project, you can actually import a proxy here, but it's small. It's a free move. It's not interlaced. The start frame is 1. We're not going to step, and the end frame is 200. We're going to click Okay.
Here's the imported sequence. I'm going to hit space bar now to play the sequence. It's also going to cache it into the RAM, and it's going to make it a lot easier for us to playback and jump a lot less. What we have to do first is mask this guy out, because he's moving and the scene is stationary. We do that by using the mask tool. That's to stop him. We go to the front frame. Select the mask, too. This has to be rough. It doesn't have to be precise in any way.
Now what I like to do is go to the end frame and create a keyframe for the end frame, like so. Adjust it just a touch, and just cycle backwards now. Move it only when I have to. Again, this doesn't have to be precise. All we want to do is block him so he doesn't interfere with the tracking points. When I first started Boujou and I first started masking, I did do really, really precise masks because I didn't know any better. I'm telling you now, you honestly do not need to. These masked perfectly.
We're going to track features now, and we're going to use an automated process because this is a pretty straightforward scene. Again, if you don't see the button, right-click, go to 2D Tasks, and Track Features. 2D tasks >
Track Features, or hit F9. I like to use the button, so I'm going to. I want to track all frames, not the selected range.
Within the advanced tab there's one key feature, and that's the sensitivity. As you slide the sensitivity bar to the right, it will get more sensitive and you will see that there's more tracking features. As you slide it to the left, it will get less sensitive and you will have less tracking features.
I'll hit start, and Boujou is going to analyze the sequence, frame by frame. You can see that the tracks seem to be sticking to the scene, which is always a good sign. This bar is going to give us a visual indication of how long we've got left. It's going to take a while, so I'll get back to you when it's finished.
Right. The feature track is finished, so let's just scrub through the timeline to see if the tracks actually match the scene. They seem to be looking good. Actually, to save you from navigating down to the timeline to move around, if you hold Shift and you left-click on the scene, you can move that way. It looks perfect to me.
The next step is to create a camera solve. I'm going to use the button. You can right-click and go to 3D Tasks and choose Camera Solve, or 3D Tasks >
Solve Camera is F10. I like to use buttons, so I'm going to.
Again, self-explanatory scene. Pretty straightforward, so I'm just going to hit Start. Basically, it's going to now use all these points to create a camera. How, I don't know, and it still to this day baffles me. Again, this is the percentage. It's going to go up nice and slow. I'll be back when it's finished.
I'm back, and you can see that all the cross hair points have now been changed to dots. I'm just going to make this a little bigger, so I'm going to go off screen for a minute. Right. By holding Shift, I'm going to scrub through the timeline, and you can see all these tracks.
The blue tracks won't stay on. That's because they're not being used at this moment. Only the orange tracks are being used. These are going to be used later on. That's why these aren't staying stuck to the scene. Just focus on the orange tracks for now, and you can tell that they are stuck to the scene perfectly.
Once you've checked your view in the 2D mode, we can change to the 3D. We do that by toggling these two buttons. By the way, I'm Shift + left-
clicking on the mouse to orbit, and you can also Shift + middle-click to pan, and you can Shift + right-click to zoom in and out. I'm going to orbit by Shift + left-clicking. We can see now that it's a pretty good track. This is a floor plane. This is the shop front here. This is the shelter, and these are the lamps and the parking meter. It's looking good.
The only thing we need to correct is the scene geometry. At the moment, this checkered plane here is the floor plane of the Boujou scene. However, this here is the floor plane of the solved scene. Now, in order to use this in After Effects, we have to make sure that both planes are matching, and we do that by adding scene geometry.
We go back to our buttons, and here there is a scene geometry button. If we click it, we go to Add Coordinate from Hint. What we want to do first is add the origin. I prefer to do it in 2D view, so let's scroll through to see what we can add. I'm going to use this one. With the point selected, we're going to select to connect, and then we're going to update the coordinate frame. I'll check back to the 3D view. The camera track has moved up to the ground plane of the Boujou scene, which is what we wanted.
We just have to adjust the Z-axis now. Back into 2D view. I'm going to scrub through, choose this, and to connect more than two you Control + left-
click. Now I'm going to use this as my Z. I'm going to Add Coordinate from Hint. We're going to select Z-axis. I'm going to connect the selected points, and I'm going to update the coordinate frame. If we check back in the 3D view, it looks like we've made a mess of things, but it will look better when we add the other axis.
We'll add the X-axis now. Back to the 2D view. We'll scrub through to see what we can use. I'm going to use the origin point, as well as this, by Control + left-clicking. We're going to Add Coordinate from Hint. We're going to select X-axis, connect the selected points, and update the coordinate frame. Now when we go to the 3D view it is perfect. The floor planes match, both sides.
Now we're ready to export. Let's go back to the 2D view. If we were to export the scene as it is now, all these dots would be exported and imported into After Effects as nulls. We don't want all of these. It's going to slow After Effects down a lot. I'm only going to export the features that I'm going to use in the After Effects scene. I know that I'm going to put an element on the wall, so I'll right click on one of the features, and I'm going to select Flag for Export. I'm going to right-click it again, and I'm going to rename it. I'm going to rename it "Wall1." I'll have one on the other side of the wall. I'm going to Flag this for Export, and also rename this one "Wall 2."
Going to add some illustrations to the floor. Flag for Export. Rename
"Floor near." Also, this one. Sorry, I'm right-clicking, by the way. Right-
click and rename "Floor far." We're also going to add some bits and bobs to the shelter. By scrubbing, Shift and left mouse clicking. I'm going to right-click. I'm going to Flag for export, and I'm going to rename "Shelter front." Now I'm going to select this. Right-click, Flag for Export, right-
click again, rename "Shelter top."
With that then, now we can export. Back to our buttons. We can go to Export Camera. We'll choose where we want the scene to be saved, and at the moment it's pointing in the right direction. We're going to save it as "Jungle final." Just overwrite this one. This is an After Effects Maya scene. It's a moving camera static scene. The camera is moving and the scene is static. That's what will happen. We're exporting flagged tracks. Now, what you have to do, normally this is ticked, untick it. Make sure this is 1.0000, and make sure this is 100. Save.
We're back in After Effects. Now it's time to import the Boujou Maya scene. We'll double click in the project panel and select the "urbanjunglefinal."
As you see, it imports two compositions. We only need this square one, so we'll select the other and we'll just hit Delete.
If you go to the info at the top, you'll notice that this is 654 x 486 square pixels, but the footage is 720 x 486 with an aspect ratio of 0.91. Let's double click the composition to open it up in the timeline. First of all, let's select the main footage so we actually have the information. Press Control + K. I have to change the size and the ratio depending on the footage we have. This will be 720 x 486. That's correct, and it will be 0.91. Click Okay. Now, if we drag our main footage in and see if the tracks match, they seem to match pretty well.
Now let's add a floor layer. I like to add layers by right-clicking just left of this triangle and go into New > Solid. We're going to call this
"Floor," and it's going to be 2,000 x 1,000. Click Okay. Now we're going to make it a 3D layer. What we want to do is take the position of this null, so we'll select the null, press P, select Position Parameters, press Control + C, or you can go to the edit > copy, and then paste when you want to. Select the floor layer, Control + V. Now it's pasted the position properties of the null layer to the floor layer.
Now all we have to do is press the W, or we can go to the toolbar to actually pick the rotation tool. We'll rotate it until it's 90 degrees. We'll also add a grid effect to it. Now we're just going to do a quick RAM preview and see if it's locked on. It seems to be working quite well. We're going to precompose this floor layer by pressing Control + Shift + C, and we're going to name this "floorprecomp." Going to leave all attributes. Going to hit Okay.
First of all, we're going to lock this and double click on here. Move this over to the project panel to get some more room. We're going to right-click
> New Text. I'm just going to zoom out by scrolling down on the middle mouse button. I'm just going to add some text right here.
When you press Control, it will take you to the selection, and now you can move it up. I'm going to type some more, just a little bit of rubbish, rubbish, rubbish. Click on it four times, or twice actually. Control + C and hit Enter. Control + V. Enter, V, Enter, V. I'm going to click on it four times, Control + C, Enter, Control + V, and that's it.
Now, we hide this and make this transparent. We don't need these. The reason it's not updating is because the grid plugin is still on. We deactivate the grid plugin. Let's do another RAM preview. Going to press V. I'm going to move it up in the Y-axis just a touch. I'm going to see if that works. Okay. That does work.
Now what we want to do is, in the project panel, duplicate this by pressing Control + D. I'm going to get rid of the 2, and we're going to call this
"wallprecomp." If you want the precomps to be stacked together, then we'll Control + click by selecting them both, right -on the box to their right, and just selecting any color. I'll choose yellow.
We're going to drag the wall just above floor, and we're going to make it a 3D layer. What we need to do is choose a null to copy the position. I'm going to choose this null. I'm going to copy the position of the null, by pressing Control + C, and pasting it into the precomp by pressing Control +
V. I'm going to hit the tilde key to maximize the screen. Just going to move it up in the Y and back in the X. Now we'll just RAM preview to see if it's working. We can see that it sticks nicely.
Now we can move on to positioning the shelter elements. First of all, I'm going to switch these off. I'm going to right-click just to the left of the triangle and select New > Solid. I'm going to call it "shelter." Make it 400, and white. That's okay. I want to make it a 3D, and I want to use this position and this null. I think it's called "nullfront," so I'm going to hit P to get the position. I'm going to select the position parameters, hit Control + C, select the shot layer, hit Control + V. Now it's positioning right. I'm going to move it to the left on its X-axis and just up on its Y-
If I was to rotate this, it would rotate in the center by here. I hit the rotate, or you can hit the W. If you rotate it now, it will rotate at the very top. We want to actually rotate it by here, so same thing as the top of the shelter. I'm going to hit Undo. You can move the anchor point by using the Pan Behind tool, or you can also hit Y. I'm going to drop the opacity to 50, and I'm going to drag the anchor point down to where I want to rotate it from, right about there.
Now what I'm going to do is precompose this layer. I click it, Control +
Shift + C. I'm going to call it "shelterprecomp," and hit Okay. I'm going to go into the layer, and I'm going to apply the grid. We go back. Make the opacity back to 100. Now if we do a quick RAM preview to see if it's sticking, we'll notice that it sticks perfectly.
All we have to do now is duplicate this layer and rotate it so it's matching the top shelter. First of all, I'm going to mask this out. You can either select the Mask tool by navigating up to the toolbar and selecting it that way, or pressing Q on the keyboard. Now I just draw a mask around the front of the shelter. Now I'm going to duplicate it. Delete the mask. Now I'll mask the top of the shelter. It's not going to be perfect because of the perspective, but I just want to match the width. I'll tap W to get the rotation tool and rotate it on the axis.
As you can see, it doesn't match as well as I would like, so using the grid as a reference, I'll reposition it manually using the Z- and Y-axis. Now that it's got a good perspective, we can see that the mask isn't big enough, so I'll just expand it a little. Now if I go into the
"shelterprecomp", zoom out a touch, I can add this layer. Hit the W. Rotate it at an angle. Press V for selection. Now I can scale it up a little. I'll head back to the main comp just to double check to make sure that it's not slipping. Perfect.
Now I'm going to select both the shelter compositions and precompose those. I'm going to call it "shelterprecomp2." Now it's going to snap our screen, but it's an easy fix. All you have to do is press this Collapse Transformations, and there is it.
With all these positions correctly done, we can head over now to Illustrator. I can quickly briefly walk through what you have to do here. I bought this from iStockphoto. It came all in one piece, so I had to break these pieces up. As you can see, here's one. Here's another piece. Here's another piece. Here's another piece, and another one here, here, here, here, and here. You have to make sure that the element that you want to animate within After Effects is separated onto its own layer, as I've done here.
Now, what I want to do is animate the brown part of the leaf first. Then after that, I want to animate the orange part, so I've separated them to leaf1a and leaf1b, and I've done that through all of them. We'll import into After Effects.
To import it, we'll double click on the project pane. Select the waves. Make sure that we've got the composition cropped layers selected. What that does is it imports its own composition with all the layers inside. Sorry, we double-click it there, with all the layers inside. We don't need back up. We'll get rid of that. It also creates a folder with all the separated layers imported as separate footage items. This is going to make it extremely easy to choose whichever ones we want.
Now I'm going to precompose each leaf. There's two layers to each leaf, A and B, for all of them. I'm going to select leaf1a, leaf1b. I'm Control +
clicking, select more than one. Now I'm going to precompose them by hitting Control + Shift + C. I'm going to rename it "leaf1." I'm going to hit Okay. Now I'm going to double-click to go into the composition. Zoom in a little, and we're going to animate this one by using the Stroke filter.
First of all, we have to have a mask. I'm going to select the pen tool, or use G, the quick shortcut. We're going to draw the path by following the contours of the element, and also thinking about how I actually want the element to animate on. Now I'm going to apply this stroke. Toggle the transparency and turn the bottom layer off. We want to make sure that it is revealing the original image.
Now, if we scrub back and forth through the end property, we'll notice that it's animating on and off. Obviously the brush size is too small, so I'll increase it to 31. A little more. Now I'm going to adjust the path to see if that makes a difference, which it does. I'm also going to adjust the end point. It's looking a lot better now.
Now then, I don't like this gap here, so I'm just going to try and get rid of it by readjusting the path points. It's a bit tricky to grab these points. I'll bump up the brush hardness to 100 and just scrub through to see if I like it.
I want to make sure the end parameter is on 0. Hit the stopwatch, and also go to 15 seconds in the timeline, because that's how long I want the animation to be, and change the end percentage to 100. I'm going to press M to get the mask. I'm going to Control + C to copy it, and I'm going to paste it in the layer underneath. I'm going to turn visibility on.
I'll now add the stroke plugin to the bottom layer and just dial in similar settings, or actually the same settings as I did to the layer above. Now, I want this animation to start later. I'm going to go to frame 5 in the timeline. Make sure the end parameter is on 0 and start the stopwatch. Now I'll go to frame 20 and make the end parameter to 100. I like that. I think that looks good.
I'm going to select both of them. Hit U to bring up the keyframe properties. Select the properties, right-click. It is off frame, so let me just readjust. Select the keyframe properties, right-click, Keyframe Assistant, and I'm going to choose EZ.
I'm going to close this composition to go back to the waves. I'm going to select these two. Control + Shift + C to precompose. I'm going to call it
"leaf2." I'm going to double click to enter the composition. Now I'm going to apply the same effects and parameters to these layers as I did to the ones previous. I'll do that and get back to you when it's finished.
I'm back now. I've animated all the layers, as you can see. I also tidied the project pane a little by renaming the four leaf layers, by creating a new folder called "leaf precomps," and placing all the leaf precomps inside it. The next step now is to make it look as though all of the additional leaves are stemming off this main one.
I'll select and solo the main leaf. Zoom in a touch. Leaf1 will be animated first. I'll select and solo it and scrub through the timeline to a point where the main element has just animated past the foundation of the leaf1 layer, and I'll just slide the leaf layer over to that point. Now it looks as though it's animating off the main layer. I'll speed the recording up a little now, because I'm sure you don't want to see me do the same thing over and over again.
Leaf2 is the next to be animated, so I'll slide it across, scrub through a little, make minor adjustments. Leaf0. I'll scrub across again, make some adjustments, and move on the leaf3. Adjusting, that looks good. Leaf4 now. As you can tell, there's a lot of tediocity, I suppose, if that's a word. There are some tedious tasks. You just have to think of the finished outcome and how good it will look. This is moved on to leaf6 now. I'm going to scrub through, some adjustments, and the final one, which is leaf7. There you go. Perfect.
What I forgot to explain was how I did the leaf7, which is the large one right here. Moved it by accident. If I double click to enter the composition, you'll notice that this single layer contains six masks. The stroke plugin can handle more than one mask as long as you've got the All Masks tick box ticked. At the moment they animate on all at the same time. If you wanted to animate them one at a time, then you'd have to tick the Stroke Sequentially box. Now they'll animate one at a time, as you can see. But for this project I'm going to let them animate on at the same time.
Okay, guys, that's it for part one. Thank you very much for watching. Part two will be up very shortly. Meanwhile, check out Vimeo.com. There's a group which I'm going to start. It's a AETuts user group, so you can upload your After Effects creations where you can discuss them with your fellow After Effecters. Or, you could upload the clips you've made while follow the AETuts tutorials. Or, if you stumble across a video on Vimeo that you like the look of and would like a tutorial, then feel free to request it here.
There's a forum where you can talk After Effects stuff for ever and ever, and also a file section where you can upload project files or videos that you want people to use as stock. If you're not already a Vimeo member, become one and join the group.
Before I go, I'll just tell you that we'll be finishing this shot in part two, where we'll place all the elements on the wall, shelter, and floor. Also, we'll spend a little time in Mocha, where we'll roto the man out, export the shapes as mats, and use them as track mats in After Effects. Until then, happy After Effecting.
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post