navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Maya Rendering for After Effects Composites

Maya Rendering for After Effects Composites

with Lee Lanier

 


In this course, professional animator and director Lee Lanier shows how to create render passes in Autodesk Maya, recombine the passes in Adobe After Effects, and motion track the passes to live-action video footage that contains a moving camera or a moving character. The course covers both the Render Layer Editor and mental ray contribution pass systems. Additionally, 1- and 2-point motion tracking and match moving, stabilization, and 4-point corner pin tracking are discussed.
Topics include:
  • Working with image sequences
  • Matching the 3D camera to video footage
  • Lighting models in Maya
  • Splitting a scene into multiple render passes
  • Batch rendering
  • Recombining render passes in an After Effects composition
  • Setting up motion trackers
  • Refining layers with rotoscoping
  • Adding blur and effects
  • Adjusting shadows and matte edges
  • Using color correction
  • Stabilizing shaky video

show more

author
Lee Lanier
subject
3D + Animation, Rendering, Textures, Video, Materials, Compositing, Visual Effects
software
After Effects CS6, Maya 2013
level
Intermediate
duration
3h 9m
released
Aug 17, 2012

Share this course

Ready to join? get started


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04Hi, I am Lee Lanier, and I'd like to welcome you to Maya Rendering for After Effect Composites.
00:09In this course I'll show you how to prepare Maya Renders for integration with
00:13video footage in After Effects.
00:14We'll learn how to set up render passes in Maya by using the Render layer editor
00:19and the mental ray contribution map system.
00:21We'll explore ways to create compositions in After Effects by combining the Maya
00:25renders with video footage.
00:27I'll walk you through the various forms of Motion Tracking, including Transfer
00:31Tracking, Stabilization, and Corner Pin tracking.
00:35Finally, we'll explore various ways to make the CG and video footage integration
00:39more believable by using the Effect Filters.
00:42Now, let's get started with Maya Rendering for After Effects Composites.
Collapse this transcript
Using the exercise files
00:00If you're a Premium Member of the lynda.com online training library, or if
00:04you're watching this tutorial on the DVD, you have access to the exercise files
00:09used throughout this title.
00:10Let's take a look and see how those are laid out.
00:12All the files are in the exercise files folder, within that folder are Chapter
00:17folders, a Footage folder, Renders folder, and Textures folder.
00:21The Chapter folders contain Maya scene files, and also After Effects project
00:26files, you'll need to create the exercises.
00:30The Footage folder contains the live-action image sequences that need to
00:34import into After Effects.
00:35These feature an actress in a real location, that we're going to combine with CG renders.
00:40The Renders folder contains CG renders created in Maya.
00:43The last folder is the Textures folder. This contains textures that Maya needs
00:48to render out the CG.
00:49Now you'll need to open files in the Chapter folders, the Footage folder, and the
00:54Renders folder to complete the exercises.
00:56However, you don't need to access the Textures folder, that's just there, so
01:00Maya has the textures for the CG objects.
01:02If you're not a Premium Subscriber to lynda.com you don't have access to the
01:07exercise files, but you can follow along from scratch with your own assets,
01:11so let's get started.
Collapse this transcript
1. Prepping a Maya Scene
Working with image sequences
00:00We'll take a moment to talk about image sequences.
00:03Now if you have already worked with image sequences, this might be familiar
00:06information, if you haven't, this will be good to know.
00:09Now there are two ways to work with live-action footage inside compositing
00:14program like After Effects.
00:15One is to bring in a movie like a QuickTime or AVI file, and the other is to
00:20work with the image sequence.
00:22Now traditionally, Visual Effects work uses image sequences, but what is an image sequence?
00:27An image sequence is a series of still images that are numbered in such a way
00:32that they can be imported in the correct order.
00:35Compared to a movie, a movie is a single file where all the frames are stuffed
00:39into a single file, like a QuickTime. Well, why do we use image sequences?
00:44Well, for instance, motion pictures are often shot on motion picture film.
00:48In other words features are shot on actual film.
00:51That film has to be converted to some digital format to do the effects,
00:56therefore they run through a scanner.
00:57The scanner converts individual film frames into individual still images.
01:03Another reason is because of quality.
01:05Often if you need to work with footage, and you're using a movie,
01:08there are compression issues.
01:09For instance, a QuickTime or AVI will be compressed.
01:13Another reason is the fact that Visual Effects often involve using CG.
01:17If you render out CG from a program like Maya, you tend to pick image sequences.
01:22Now it is possible to render a QuickTime or AVI in a program like Maya.
01:27The problem is management, let's say you start to render, and you need to cancel a render.
01:32If you cancel a render, while you're rendering a movie that movie is broken, you can't use it.
01:37However, if you break a render, and you're rendering an image sequence, the
01:40frames that rendered up to that point are perfectly fine.
01:43So let's say you render frames 1 to 100, and you cancel a render, you can then
01:48start the render later at frame 100 and go forward. So it's great for
01:52management, it's much more efficient to use an image sequence.
01:55The problems does arise with digital video, if you shoot digital video, digital
01:59video cameras store that footage as some type of movie.
02:02It might be MPEG4, it might be a QuickTime, it might be AVI, or some other formats.
02:08If you want to use that to composite with, you have to think about whether you
02:13want to convert that into an image sequence.
02:15Now if you do, it's really not that hard, in fact, we'll demonstrate it right
02:19here in After Effects.
02:20Let's give it a try, and I have prepared a QuickTime we can use as a test, so
02:25File > Import > File, this is in the Footage folder, and it is called
02:31test.mov, for movie.
02:33This is HD, and it happens to be 72 frames long. Let's say we want to turn this
02:39into an image sequence, but only use some of the frames, we can do that.
02:42First thing I'll do is make a new composition, Composition > New Composition,
02:46make sure they are the correct size, correct frame rate.
02:49Again, let's say we only want to export a piece of this movie, your movie might
02:53be much longer if you shoot yourself.
02:55Just for now though, I'm going to enter 48 frames for the duration.
02:58The movie is 72, but we're going to only export 48, then I'll click OK.
03:02I want to double-click the movie to take a look at it, and I will come up in
03:08the footage viewer.
03:09What you can do is find the section you want to export by using the time
03:13slider, let's say I'll look through the footage, and I want to actually start at frame 10.
03:18I can go to frame 10 here, and click this button which is the Set IN point
03:22button that basically chops off the front, it's going to start this clip right here.
03:27Now since I want 48 frames, I'm going to go forward to frame 58, you can see the
03:33frame read out right here.
03:34Once I get to frame 58, then I can click this button, which is the Set OUT
03:39point, so this starts as a simple editing tool.
03:43Once I have that section selected, and I have my composition ready, I can click
03:48this button which, is the Overlay Edit.
03:50That will pull this section down and place on the timeline, and there it is,
03:54there is that little section. Now I can render it.
03:59Of course, you can adjust this at this point, I can add effects to this,
04:03adjust the color and so on, but you can also just export as is. That's what I'll do here.
04:08So with this composition selected, I'm going to go to Composition > Add to Render Queue.
04:14Now once you see the Render Queue tab, there are two things you need to check
04:17before you actually render.
04:18One is the Output Module, so just click on the word Lossless.
04:22This way you select the Format you're going to render to.
04:25Now you can't render it to a movie, in fact, this is AVI by default, or you
04:30can render to things like QuickTime or MPEG4.
04:32Now any of these options that say sequence, that's an image sequence, that will
04:36be a series of individual frames.
04:39So, for example, we can select Targa Sequence and render out a series of Targa images.
04:45Occasionally, you have to deal with the format options, but for Targa Sequence,
04:48you're basically done here. I can just go ahead and click OK.
04:52Now with the image sequence I am not worried about sound, an image sequence does
04:56not carry sound because it's a series of images.
04:59Next thing you have to check here is the Output To, so I'm going to click the
05:04Comp 1 word right here, this is given to you by default.
05:07This way you pick where you're going to write the image sequence to, and what
05:11the name of that sequence will be.
05:12So the image sequence is generally good to put it in its own folder.
05:16Now in my case, I have a folder set up already, but you might need to make a new one yourself.
05:21Now the browser has a new folder button, and this will vary in location based on
05:25Windows versus Mac, but you can make a new folder.
05:28Once you have the new folder, try and go into that folder, then pick a name, so
05:32I am going to call mine test.
05:34It's generally a good idea to use the same name and format, and that's name dot
05:40bracket, these pound signs bracket dot and the extension.
05:44Now these brackets and the pound signs represent the numeric placeholders, which
05:49will turn into numbering for the sequence. So what this means is bracket three
05:52pounds signs bracket is I'll have three placeholders, so it will be
05:56test.000.tga, test.001.tga, and so on.
06:02You can change the number of pound signs if you want to change the number of
06:05numeric placeholders, but in this situation, this is perfectly fine.
06:08So once you have the name set up, click Save. So I have checked the Output Module
06:13and the Output To, I'm ready to hit the Render button at this point.
06:17So Render, render through the sequence, with this example it goes pretty fast,
06:23so now I can go outside After Effects and look at that sequence.
06:25So here is my test folder and here is the image sequence.
06:28First frame is named test.000.tga, all the way up to 47, this is the 48 frame
06:34sequence, but I started with frame 000, so therefore, it ends with 047.
06:39Let's get back to After Effects.
06:40So at any point if we want to bring this in again, I could that.
06:44I can go back to my composition, I can go up to File > Import > File, go to that
06:49folder, for me it's on my Desktop, grab the first frame, make sure it has
06:53Sequence down here, make sure that's checked.
06:55And I'll bring in the entire sequence as a single unit, and there we go,
07:00there's our footage.
07:01So we discussed why image sequences are used in the Visual Effects industry,
07:05what their advantages are, and also how to create your own, if you have your own
07:10piece of video footage that's stored as a movie.
07:12After Effects is not the only program you can do this in, pretty much any major
07:16compositing package has this ability to convert a movie into an image sequence.
07:19So image sequences are good to work with, and we will be working with them
07:23throughout this series of videos.
Collapse this transcript
Importing reference video as an image plane
00:00One important part of Visual Effects work is rendering out the 3D models so that
00:05they integrate properly in the composite.
00:07One thing that will help you do that successfully is create an image plane as
00:11reference inside Maya.
00:12We'll use this scene right here to demonstrate that, this is shot1_start.ma.
00:16And this is actually the first step of the first tutorial where we'll combine
00:21this 3D model, which is a futuristic spyglass, with a live-action piece of
00:26footage of an actress. In fact, we are going to make it look like this device is
00:30held by the actress in her hand. So how do you create image plane?
00:34Well, first thing we need to do is check a few settings to make sure the image
00:38plane is used correctly.
00:39First thing I want to do is check the frame rate of the scene.
00:41So I'm going to go down to the Animation shortcut, down here, this bottom
00:44right button, click that.
00:46It opens up the Preferences window, I'll go to the Settings section in the
00:50center, and you see what the frame rate of this scene is.
00:52Right now, it's 24 frames per second.
00:54Now the video is actually shot in 24 frames per second, so that's a great match,
00:59but if you had other footage at a different frame rate, you'd change it here first.
01:03Second thing we need to check is the resolution of the project.
01:06So I'm going to close this, go to the Render Settings window and scroll down,
01:09check the resolution.
01:10Right now, it's set to HD 1080, and that's great because that's a resolution of the video.
01:15That's high-definition video, which is 1920x1080, so we're good there.
01:19If you have different resolution, you'd change it to match.
01:21So check the frame rate, check the resolution, so now we can bring image plane in.
01:25Now you have a couple of options in the Image Plane, one is you can bring in the
01:30image sequence, or a movie. And movie would be like a QuickTime, or AVI file.
01:33An image sequence, which is actually very common for Visual Effects work is a
01:37series of numbered frames.
01:38Each frame is a whole frame from the video, and that can be exported from a
01:42program like After Effects.
01:44So let's say we are bringing an image sequence, and we go up to the View menu
01:48for the camera where we want to attach the image plane, in this case, Perspective view.
01:52Go to View > Image Plane > Import Image, then go to the Footage folder, go to
01:56Shot1, and click on the very first frame in the Image Sequence, and you can see
02:01there's a whole bunch of frames here, in fact, there are 60 total.
02:04We'll click on 000, open that, and that image comes in as an Image Plane, and
02:08that's attached to the perspective camera, or the persp camera.
02:13In fact, if I go to another view, like persp1 here, and zoom out, you'll see that
02:17that plane is attached to the persp camera.
02:19Now it's not quite useful yet, one problem is I only have one frame of
02:23that entire image sequence, if I scrub the timeline, it doesn't move, nothing changes.
02:28What I have to do is go to the Attribute Editor for the image plane and make a few changes.
02:33If we go back to View and go to Image Plane > Image Plane Attributes and pick
02:37the one plane that I have, there are the attributes right here.
02:41If I scroll down a little bit there's an attribute called Use Image Sequence.
02:44If I click that, it tells Maya to automatically load the frames as you go
02:49across the timeline.
02:51In fact, what it does is writes an expression that relates the time to the
02:55number of the frame.
02:56Now in this case, it's a little bit off, I was to scrub all the way to the end to
03:01frame 60, the image plane disappears, that's because the frames were numbered 0 to 59.
03:06Luckily though, there is Frame Offset which I can change -1, and I'll
03:10change that relationship.
03:11So what that means is if I am on frame 60, actually load frame 59, 60 minus 1.
03:16When I am on frame 1, it tells it to load frame 0, which is 1 minus 1.
03:22So now we have the sequence loading up one frame at a time.
03:26Another problem though is the fact that the 3D model has disappeared, and that's
03:29because the image plane is actually in front of it.
03:32What we can do though is go back to the Attribute Editor for the image plane, go
03:36a little bit further, and there is a Depth Attribute.
03:38If I change that Depth Attribute to a higher number, such as 500, it pushes the
03:43plane further from the camera, and therefore behind the model, so now we can see that.
03:48Now, as we look at the view, right here we can see that the image plane might
03:53be a little cut off.
03:54One thing I can do to make sure I see the edges of the image plane, is go up
03:59to the View here, go to the Camera Settings and turn on the Resolution Gate.
04:03The Resolution Gate will show me the entire frame, and the green line in this
04:07case shows me the edge of the render.
04:09So now I can make sure I can see the entire thing.
04:12So let's try a test render and see what this looks like.
04:15With the Perspective camera activated, I'll go up to the Render view shortcut
04:19and render out a frame, that's a big resolution, so I'm going to scale the
04:22Render view down a bit first, and take a look.
04:25And there indeed is the 3D model in front of the Image Plane, so it's great for reference.
04:29Now one problem is, is it's permanently there until I hide it.
04:33Eventually, when we render this out, we don't want that there.
04:36So there's a way to turn it off just for that view.
04:39If I go back to the Attribute Editor for the Image Plane, go up to the top,
04:43there is an attribute called Alpha Gain.
04:45If I turn that to 0, it hides it from the Prospective view.
04:48If I re-render it now, you will see the Image Plane is gone and another good
04:52thing is the Alpha Channel is correct, I'll go up to the Alpha Channel, the
04:56Alpha is there just for the model, but not for the Image Plane.
04:59Okay, so far we have set the Image Plane based on image sequence, based on some
05:03video footage, so we're ready to move on to the next step, where we'll position
05:07the camera to make sure that the perspective lines up, so the model better matches the footage.
Collapse this transcript
Matching the 3D camera to the video footage
00:00Another important aspect of rendering 3D models for eventual integration inside
00:05compositing program is getting the correct perspective.
00:07You want to make sure that your 3D camera matches the camera that shot the
00:12original footage, for instance the video footage, as best as possible.
00:15This will require positioning, rotation, and also checking the lens.
00:19Now this scene, here, that we worked on from the previous movie has a perspective
00:23camera, that's where the Image Plane is.
00:25It's roughly positioned, it's not the position we want to use to render out this model.
00:29I want to make sure that we get a perspective that makes it look like this
00:33model's being held by this actress's hand because eventually we'll do that in the Composite.
00:37We'll integrate it to make that work.
00:39There are several ways to move the camera to achieve that goal.
00:42One is to simply use the Alt key and move the camera around in the actual Render
00:46view, the Perspective view in this case.
00:48We can scroll, dolly, everything we'd normally do in Maya to move the camera.
00:52Now you can do that on the first frame or the last frame, I'm on frame1 right
00:56now, but we can also go to the last frame and try positioning for that because
01:00that's where the actress is holding that to her eye to look through.
01:03So the first way is using the Alt key, the second way is a little bit more precise.
01:07What we can do is go find the camera icon and go up to some other view, like the
01:12Perspective1 view, dolly back and find the icon, which is right here.
01:15Now if icon is too small, we can actually scale it up, it doesn't really affect
01:17anything, it's just for your reference.
01:19But you can then use Transform tools like your Move, Rotate, or Scale to try to
01:24get into a better position. And don't forget rotation is very important.
01:28Again scale's just for your reference, it won't to actually affect the view.
01:31The third way you can adjust the camera is just to go into the Channel box
01:35once the camera is selected, enter numbers here by hand, if you want to be
01:38much more precise about it. Now there is more than one solution for this.
01:42In fact, I experimented it myself for a while to try to find a good position for
01:46the camera, a good rotation for the camera, but eventually I found that if I'm on
01:50frame 60, I came up with some values that worked pretty well, and you can enter
01:54these directly into the Channel box.
01:55I found that a position of 44, 24, 120, works well, and then also rotation of
02:01-12, 21, and 0 is good, and that works pretty well.
02:07Now we're not actually going to animate the camera in this case, we just want to
02:12get the position roughed in.
02:13We're not doing a 3D tracking job or creating animated camera, we're simply
02:17going to position the camera to render out of the sequence and actually add the
02:21Motion Tracking inside After Effects.
02:23And Motion Tracking will make it stick to her hand.
02:26So we're just getting the rough position here, which is basically good for
02:29the entire sequence.
02:30You can see it's not touching her hand perfectly.
02:33The one last thing I check on the camera is the lens.
02:35There is a virtual lens here, so if I go to the Camera Attribute Editor, View >
02:39Camera Attribute Editor, one of the first attributes is Focal Length, that's a virtual lens.
02:43This is in millimeters.
02:45So a real camera might have a lens of 35 mm or 50 or whatever it is, and this is the equivalent.
02:50Now a low number is a wide lens, where you see more, for instance, 25 is a wider lens.
02:55And you see more of the surrounding.
02:58A bigger number is a longer lens, like a telephoto or zoom, like 100, here,
03:03would mean that you're zoomed in.
03:05In fact, the spyglasses up here at the top of the frame now because it's so zoomed in.
03:09Now if I had noticed from the set, I could enter an accurate value here, but
03:13because I don't, I don't know what the real lens was that was used on the set, I
03:18just have to approximate it. And actually in this case 35 mm works pretty well.
03:21I can just leave it at that.
03:23And 35 mm is actually a common lens, which is used for shots like this.
03:27Now one quick word about the Film Back, the Film Back is a section that's below
03:31that where you can match a very specific camera.
03:33And this will replicate the camera's aperture, which is the plate where light
03:36enters to start the film or the video.
03:38Now if you knew the camera, you could change it. In fact, all the cameras here are
03:42film cameras, like motion picture cameras.
03:44Now since we don't know our camera, and there is no video camera listed here,
03:47we can just leave it on user, but if you were to work on a project with the
03:50film camera, and you got notes from the set, you can change this to match that
03:53very specific camera.
03:55And any time you change this, it affects the view, in fact, if I just quickly
03:57change this to one of these cameras, you see the view instantly changes,
04:01based on the physics involved. But for now we can just leave that on User.
04:05Now the User is actually set to these numbers, but if you just leave it at User,
04:08you'll be good to go. Now we're back to the default User settings.
04:13So we have roughly positioned the camera to get the Perspective to work for us.
04:16We're now ready to move on to next step, where we'll create lights to try to replicate
04:20the lighting that is contained within the video footage.
Collapse this transcript
Lighting the model
00:00The next step to preparing the 3D model for rendering and eventual compositing is
00:04to match the lighting.
00:05I want to match the Maya lights to the lighting that's actually contained in the
00:09video footage, in other words, the real world lighting.
00:11So you can look at the footage and determine how many lights you have and what
00:15their functions are.
00:16And often when you discuss lighting, you talk about lights as it being the key
00:20light, or fill light, or a back light.
00:22Key light is the most intense light in the scene, it's your main light.
00:26The fill light is a secondary source.
00:28Often this is a weaker light and often this light is bounced off something like a wall.
00:32The third light, which is sometimes there and sometimes not, is a backlight.
00:35That's a light that will be coming from behind the character or from behind the object.
00:39So let's take a look at the footage.
00:41So if I maximize this frame, here, I can see that the light is coming over her left
00:45shoulder. And I can tell that by the shadow on her nose, it's coming from high
00:49and from her left side, and that's the sun, because it was shot outside.
00:53So in order to create a sun, what I can do in Maya is use a directional light,
00:57because of the same type of parallel beams of lights.
01:00So I am going to create a directional light, Create > Lights > Directional Light.
01:03Now, the icon is very small, but I can scale it up--and it won't affect the light
01:08quality--just so I can see it, and then it's just the matter of rotating it.
01:12Position does not matter for this light either.
01:14So I am going to rotate it so it comes from the same direction.
01:16Now, one thing you can do to help you figure this out is to go back to your
01:22Perspective view, go to Lighting menu, and switch to Use All Lights.
01:24You can see instantaneously that it starts to use the lights in the scene to
01:27give you more accurate shading.
01:30Now, the front of my spyglass is dark, which means I need to rotate the light
01:34some more to get it to creep around the front, something like this.
01:37So at this point we can do a test render and see what it looks like.
01:41So I will scale down my Render view, and there it is.
01:44Now, I can use my Alt, or my Option, key and mouse buttons to scroll or zoom in,
01:49for instance, Alt to right-mouse button zooms in, and take a look.
01:52And there is the light in the front of this model.
01:54Now, the sun is creating a shadow like on her nose, so let's also create a
01:58shadow with this directional light.
02:00So with the directional light selected, I am going to go to the Attribute Editor and
02:03turn on Use Depth Map Shadows, and then I can re-render that and take a look,
02:07and there is a shadow.
02:09Now, it might take some experimentation to find a good position for this to
02:12match your footage, and I did try a few different rotations, and I have some
02:16numbers here you can plug in.
02:18I came up with -58, 40, -26, and I'll re-render that, and there is the shadow.
02:27Now, one thing that's happening at this point is the parts that are in shadow
02:31are super dark. They are pretty much pitch-black, and that's not the same as
02:34the video footage where the dark area is not particularly dark. So I am going
02:38to lighten that up, and that's a really good place to add a second light, as a fill light.
02:43So you want to create a fill light, in Maya you can use the ambient light.
02:45So I am going to create an ambient light.
02:47And position on this does matter because it's a combination of directional, omni-directional rays.
02:52So I will put it at the front side of the spyglass and maybe to the left, in
02:57other words, offset the directional light. And then I am going to render a smaller region.
03:01If you draw a region box, you can render that region by itself by clicking the Render Region button.
03:06You can see instantaneously that there is more light in that area now, it's
03:10definitely brighter. That's probably too bright.
03:12One thing I do have to deal with is the intensities of light, not only this
03:16light, but the key light also.
03:17In fact, I should go back to the directional light and maybe increase that to
03:21make a little bit brighter, 1.5 in my Intensity.
03:24And then make the fill light dimmer, so I go back to Ambient Light and reduce that.
03:28And the rule of thumb for a fill light is generally you have at least half
03:32the intensity of the key.
03:34In fact, I can go even lower though, go to something like 0.3 to make it a
03:38little bit dimmer, and then I am going to render this area.
03:40And so we have the dark areas filled in a little bit and the front a little bit
03:43brighter, but not overly blown out in terms of brightness.
03:47At this point you notice that the shadows are very hard-edged.
03:49And it might be nice to get a softer shadow because she has a soft
03:52shadow on her, like around the nose.
03:54So what I can do is go back to the Directional Light, go to the Attribute Editor
03:58then go to Depth Map section. The trick for a soft shadow, what that type of
04:02shadow is to have a small resolution and large filter size.
04:05So I can go straight to Filter Size and make that large number such as 18,
04:09keep the Resolution fairly small, at 512, render that region, and then get a softer shadow.
04:15So there is nice soft shadow.
04:16Now we have two lights so far, you can also place a third light as a backlight
04:20to get some light to sneak around the right side of the spyglass.
04:24So what I can do for that is place a point light in there and the point light,
04:27the position definitely does matter.
04:29And we will put this behind the spyglass to the camera right side, some place like that.
04:34I don't want it to be too bright, so I am going to go back to that one and
04:37turn the Intensity down to, say, 0.2, and then render out a little region to test the right side.
04:43You can see it instantaneously has a little highlight right here.
04:46Now, again you have to experiment with the location.
04:49Now the location for that one I wound up with also, which is 24, 12, -13, and
04:57And I will render this region here, so it's giving me a little extra light in the
05:02right side here, and you can choose whether you want the highlight to appear or not.
05:06Now, I do need to pay attention to the position of the ambient light also,
05:10because that will affect the lighting, even if it's subtle. So I do have a
05:13position on that too, that worked out, which is -6, 18, 23.
05:18Now all lights are rotated and positioned.
05:20Render one more time, and that's looking pretty good.
05:23So now we have worked out the lighting to match the video footage, we're ready to
05:28move on to next step, where we'll set up render passes to render out this model
05:32in separate pieces, which will be recombined in the composite.
Collapse this transcript
Creating mattes and shadows in preparation for rendering
00:00Each time you have to match a 3D model to a piece of live-action footage, the challenges are slightly different.
00:06Now you still have to place the camera, perhaps bring in the image plane for reference, also
00:11create lights, and adjust those lights, but no two steps are going to be the same.
00:16For example, this is the start of the second project where we're going to integrate this
00:193D spaceship with the footage of this actress looking up at the sky.
00:23So, some of the work's already been done here, but we will use some of the steps that we have
00:27talked about in previous movies.
00:29Image plane has been brought in, the image sequence is functioning, so all the frames
00:33are viewable in the timeline, the camera has been positioned, and the goal of camera positioning
00:38is to create the illusion that the spaceship is in the sky above this building.
00:43Now, the camera is positioned for the first frame.
00:46There is no animation on it.
00:47So, the concern is not replicating the exact movement of the camera, but only to rough
00:52in the perspective.
00:54The actual fine motion is going to be added in the After Effects Composite later on.
00:58The other thing that's been done at this point is that the lights have been added.
01:02A similar problem-solving technique where you look at the footage and figure out where
01:06lights are coming from and how you might recreate those.
01:09In this case, the light is coming from the sun high above on the right side of the frame.
01:13So the key light is the directional light placed in a similar position.
01:16There is also a fill light coming from the opposite direction from the ground that represents
01:20bounced light, as if light from the sun bounced off the concrete.
01:23There are only two lights in this situation though.
01:26Now, one new thing that we do with this particular project is deal with shadows on this building.
01:31Also, we can figure out a way to cut the spaceship out so it looks like it's actually behind
01:37the building and not over the top of it.
01:38If I go to this view and maximize it, right now it's in the X-ray mode, but if I turn
01:42off the X-ray mode, you can see it's solid, and it's going to eventually appear as if it's on top.
01:46What we can do, though, is create a piece of primitive geometry and assign it a special
01:50material called a Use Background to capture the shadow, which we can use in compositing
01:54to put it over this building, and also cut out the spaceship so it looks like it's sitting
01:58behind the edge of the building, like it's high up in the air. So let's do that.
02:02So I am going to create a primitive plane.
02:04A primitive plane is going to fit the front of the building quite well.
02:06So I am going to go to Create, you can use the NURBS Primitive or a Polygon.
02:10One thing I am going to do, though, is turn off the Interactive Creation.
02:14I actually want to create this at 0, 0, 0.
02:15So, I am going to turn this off, go back to Create, and then grab a NURBS plane, and it
02:21comes in right there at 0, 0, 0.
02:23I am going to rotate it in the X direction by 90 degrees to make it stand up on its end and then scale it.
02:29It's definitely too small at this point.
02:31The goal here is to scale it in such a way that it covers the front of this building,
02:36as if it's a front wall.
02:37So I am just going to make it nice and skinny and long like that.
02:41Now, in order to see through this, to see through the image plane, I'll go back to the
02:44X-ray mode, and here is the X-ray button right here.
02:47So now I can see through it.
02:49So I want to loosely fit this plane to the building, just under the edge, not too tight
02:55to the edge, maybe like this, actually underneath these little castle indentations here.
03:00Now, the perspective is working quite well on this.
03:02The reality is, though, if you were to set this shot yourself, or you had some different
03:05footage, you might have to spend more time working with the position rotation of this
03:09geometry and also the position rotation of the camera.
03:12For instance, if I was to move the camera to a different position, you can see that
03:16obviously the plane does not match perspective any longer.
03:19The choice here would be to rotate and position the plane to get to a fit or to go and work
03:23on the camera some more to get into a better position, and you might have to go back and
03:27forth, camera to plane, camera to plane 'til you work it out.
03:30It's not instantaneous.
03:31Now, since I did some work on this already, I can just back up to my previous view and go from there.
03:36So I did some of the hard work in advance to get this to look like it's in the correct place.
03:40Now, we can assign it to that special material.
03:42So I am going to go to the Hypershade, and inside to Use Background, which is the last
03:47regular material right here.
03:48So, I am going to click that Use Background, get the new material, select the plane, and
03:53then right-mouse marking menu, and choose Assign Material To Selection.
03:56It's going to turn a slight greenish color to indicate it's using Use Background.
04:00But the way Use Background works is it captures the color whatever is behind it.
04:05If you have an image plane there, it actually uses the image plane as its color.
04:09Now, if I was to get rid of the image plane, it's going to use the empty background color,
04:13and that actually works much better.
04:14So I am going to go to the Image Plane Attributes, Image Plane > Image Plane Attributes, and
04:20turn the Alpha Gain to 0.
04:21And again, that will hide that image plane from this view.
04:24Now, if I render this out and then take a look at the Alpha or the RGB, you will see
04:28how it's different from the regular material.
04:30Now, I am looking at the Alpha right now, and this is the Alpha button right here.
04:34Whatever is white is opaque, wherever is black is transparent.
04:38You can see how the primitive plane with the Use Background cuts a hole into that spaceship.
04:43If I go to the RGB, you will see the same result, spaceship is cut roughly where the
04:48edge of the building is.
04:49So, because there's an image plane behind this, Use Background surface, you get this result.
04:55Now, another thing this Use Background material does is actually capture shadows.
04:59If I was to move to layer frame sequence, say, frame 90 and re-render, you will see
05:04that the shadow cast by the key light which is already set up is going to appear right
05:09here in the Alpha Channel on this plane. So I will re-render this.
05:13Now, RGB is not very exiting. The ship has not been cut out.
05:17However, if I go to the Alpha channel, you will see the shadow cast by the key directional light is right here.
05:22Now, it's just in the Alpha Channel while the RGB is black.
05:25But what we can do in the composite later on is pull this out and place it back over
05:29the footage to make it look like a slightly darker shadow area, which will help with the realism.
05:34So you can use the Use Background material as an Alpha matte, basically the color holding
05:38something, and/or to capture shadows.
05:41So this is a really good trick to have realism later on.
05:44Now, one last point about this, now again the camera has been pre-positioned, but if
05:49I turn back on the Image Plane, you will see a potential issue.
05:52I will turn it off again back to 1, and I will maximize this once again.
05:57If I scrub through the footage, you will see that the building plane is not really following
06:02the building in the footage.
06:04That's not really a concern at this point.
06:05Our primary concern is the perspective is roughly the same.
06:08However, I am not worried if it breaks a little bit.
06:10What we're going to do is apply motion tracking in the After Effects to solve that fine motion.
06:15So, I just worry about the perspective at this point, since the camera is already set
06:18up, we're good to go there.
06:19Now, one last thing I can do is maybe take into account these little notches in the building,
06:23and you want to cut it out of the ship to get those little notches.
06:26So, what I can do with this big plane is make a copy of it and scale those copies down to
06:31fit that kind of castle-like top.
06:32So I can do a Ctrl+D, or Command+D, to copy this right here, that copy is right there.
06:37I can go ahead and scale it, make it skinnier, and move it up a little bit and create those little castle cut-outs.
06:43I will go ahead and do Ctrl+D again, make a few more of those.
06:47I don't want it to be too tight.
06:48It's a little bit loose, so I want to hit the edge too perfectly, because we're going
06:51to fine-tune that later on in the composite.
06:54So I made four copies of that main plane to make those castle-like protrusions, because
06:59our copies are still using these backgrounds.
07:01So since we have our camera, our lights, and also our special plane to capture our shadows
07:06and do the Alpha matte, we're ready to go on to the next step where we'll create render
07:09passes to render out that spaceship in different layers so we can recombine those in the composite.
Collapse this transcript
2. Introduction to the Render Layer Editor
Using the Render Layer Editor
00:00When rendering CG you have the option to render in render passes.
00:04Render passes split up a render into different shading components.
00:08For example, you can render the diffused color separate from specular
00:11highlights, separate from a shadow, for instance.
00:13Now normally when you render in Maya, you get a beauty pass, and that's all the
00:17shading components combined, that's what you are used to seeing.
00:20But you do have the option to render as render passes, and these are great for
00:24compositing, it gives you a lot of flexibility because each component is on a
00:27different render, which you can affect separately.
00:29There are several ways to create render passes in Maya.
00:32There is a simple way, which is through the Render layer Editor, and there is
00:35a more advanced way, where you go through mental ray and use the Contribution Map System.
00:39We are going to start with a Render layer Editor.
00:42Now we are not going to use the result of this for the final project, but
00:46this is very good to know, and I'll show you a quick way to create some very simple passes.
00:51I am going to start with where we left off on project 1, this is shot1_step3.
00:55We're going to have the spyglass and the lights set up, and it's basically ready to
00:58render in some form. So, how do you use a Render layer Editor?
01:01Well, it's in the channel box, so if you bring up the channel box, you'll see
01:03it's right beside the Display layer Editor, which you normally use to just hide
01:07or show objects in different layers.
01:10So we click on the Render tab, there's the Render layer Editor.
01:13In this case you always get a master layer for free, and the master layer contains
01:17all of the objects in the scene, everything, all the services and lights.
01:20Now you can make a new layer at any point.
01:22What you can do is select an object, for example, I am going to select that spyglass.
01:26I'm going to go to the Hierarchy mode, I want to pick it as a Group, click on
01:30it, go over here to the Render layer Editor. I can use one of these shortcut
01:34buttons, in fact, the rightmost button is Create new layer and assign selected
01:38objects, so I can click that, and there is a new layer.
01:41If I click on layer1, which is brand new, so it turns blue, we'll see that the
01:45spyglass is on that layer by itself.
01:47So it's similar to Display layer Editor, however, this is ultimately going to
01:51affect the way things render.
01:53Now if I render this at this point, the spyglass itself is going to be just pure
01:57black, because there are no lights.
01:59You have to consider what lights are on your layer also for rendering.
02:03What I can do though is go back to the master layer--and again, here is
02:06everything--and pick my lights.
02:08Now I am going to use a shortcut, I am going to go up to the Hypergraph, you can
02:11also use the Outliner.
02:12I am going to select those lights by just selecting the nodes there just by
02:16drawing a marquee over it and go back to the Render layer Editor then, click
02:20layer1, so it's blue, right mouse-click and Add Selected Objects.
02:25So you can add objects to a layer at any point, and you'll see that the shading
02:30becomes bright again, it's not black, and then I could test render it.
02:33Now there is one thing you have to consider, and that's the Image Plane that
02:36I have attached to my perspective camera is still there.
02:40So I think I'm going to actually hide that, so it doesn't show up in the render.
02:44So what I can do is go up to View here for the perspective camera, go to Image
02:48Plane > Image Plane Attributes, select that one Image Plane, that I had
02:51previously loaded--you'll see it right there in the sample--but then turn Alpha
02:55Gain to 0 and again that's the trick for hiding it from that view.
02:58Now if you do a test render, there's a spyglass by itself, and I'll shrink that
03:02render down so I can see it. So that's it.
03:05Now this is not very exciting because I have the spyglass and the lights, and
03:09there's not really anything else in the scene, but let's test the fact that you
03:12can have different objects on different layers, in this case. So I am going to
03:16hide this, and then create a brand-new piece of geometry.
03:19For instance a Sphere, just so we have something in there we can see. I am going to scale
03:23it up and then go back to the Channel Box by clicking the Channel Box tab right here.
03:27Now if you go back to the master layer, it's on the master layer automatically.
03:30Now because it created on layer1 while that was selected, it's also on layer1.
03:34So it matters where you create it, what layer you're currently on.
03:38But what I can do now is delete that, so it goes away, go back to master layer,
03:43again, there's everything, then create it while I'm on master layer. So let's create a
03:47new Sphere, scale up so you can see it.
03:50All right, that sphere again is on the master layer by default, everything goes there.
03:53But if I then go to layer1, it's not there.
03:56So you can create objects to always be on the master layer, but you can choose
04:00what layer they are on.
04:01Now I can add that sphere to that layer later, but if I never created on that
04:06layer in the first place, it's not there until I say Add Selected Objects.
04:09So master layer everything, layer1 just the things that I added and nothing else.
04:13So now I am ready to create some additional layers and then use the render pass
04:18options to create some actual render passes.
Collapse this transcript
Splitting a scene into multiple render passes
00:00Once you start using the Render layer Editor, you have the opportunity to
00:03create multiple layers.
00:05Once you have multiple layers, you can turn those into special render passes.
00:10There is a simple way to do it through the Render layer Editor, which we'll talk about.
00:14So we're picking up from the last movie where we have the spyglass set up on its
00:19own special layer called layer1, and of course, we saw the master layer.
00:22Now one thing you can do is rename a layer, and this will be good because we
00:27need to create multiple layers, to create some additional render passes.
00:30So if you just double-click, you can rename a layer. I'm going to call this monolayer,
00:34named after the monocular. And you can duplicate layers just right here through the
00:39Render layer Editor by right mouse keying and choosing Copy layer, that will
00:44copy the entire layer, you'll get all the same objects assigned to it on that layer.
00:48So I can go to that new layer, and it looks just the same.
00:51I'm going to do that one more time, we need a total of three in this case, and
00:55there are three layers.
00:56Now the reason I'm doing that is I want to have three layers for three different
00:59render passes, each layer can have its own pass.
01:03Now, how do you create a pass? What we can do is go through a layer, right mouse
01:07key, and pick Attributes.
01:08This brings up the Attribute Editor, and if you scroll down near the bottom,
01:11you'll see there is a Render Pass Options section.
01:13Now by default this is set to Beauty.
01:16That's what you normally see when you render, it's a Beauty pass, always showing
01:19components put together as what you would expect.
01:22What we can do is turn off the Beauty and pick some other Render Pass and they
01:26come with several here in this case.
01:28Now this is an older system in Maya, it's not as advanced as mental ray, but
01:32it's a quick way to make these few render passes.
01:34The first one is Diffuse. That's just the color.
01:37So I'm going to turn on Diffuse for that with Beauty off.
01:40Now I go back to Channel Box.
01:41I can go to next layer and pick a different Render Pass for that.
01:45So I can right mouse key there, go to Attributes, and once again that layer is set to Beauty.
01:49I can check that off and pick something else, for example, Specular.
01:53Click on Specular, I am going to go back to the Channel Box.
01:56Now since this second layer is going to be a Specular render pass, I'm going to
02:00rename that just so I know what's going on there.
02:03We call it speclayer.
02:04I can go to third layer now and then change the Render Pass for that.
02:08Right mouse key, Attributes, once again, set to Beauty.
02:10We can turn off Beauty and turn on another pass, for example, Shadow.
02:14This is going to be the Shadow pass. We'll go back to the Channel Box.
02:17I'm going to rename this so I know where it is, and I'm going to call it shadlayer.
02:22You can use any names you want as long as it make sense to you.
02:24So what'll happen is these three layers will render with these different render
02:29passes, the Diffuse Pass, Specular Pass, and then the Shadow Pass.
02:32I know they will render, because this leftmost icon indicates whether a
02:35layer will render or not.
02:36They have that little green checkboxes, or checkmarks.
02:39Now the one that has a red X means it's not going to render, so you can turn
02:44these on or off, but I want to render these three.
02:47Now you can actually render all these three layers right in the Render view.
02:50We have to set up some extra options so to make sure it's working correctly.
02:52I'm going to go to Options on the Render layer Editor, and normally when you go here,
02:56this is the way it looks by default.
02:57You'll see the Render All layers is not checked, we actually want to check that on.
03:02If you check that on just by selecting that one time, then all those layers will
03:06render when you go to the Render view.
03:08Now how they render is up to the Option box, so I'm going to go to the Option
03:11box, there are a couple different variations. Now by default, it just says, Composite layers.
03:17That means it's going to render all three layers, in this case individually, and
03:20show me the Composite result.
03:22And actually the Render layer Editor serves as a very simple compositing tool.
03:26We're going to start with that.
03:28Now, because these are composite, it's going to work pretty much like Photoshop.
03:32It's going to stack these layers, giving preference to the top except where
03:35there is transparency.
03:36Now you can choose how the compositing occurs through the blending mode.
03:40There are actually simple blending modes up here.
03:42Each layer has a menu right here.
03:44Now when set to Normal that means we have the Normal style compositing, pretty
03:48much like Photoshop in default. You can change this.
03:51So, for example, if we go down to the monolayer, I'll leave that Normal.
03:54But then go to speclayer, and change that to something that's going to work with
03:58the Specular render.
03:59Specular render is just the highlights, so I can actually set that to Screen.
04:02And we're going to talk more about blending modes when we get to After Effects,
04:06but blending mode determines how the layers are combined mathematically.
04:09So in this case, Screen works well for Specular.
04:12Now I'll go to the Shadow layer and switch that to Darken, that also works well for shadows.
04:18So Darken, Screen, and Normal.
04:21Now I'm going to the Render view, in Render, we'll see what happens.
04:25It's going to render each layer individually, and you'll see a pop on the screen
04:28for a second, then it starts showing me the Composite result.
04:31That's the composite result of all these three separate layers.
04:34Now we can see them individually, if we choose another setting, but the first
04:37thing you need to do is clear out the buffer, because what happens is Render
04:39view stores a buffer of all the past renders.
04:42So what I can do is go to File > Remove All Images from Render View, this will
04:48clear out the Buffer.
04:49Now I'm ready to render again, but I need the check the Options on the Render All layers.
04:53I can switch it from Composite layers to Composite and keep layers.
04:57If I switch this to Composite and keep layers, all layers will be stored in the buffer.
05:01Now remember, you can't just close this window, you do have to apply it.
05:05So, Apply it, and then you can Close.
05:07So, now if I render this, you'll see the layers pop up one at a time, and then
05:11you'll see the final result.
05:13Now, even though I cleared out the buffer in the Render view, I still have this slider
05:14down here, and this slider allows me to scroll through the layers.
05:18So the first thing you will see is the Composite result, second thing is
05:20actually also Composite Result, the third thing looks black.
05:24It's actually the shadow layer, the top layer. It's in the Alpha Channel.
05:29We go to RGB again, then the next section is the Specular layer.
05:32This includes reflectivity.
05:34If I go to last one, that's the Diffuse or the monolayer, basically this layer
05:39at the bottom. So if all your layers here are stored in the Buffer, and then the
05:43simple Composite results.
05:44Now this is not an advanced compositor, but it's good enough to test how
05:47different layers might be combined later on in a program like After Effects.
05:51So in this movie, we set up additional layers by copying the first layer, we have
05:56assigned render passes through the Render Pass Options section to create
05:59Diffuse, Specular, and Shadow Renders, and we learned how to render out those
06:03passes within the Render view.
Collapse this transcript
Adding flexibility by assigning material and render overrides
00:00Once you start using the Render layer Editor in creating custom layers, you can
00:05do a lot with just the render pass options to create render passes.
00:08However, there are a limited number of options there in terms of Diffuse, Shadow,
00:12Specular, and so on.
00:13You can create more complex render passes if you use some Material Overrides.
00:17Material Overrides is the option to the Render layer Editor to assign material
00:22to entire layer temporarily.
00:23Beyond that you can also use Render Overrides. Render Overrides give you the
00:28option to render out a particular layer with very specific render settings that
00:33are unique to that layer. So let's give that a try.
00:36So I have gone back to shot 1_layers2 and here we have our three custom layers,
00:40and they are all set to different render passes, one's Diffuse, one's Specular, and one's Shadow.
00:46In this case, Specular is on the top, Shadow is in the center, and Diffuse is on
00:50the bottom above the master layer. All of those layers are turned on the render.
00:54Now we can create a brand-new layer and assign a custom Material Override.
00:57So what I will do is I am going to copy just this monolayer here, the Diffuse
01:01layer, right mouse key, Copy layer. There is a brand-new layer.
01:04I am going to turn off all my layers in terms of rendering except for that new layer.
01:09For the Material Override, I can right mouse key, and there is an Overrides menu.
01:13If I go further, there is Create New Material Override, and then you get a long
01:17list of all the materials inside Maya.
01:20The first few are Maya materials, and you have a long list of mental ray materials.
01:24You can pick anyone's of those materials.
01:26For example, if we want to create a special layer that renders all the mattes
01:30--and matte being a solid black and white renderer you can use in compositing to
01:33cut something out--what I can do is go up to Surface Shader and select that.
01:38Once I select that material, that material is assigned to everything on that layer.
01:42In fact, the color changes instantaneously.
01:44Now it's pure black right now, but if I change the color of the surface shader,
01:49we will be able to see it.
01:51So I am going to go to the Hypershade, and that material I assign is the
01:53last one on the list.
01:54So I can double-click that, open its attribute editor, and then change its color.
02:00Now the surface shader of the color is set by the Out Color.
02:03So I can change that to White, and that's more useful in this case.
02:06Then close the Hypershade and do a test render.
02:09I am going to go back to the Channel Box though, because I want to double-check
02:11my options on my render layer.
02:13I am going to go to Options > Render All layers, look at the option box.
02:16Right now, I am set to Composite and keep layers.
02:18Now I only have one layer that's going to render here.
02:20So I can actually just go to composite layers. That's fine. Hit Apply, and then hit Close.
02:25So I am going to render out this window here, and there it is.
02:28This is your custom matte pass.
02:30What you have is a solid white object over a black field, and that's all in RGB.
02:35You can use that in the composite later on to cut something out, and
02:39actually for this particular project, this becomes very useful.
02:41So when it comes to assigning Material Overrides, you can pick any material that
02:45you might find useful, again, to assign to all of the surfaces on that layer,
02:49it's only temporary--or I should say it's nonpermanent--because if I go down to
02:53the master layer, all original materials are still there and unaffected.
02:56I also mentioned it's possible to create custom render passes by altering the
03:02render settings for a particular layer. There is a different way of doing that.
03:06For example, if I turn off this layer and go back down to my original monolayer,
03:10turn that back on, what I do is click this third icon button, which is a Render
03:14Settings Override button, and click that.
03:16That actually brings up the Render Settings window.
03:19However, in a special layer mode. In fact, you can tell that by going up here
03:23and looking at the title bar. It says Render Settings (monolayer).
03:26That means that these are the render settings just for this layer.
03:30You can create an override for any of the attributes that appear here.
03:34So for example, I can switch the Render Using to a different rendering engine
03:38just for this layer. How do you do that?
03:40Well, you right mouse key over an attribute name, like this, Render Using right
03:45mouse key, and choose Create layer Override.
03:48As soon as you choose that option, that particular name turns orange.
03:53Once it's orange, I can pick a different option like mental ray.
03:56It switches to mental ray.
03:58That means that just this layer is using mental ray, because this is an override.
04:04Now to remove that override you can right mouse key again over the name and
04:07remove it, but as long as it's orange that's a unique override for that layer.
04:11Every layer can have a different set of overrides.
04:13You simply click one of these buttons right here with a little clapboard and
04:17then choose an attribute right mouse key and then Create the Override.
04:21So now if I was to render out all these various layers, even if they are all on,
04:25only this one is going to use mental ray.
04:27The other ones use Maya software by default, because we go back to the
04:31master layer, the master layer has a default setting.
04:33So any layer that does not have an override uses the master layer as reference.
04:37In fact, the master layer has a tab for every single rendering engine on it.
04:42So it serves as the master.
04:44Note that using the Render layer Editor to create render passes and to use
04:48Material Overrides and/or Render Settings is just one solution for breaking up
04:52the render into different passes where you have different shading components.
04:55We also have the mental ray contribution map system, which we are going to talk
05:00about in the next chapter.
05:01So using the Render layer Editor is really just for your knowledge.
05:04It's very good to know that, understand how it works.
05:07We are going to use a mental ray system for project 1 and project 2.
Collapse this transcript
3. Creating Render Passes with mental ray
Creating render passes using mental ray
00:00So far we have set up render passes through the Render layer Editor.
00:04Now we are going to move on and use a mental ray Contribution Map System to set up render passes.
00:09This is a more advanced method, and it will give us more control.
00:12So back to project 1. This version of the file, which is shot one step three only
00:17has a master layer, which is fine.
00:19We don't need any other custom layers through the layer editor at this point.
00:22What we can do is go straight to mental ray and set it up through the mental ray
00:25settings in the render settings window.
00:27Before we do that though, there are a couple of good things to do just to make
00:31sure that when we do render, everything is going to be nice.
00:33One is we need to hide the image plane.
00:35So this will show up in the Batch Renders, and that's not a good thing to have
00:38it in the background.
00:39So I am going to go into View > Image Plane > Image Plane Attributes.
00:43I am going to turn Alpha Gain back down to 0, and that hides it from that view.
00:49Now we can go into the render settings window, and if it's not already switched,
00:52switch to mental ray.
00:54Once on mental ray you have all the different mental ray tabs.
00:56Now since we are here let's check the quality. We are going to make sure we have high quality.
01:01So in order to change the Min Sample Level and Max Sample Level, we can change
01:04the Custom Sampling and switch from 0 to 2. Now low quality would be -2, 0.
01:10High-quality will be 0, 2. So 0, 2 is good in this case.
01:15So now we can set up some passes.
01:16And this happens to the passes tabs in this window.
01:19Now initially there are no passes here, but you can create them through
01:23this Create render pass button, right here, and here is a long list of mental ray render passes.
01:28Now we don't need all of these, but there are actually five, in this case.
01:32So it will be good for this project where we need to integrate this spyglass
01:35with the footage of the actress.
01:37What we can do is click one of these--or select more than one by Ctrl-clicking, or
01:41Command-clicking, the names. So let's start picking a few.
01:45The first one we want is called Diffuse Material Color.
01:48I am going to describe these in the second. Let's go further down.
01:52The next one we need is Matte. So I am going to Ctrl-click that.
01:56The next one after that is Reflection. Control click.
01:59The next one is something called Raw Shadow. Now it's easy to get these mixed up.
02:04There are multiple shadow variations, there's a shadow here.
02:07We actually want Raw Shadow. That will produce a slightly different result.
02:10So Raw Shadow, and then last one is Specular. Let's talk about what these are going to do.
02:16Diffuse Material Color will render the diffuse color, but without shadows,
02:20and without shading.
02:21The next one Matte, we talked about this a little bit before, but a Matte will
02:26render a white and black version of the image you can use to cut out something in the composite.
02:31Raw Shadow will produce a shadow, and this will be a white and black render of
02:35the shadow just in the RGB.
02:37Reflection is just the reflective component, and Specular is a just a specular component.
02:41So we have these picked now. Let's go ahead and Create and Close, and they're listed in the
02:45scene passes section.
02:46We can now pass these down to the next section, which is the Associated Passes
02:50section by using this Associate button. And those are brought down.
02:54At this point, if we go further down I can make a contribution map, and this is
02:59something necessary to associate the passes with the render, in that particular
03:02layer, which is the master layer.
03:03So to make a new contribution map, I can use this button right here.
03:07Now if I have to go back to the Render layer Editor, I will do Ctrl+A here.
03:12You will see there is a master layer. There is nothing underneath it.
03:15If I click this Creates button, it gives me a little dropdown arrow.
03:18If I expand that, you'll see that it makes a new contribution map.
03:21It must be numbered based on what was in the scene previously.
03:24Numbers don't really matter, but I will say pass contribution map.
03:27It's also listed right here in the menu.
03:29So now we can go back to these passes, Shift-select them, and then use this
03:34Associate button to draw from down and associating with that map, and now they
03:38are associated with that map. So we switch to mental ray.
03:41We have created five render passes that will be useful for composite, and now we
03:45are ready to set up the scene to start batch rendering.
Collapse this transcript
Batch rendering render passes: Project one
00:00At this point we have set up five render passes through mental ray's contribution
00:04map system for project 1.
00:05We have the five passes listed here inside the Render Settings window and those
00:10are associated with passContributionMap2. And that contribution map appears in
00:14the Render layer Editor under the master layer. We're now ready to try Batch Render.
00:19There are a couple of other things we need to check to make sure that the
00:21render goes as expected.
00:23One is, we want to make sure that we set the project so that renders
00:26go where we expect.
00:28So File > Set Project, in my case, I want to select the exercise files folder.
00:32And what will happen during the render is the rendered images will be placed in the
00:36Images folder underneath this folder.
00:38So now I'll click the Set button, and everything I want to check is a Common tab
00:42in the Render Settings window to make sure I set all of the common render
00:46attributes, including the name. I'm going to call mine Shot1Monocular.
00:50Then the Image format.
00:52Now what's interesting is, if you set it to PSD Layered, mental ray will take all
00:57those render passes and place each one on a separate layer of a Photoshop file.
01:02So you'll have one Photoshop file per frame, in that single file we have all the
01:07different render passes arranged as layers.
01:08This is really convenient for bringing the render into After Effects.
01:12Next I want to check my Frame/Animation extension.
01:14In this case, we are going to start by testing a single frame.
01:17So this is good, name.ext.
01:19Then I want to check my render resolution, and we have been working in HD 1080, so this is good.
01:24And it couldn't hurt to double-check also, the Quality tab, to make sure
01:28Anti-Aliasing settings are good.
01:30Now we set this to 0, 2, earlier on, and that's good because that's high-quality.
01:34So we have our Common tab set, and then we know where we're going to render.
01:38So we're good to try Batch Render. I am going to close this window.
01:42Go to the Rendering main menu and then go to Render > Batch Render.
01:45If you want to see the progress you can open up the Script Editor.
01:49There is a button down here at the bottom-right for that.
01:51This will show you the progress.
01:53It's rendering the single frame now, and that will show you the percentage.
01:56Right there it is 100%.
01:57So I can get out of Maya now, go to my folder, go into the Images folder where I put the images.
02:03The way it works as a layered PSD is you will have each layer rendered
02:07separately, and placed in a separate folder, and these folders will be named after
02:11the layer, such as matte.
02:13Those are initially Maya IFF files, which is Maya's native image format.
02:17Once it finishes all of the layers for that particular frame, it combines all
02:21those layers, places them into the layered PSD file, which is right here, then
02:25the original IFFs are destroyed. So you have empty folders, like right here.
02:30But everything's stuffed within this PSD file. So I can open that.
02:34So now we have all the layers in this PSD file, and they appear on a layer
02:39Editor at the right here.
02:40So I can turn these various layers off and take a look at them one at a time.
02:45Now the first thing you get is a background.
02:47The background is a solid color of empty space in Maya, that's given to you for free.
02:51You don't actually have to use it, but it's always on the lowest layer.
02:55Now in our case next layer is Matte. This is a matte pass white on black.
02:59Next one is diffuseMaterialColor, which is the color of the render, but there's
03:02no actual shading, or shadows, just the color. The next pass is the shadowRaw pass.
03:07This is what you get when you pick Raw Shadow. It's a white shadow against black.
03:12Now there's a way to make this work in After Effects, which we'll talk about later.
03:16The next is a reflection component, next is a specular, which specular
03:19component without the reflection, and the last one that mental ray gives you is MasterBeauty.
03:24This is actually a beauty render, which you would normally get if you did not render passes.
03:28It gives you that for free also. You don't have to use it.
03:31It's just there for reference.
03:33So we have rendered one frame successfully through the Batch Render.
03:36Now we can go back to Maya, and I can show you how to batch render the entire
03:40sequence, because we do need all of the frames so we can go into After Effects
03:44for the entire sequence.
03:45So going back to the Render Settings window instead of rendering a single frame
03:49I need to switch to name.#.ext.
03:52This is very important in terms of having the files be read in the correct order by After Effects.
03:58You always want to use name.#.ext.
03:59There are other options down below that, this is the one you want to use.
04:04Another important thing is often skipped is the Frame Padding, which is right below that.
04:09Frame Padding determines the number of numeric places between the dots.
04:13So you can see it up here where it says .1.psd, .10.psd.
04:18If Frame Padding is on 1 you don't get any extra numeric places.
04:22What we want is to have consistent number of numeric places though, so the After
04:25Effects tell them how to read them in the correct order.
04:28You'll get confuse with this numbering system.
04:30So what I can do is let's go up to a higher number, for instance 3, and
04:35therefore it goes .001 and then .010.
04:39So in Frame Padding, the 3 actually works from frame 1 up to 999.
04:44So if you set to 3 you're safe there.
04:46It's an important step otherwise the files might come in the incorrect order
04:50inside After Effects.
04:51So once you set the Frame/Animation extension to name.#.ext, set the Frame
04:56Padding to non-one number, you are ready to batch render the entire sequence.
05:00What will happen is it'll render the entire range set by the Frame Range section.
05:04So in our case, we want to set this to 16, that's a duration of this premade animation.
05:10So at this point you are ready to batch render the entire thing.
05:13You'll launch it the same way, you'll go to Render > Batch Render, and go to the
05:17Script Editor, and it will show you the progress, and when all 60 frames are
05:21finished you'll have 60 layered PSDs.
Collapse this transcript
Batch rendering render passes: Project two
00:00We're now going to move on to the Project 2 and prepare that for rendering.
00:04We're also going to use mental ray contribution maps and render passes for this render.
00:09We want to split this spaceship up into multiple render passes.
00:12Now in order to do that, we have to go through some of the steps we have already discussed in Project 1.
00:16It's not a bad idea to get some practice, and in fact some of the render passes we will
00:21choose for this particular project will be slightly different from Project 1.
00:25So let's get started setting this up for the render passes and the render.
00:29The first thing I want to do is once again hide the image plane.
00:31So I want to turn Alpha Gain to 0.
00:33Then we want to go right to the Render Settings window, and if I am not already there, make
00:38sure I have set up mental ray.
00:39Then I want to go to the Quality tab and make sure my Anti-Aliasing is good enough.
00:43Right now, it's set to a lower quality, so I'm going to switch to Custom Sampling and set to 0, 2.
00:49That's high quality. Now we can set up some passes.
00:51I'm going to go back to Passes tab, and right now it's empty.
00:55Click the Create Render Passes button and pick some passes.
00:58Now this one is going to use a slightly different list as compared to Project 1, and I'll discuss how it varies.
01:05The first one we want is Diffuse Without Shadows.
01:08Next, we want Incandescence.
01:10I'm going to Ctrl-click or Command-click that. Next is Matte.
01:14After that we have Reflection, and then comes Raw Shadow.
01:18Again, pick Raw Shadow, and now just Shadow.
01:20So Raw Shadow, and then there's the Specular that's also a little bit different, and that's
01:24Specular Without Shadows.
01:26So the new ones here in this case are Diffuse Without Shadows.
01:30So that's actually the color of the surface with the shading but no shadows.
01:35And I say shading in terms of the dark versus light areas.
01:39Incandescence is also new.
01:40That's because this particular spaceship model has incandescent logos, and we also have
01:45Specular Without Shadows which is just a specular pass but no cast shadows.
01:49So now we have picked render passes now we can click Create and Close.
01:52That makes them list in the Scene Passes section.
01:54So then we can click this Associate button and pass them down to the next section which
01:58is in the Associated Passes section, and now we can make a Contribution Map, because right now we have none.
02:03I'm going to click this Create new pass button here.
02:06If we go to our Render Layer editor and go back to the Channel Box, you'll see that ContributionMap
02:12is listed here underneath the master layer.
02:14Now we have a contribution map, I can go back to my passes, Shift-select them and associate
02:20them with our ContributionMap, and there they are.
02:23Now we can go on to our Common tab and set up all our common rendering attributes.
02:27For instance, the name, I will call mine Shot2Ship.
02:31Once again, we want to use the PSD layered so we can stuff all those rendered passes
02:35into single Photoshop files.
02:37We'll test one frame first and name.ext is fine here.
02:41We'll double check our resolution, and we still have HD, which is good.
02:45So these are all set here, and I can double-check my project settings, File > Set Project.
02:51I want to pick my Exercise Files folder, so all the images are rendering to the Images folder below that.
02:56Click Set, and now we're ready to test the frame.
02:59Let me close this window, go to Render > Batch Render.
03:03I go to Script Editor and take a peek.
03:05Now this renderer is going to be slower than the render for Project 1.
03:08There is lot of reflectivity and special maps like Incandescence which slows it down.
03:13All right, there it's finished.
03:14Now we can go out of Maya and go to our Exercise Files folder, and right below exercise files--
03:19in my case if I go to the Images folder--this is where it's going to render.
03:23Now much like the spyglass render, it's going to place those render passes in separate folders
03:28initially, then combine them into a single PSD, and then get rid of the original IFF renders.
03:34So these folders up here, some of these are from the spyglass render and some are from
03:38this render, but all these folders are now empty.
03:40The final render for the ship is right here Shot2Ship, so I can open up that in Photoshop,
03:45and here it is, and here is layers. So let's take a look at the layers.
03:49Once again, we have the background, which you get for free, and that's just solid black.
03:53Next is Incandescence. That is the Incandescence logo.
03:56Next is diffuseNoShadow.
03:57So this is diffuse color quality, but there is shading.
04:01In other words, the bottom is a little bit darker, but there's no cast shadow.
04:04Next is Matte, once again, a white on black render.
04:07Next is ShadowRaw where you get to cast shadow as a white render over the black.
04:12Next is the Reflection, and the here below MasterBeauty is specularNoShadow. That's just
04:18specular with no cast shadows.
04:20And you'll also get the MasterBeauty pass for free. So that's working.
04:24So let's go set it up for a batch render where we can render all the frames.
04:28We'll need all the frames so we can composite.
04:30We go back to Maya, go back to Render Settings window, and there is really only two things that change here.
04:36One is you need to change the frame animation extension to name.#.ext.
04:39Again, this is very important to make sure After Effects selects the files in the correct order.
04:44Also, we need to adjust your Frame Padding to a higher number such as 3 to make sure
04:49we have the correct number of numeric places--or at least that they are equal for all the numbers.
04:54In other words, frame 1 has the same number of places as frame 10 or frame 100, et cetera.
04:59Right now, we set these two things.
05:01We're ready to batch render the entire sequences.
05:03We do need to check our frame range. It's set to 1 to 10 by default.
05:06We actually want to render frame 1 to 90, because that's the duration of this pre-animated sequence.
05:11So I'll set this to 90, and now we're ready to batch render.
05:16So same approach, Render > Batch Render. Now I'm not going to launch it now.
05:19It's going to take a long time, but once this is launched you'll see all 90 frames we have
05:24rendered out, and you'll have 90 separate layered PSD files.
05:28Now the images have been pre-rendered for you, and they're included in the exercise
05:32files if you don't want to wait to render this entire sequence.
05:35The final version of this particular file where you have all of the different render
05:38passes is already set up for you and all the render settings set for you is saved out.
05:43I'd like to take a look at that's called shot2_render.ma.
05:48
Collapse this transcript
4. Recombining Render Passes in After Effects
Importing render passes into After Effects
00:00We now are ready to move onto After Effects.
00:02So in project 1 we set the lights and camera to render out the spyglass.
00:07We also set up mental ray render passes to split out that render into multiple render
00:12pass layers within a layered PSD image sequence.
00:15So we are going to bring those renders into After Effects and also bring in the original
00:20footage that was shot with the actress.
00:22Before you do that in After Effects, though, I want to check a few things.
00:25One we want to make sure we are working in new project.
00:27So I am going to go to File > New > New Project.
00:30I am not going to save the old one, and then also I want to check to see where the settings
00:34are in terms of how the timeline is going to work.
00:36Now since we are working with Image Sequences, it's often useful to not work in Time code,
00:41but to work in Frames. I'll show you where that is.
00:43If you go up to File > Project Settings, under Time Display Style, the option of Time code--
00:49which is default--and also Frames.
00:51Frames are much easier to work with in this situation.
00:53So I'll click on Frames and click OK. Now we're ready to try to bring in some footage.
00:58Let's start with the live action. I am going to go to File > Import > File.
01:04The original footage is under the Footage folder under Shot1.
01:09Now this is--once again--an image sequence, which means I have a folder full of 60 different frames.
01:15However, if I pick the first one, and if this option down here, Targa Sequence, is checked,
01:21which it is this by default, After Effects will actually bring in this series of images as a single unit.
01:26Now this does depend on numbering, and this is why it's important to choose a correct option in Maya.
01:30In the scene it says shot1.000.tga and so on.
01:34You have to make sure you have the same number numeric places for the number.
01:39Three here for 000 and then three here for 001 and so on.
01:43If you follow that order, then After Effects will bring them in correctly.
01:46That's actually a frame padding option within the Render Settings of Maya.
01:50But so long as you render it correctly so the frames are in the correct order, After
01:54Effects will know what to do with them.
01:56So if I click Open, they'll come in as a single unit.
02:00You'll see right here shot1 from frame 0 to frame 59, you'll see up here all the various settings for that.
02:06It's 1920x1080. That's resolution. 60 frames in duration and 24 frame per second.
02:12Now it's actually important to check the frames per second.
02:15Now in this case the video footage was shot at 24 frames.
02:18So that's great, it does match.
02:20But sometimes you might work in other frame rate like 30.
02:22So you want to double-check that at the start.
02:24Now it's possible to interpret each piece of footage to pick a different frame rate.
02:29If I go down to shot1, right mouse key and go to Interpret Footage and go to Main, there's
02:33a place to change the Frame Rate right here where it says Assume this frame rate.
02:37You can put in whatever frame rate makes sense.
02:39Now 24 works for us here, but you could put in 30 frame for instance, but that would be
02:43from the other project.
02:45So 24 is good for us. I'm just going to get out of this window here.
02:48It's also possible to set the Global Preference, so it interprets all of the footage at the same frame rate.
02:53This is great for saving time.
02:55So this is actually up under Edit > Preferences > Imports.
03:00So if we go to Imports, there is a place where you can tell it to interpret a certain frame
03:05rate every single time we import. This is set to 24.
03:09Normally, it's set to 30, but you can change that at anytime. Again, we want 24.
03:12So if I leave it at 24 everything it will bring will be interpreted 24, which is perfect for project one.
03:19So now we have shot1 which has the actress in it.
03:22Let's take a look at that. Now look at it. We need to set up a Composition.
03:25We have nothing right here in our Composition window.
03:27Now a quick way to set the Composition to make sure it's set correctly is to click-drag
03:32your footage and pull it down to where you have your layer stacked.
03:36When you let go, it creates a new composition, in this case shot1 which is the correct resolution,
03:43the correct duration, and also the correct frame rate.
03:45You can see that up here when that Composition is selected, it says the size right here or
03:50the resolution, the duration, and the frame rate.
03:53Now you notice because we set the Time Option to Frames as opposed to Time code there's a
03:58frames read out right here on the timeline. So just count up from 0 all the up to 60.
04:04This is much easier for working with image sequences.
04:06Time code is really designed for video and doesn't make as much sense in this case.
04:10So there's a shot, and we can play it back this time or just scrub through it.
04:15Now since it's fairly large resolution it's going to look a little blocky as we're holding
04:19the Time slider through, but we can see that there's some motion there.
04:23We'll talk more about playing back in later videos.
04:26So for right now let's go back and get the render of the spyglass.
04:29I'm going to go to the same place and go to File > Import > File.
04:33In this case the render is in the Renders folder under Shot1Monoculars in--it's the same deal.
04:39You pick the first frame of the image sequence, make sure the Sequence option is checked on,
04:43which it is in this case, and click Open.
04:45That's little bit different from layered PSD files, because they have multiple layers,
04:49you can either choose to merge all those layers or pick one layer and bring that in by itself.
04:54We actually want to click the Choose layer button and then pick a layer.
04:59Here's all the render passes that have been converted to layers.
05:02Now we don't really want to MasterBeauty or Background.
05:04We want all the in-between ones.
05:06So I'm going to start with Shadow, pick that, click OK, and bring it in.
05:10It comes in as image sequence, but just that layer.
05:13You will see a layer name here and then the name of the file and of course the resolution,
05:18duration, frame rate up here. So let's go get additional ones.
05:22So there we have all the layers brought in, and because we did this in Maya in terms of
05:27the original render, each one of those layers creates a render pass.
05:30Of course, we also have our original live action footage all brought in as the image sequences.
05:34We are sure that the compositions set correctly with the correct frame rates, correct resolution, correct duration.
05:41There's a second way to make a composition which is worth knowing, and that is to go
05:45up to Composition > New Composition.
05:48Underneath the composition here you have to make sure to pick the correct Resolution,
05:52the correct Frame Rate, and correct Duration yourself.
05:55Now for the resolution there are Presets, and we happen to have a preset here that matches,
05:59which is HDTV 1080 24.
06:02But you might have other projects that use other resolutions and other frame rates and other durations.
06:07Now Duration is manually entered into this cell.
06:09I'm not going to create a composition now, because we are good to go, but this shows
06:13you can make one manually as opposed to dragging the footage down to the timeline.
06:16All right, so we have our footage brought in, both the render and live action.
06:20So we're ready to move onto the next step where we'll start to construct a more complex composite.
06:25
Collapse this transcript
Recombining render passes in a composition
00:00At this stage of project 1 inside After Effects, we have imported the live action footage of
00:05actress and also all the render passes.
00:08The footage with the actress is shot1, and then we have all of the separate render passes
00:12brought in separately from the layered PSD files.
00:15We're in the same composition now, also called shot1.
00:18Now one great thing about all these separate render passes is we can turn those into separate
00:23layers and then adjust them individually--just transform them individually or apply separate effects.
00:28Each one could be adjusted different from the other.
00:32Now one disadvantage of that is all these render passes are separate.
00:35So we do have all the separate layers, how are you going to move them together as a single unit?
00:38So one thing that often happens is you have to recombine the render passes and the
00:42composite, and the way you recombine them will affect the end result.
00:46So we need to do that with this project before we can move on to other steps, such as motion tracking.
00:50Now I'm not going to recombine these render passes in the shot1 composite.
00:54I'm going to make a brand-new composition.
00:56It will be easier to deal with them separately from the actual live action footage.
01:00So I am going to go to Composition > New Composition, and make a new composition that's identical
01:06to the first one.
01:07Now what's interesting is After Effects will remember your previous settings and set these
01:11options for you. So as it happens, these are correct.
01:15I do want to HDTV 1080 with 24 frames per second, which is 1920x1080.
01:19I do want to 24 frames per second, once again, and the duration of 60 frames is correct.
01:25So in this case, the only thing that I might want to change is the name of the Composition,
01:29and I am going to call mine Render just so I can remember what that composition is for,
01:33and I'll click OK. So the new composition pops up as a new tab.
01:37So now I can start to arrange my render passes in his composition to try to rebuild them.
01:42And the end goal here is to build them in such a way that they start to look like the Beauty render in Maya.
01:48So which ones do we pull in? The order does matter. I'm going to start with the diffuseMaterialColor.
01:53It's a common place to start.
01:55I'll pull that down to the composition, and there we have the diffuse render without any
02:00kind of shading or without any kind of shadows.
02:03Next one I want to grab is actually the Specular.
02:06I'll pull that down and place it on top. That's a specular component.
02:11Now here you see our first essential problem.
02:13If I use the scroll wheel to zoom in and then middle mouse button to move around, I can see
02:19that the specular takes out the composition. In other words, it blocks the composition.
02:23I cannot see my diffuse thing any longer.
02:25In fact, if I click the eye I right here besides specular and turn that off, there's my diffuse.
02:31I turn the Specular back on, the Diffuse is missing.
02:35That's because the Specular render pass does not create a proper Alpha channel.
02:38Now I can take a look at that by double- clicking the Specular render right here in the Project
02:43panel and taking a look at it in a Footage Viewer.
02:46I need to move my view around.
02:49There it is in RGB, but if switch the Show Channel menu right here from RGB to Alpha,
02:55I can take a look at that Alpha Channel, and it's completely solid white which means it's 100% opaque.
03:01Again, Alpha determines transparency, and in this case there is no indication where the object is.
03:05That's not going to work for us if we just simply place on top as is.
03:09So I'm going to go back to the Show Channel and change it back to RGB, and I am going
03:13to go back to the Composition view, and we'll deal with this.
03:17So one current way to deal with this problem is to change the blending mode.
03:21Now each layer has a blending mode, and this similar to what you have in Photoshop and
03:25also what you have in the Render Layer editor inside Maya.
03:28In terms of the blending mode, it helps the program figure out what the color values of
03:32the pixels are, and you can buy in one layer with what's below it.
03:36So there's a Blending mode menu beside each layer here.
03:38Now if you don't see that under mode, what you can do is click this toggle switches button.
03:43So if you had this view where you don't see it, click that button again, and there is
03:47each of the Blending mode menus right here.
03:49So for Specular, a common blending mode is called Screen.
03:52So if I click this menu and switch the screen that's going to work for us.
03:56So what does Screen do? Screen takes the brightest values between that layer and what's below
04:00it and places it on top.
04:02In other words it gives advantage to whatever pixels brightest regardless what's layer it's on.
04:07So if I pick Screen all the bright pixels when out from both layers.
04:11So what you have is a specular highlight,
04:12for instance, this hotspot right here on top of the diffuse color.
04:17So again, I'll go back to Normal here which you will get by default, and here's a specular by itself.
04:22If I go back to Screen, here's the combined result.
04:26So blending modes are often very important. So now we have Specular working for us.
04:30Let's go to the next render pass.
04:32Next one we are going to pull down is Reflection.
04:35I'll place that on top.
04:36This is a similar problem to the specularity or specular layer.
04:40It takes over the composition, and I can't see what's below it.
04:43So in this case I can use a similar technique I'll go to that blending mode for that layer
04:48and switch that to Screen.
04:49So we now have a combination of the Reflection and the Specular on top of the Diffuse, and
04:54I have all three combined together and they're starting to build towards that beauty pass.
04:59We're going to work with one more render pass right now, and that's the Shadow.
05:04I'll pull those shadowRaw down and place on top.
05:07Now shadowRaw produces a white shadow over a black field.
05:11Obviously, this is not going to work for us as is.
05:13Not only there is a block that's below it, but the shadow is white and not black.
05:17So in this case the first thing I need to do is invert this, flip the colors around.
05:22We're going to have to place of our first effect because of that to make this work.
05:26So with the shadowRaw layer selected, I'm going to go up to Effect > Channel > Invert and
05:32in Inverts affects the colors where black becomes white and vice-versa.
05:36So if apply that the shadow becomes black, the field become white, and I potentially can use this.
05:41Obviously, this is not functional yet because it's blocking out everything below it, so
05:45I had to pick in another blending mode for this.
05:48Now because I want the dark areas to survive and get rather bright areas, what I can do
05:52is go to the blending mode and select Multiply.
05:55What Multiply does is it multiplies all values together, so what was dark is my top layer
06:00darkens everything below it, and anything that's white, it has no effect.
06:04So if I apply Multiply it places that darker shadow over what's basically a brighter spyglass.
06:10So now we have arranged four of the render passes in this composition.
06:13I want to save the fifth one for later.
06:16But we have built this towards the Beauty render within Maya.
06:19It's going to look very similar at this point.
06:21Now we're ready to move on and use this composition, combine it with live action footage, and
06:28add motion tracking to get to follow the actress' hand.
06:33
Collapse this transcript
Transforming multiple render passes as a single unit
00:00We successfully imported the render passes into After Effects.
00:03We took four of those passes and arranged them in the composition called Render to build
00:07up the renders so it looks similar to the original beauty pass.
00:11The order and the blending modes we use are very important to do that.
00:14Now the fact that these render passes are on separate layers is both good and bad.
00:18The good part is you have a lot of flexibility, you can apply effects to anyone of these individually,
00:24so every layer can be adjusted separately from the other layers.
00:27For example, the shadow layer already has the invert effect on it but none of the other ones do.
00:32I can go to any of these other ones and apply different effects.
00:35For example, just as a task, I can go up to Effect and apply a Blur, like a Gaussian Blur to the reflection.
00:43Once I apply effects, that effect is once again listed under Effects for that layer
00:47and also the Effect options show up in the Effect Controls panel.
00:52So if increasing blurriness here, I can blur out just the reflection.
00:55Now this might not be the best solution for this type of project but does show you that
01:00all these layers can have a different set of effects.
01:03So for now I want to get rid of this--we don't this at this point--I'll delete that.
01:06Now that's the good part. The bad part is if I want to move something around, these are all separate.
01:12So if I grab the diffuse layer and interactively click-drag it in viewer, it splits out from
01:18the other layers. Its transforms are different.
01:21So what you do about that? Well, you could move all of these together so all the transforms update.
01:27You could do that by, for example, Shift-selecting them all and then trying to move them, and that works.
01:32That gets a little tedious sometimes, and it's not really good for animation.
01:36So I'm going to click Undo here, Ctrl+Z to go back, and we'll talk about some other solutions.
01:40Okay! Now our layers are back at the start point.
01:43Another way to reset the transforms, by the way, is just to click the Reset button beside that layer.
01:48Reset will set that set of Transforms back to their initial stage.
01:51In any case, what do we do about the fact that they are separate, and I want to move them together?
01:56One solution is Parenting, Parenting allows you to parent one layer to another and in
02:01fact there's a Parent menu right beside the each layer, so for example, if I go to Specular
02:05layer, go to its Parent menu, and switch that to the Diffuse layer, then the specular becomes
02:11parented to the diffuse.
02:13So then when I move the diffuse, the specular travels with it, so at least now I have two
02:18layers moving together as a unit.
02:19If I want to move these all together, I had to Parent all the top layers.
02:24So for now, I am going to reset the Diffuse, get it back to the Start, and I'll go up to the
02:28top two layers and change those Parent menus to diffuse also.
02:31So now the top three will follow bottom one.
02:34So now if we move the bottom one, that moves there as a unit.
02:37So that's one solution. I am going to reset this for now.
02:41The other solution is to do something called Nesting.
02:44Nesting allows you to place one composition into a second one and have that nested composition
02:49be flattened as a single layer. It's actually very common technique.
02:53So for now, I'm going to under the Parents, I am going to make sure to reset first on
02:57this bottom one then switch all these other menus to None.
03:00Now for nesting, I need to go back to my shot1 composition, then back to my Project tab.
03:06So I can do to nest is grab one composition-- for example, the Render composition--and pull
03:11that into the open composition, in this case shot1.
03:14So that nested composition comes in as a single layer, it's flattened out. It has a signal set of Transforms.
03:20Now what's cool about this is I can go back to my original Render composition, and it's
03:24still there, it's still intact.
03:26I have all four of my layers here with all their own unique settings.
03:29I could update these all at once.
03:31I can add New Effects, I can change order of the layers, remove layers, add new layers,
03:37and what will happen is that will be updated so that the nested composition and shot1 reflects
03:43whatever I change in that original composition.
03:45So the flexibility of changing all these things for the Render composition and having it reflected
03:51here where it's nested.
03:53So now it's nested and has a single set of Transforms, I can move that around as a single unit.
03:58Let's click-drag.
03:59Now one thing that's bad about this, which we will have to solve, is a fact that that
04:04there's no transparency. The black field of this nested composition covers up the background.
04:09I have to deal with that.
04:10But luckily, since we have nested composition it's easier to solve.
04:13So I'm going to reset the Transforms here.
04:16What we do about the fact that there is no transparency here.
04:19But we can steal a transparency from different layer.
04:22In fact, if you wonder why we did the matte render pass this is why we did it to solve this particular problem.
04:28Because even before we nested there is an issue, there's not proper Alpha here in the Render composition.
04:34So let's go back to shot1.
04:35So I'm going to grab the Matte Render Pass and pull it down and drop it on top.
04:39We're going to steal the Alpha information from this or then steal the value information
04:44and give it out to Alpha. So here's the Matt Render.
04:47It's White over Black.
04:48We don't need to see that, we just need to borrow information from it.
04:52So can go to the video eye beside it and turn it off.
04:55What we will do next is go to the Render layer and use this feature called TrkMat, it's spelled T-R-K-M-A-T.
05:03What that does is it steals information from layer above it and give that to the Alpha.
05:06So in this situation what I can do is change this menu here to Luna Matte. Luma Matte stands for Luminance Matte.
05:14We'll look at the layer above, in this case the matte layer, look at the luminance information,
05:20convert that to the Alpha and give that the Render layer.
05:22So I'm going to select Luma Matte and therefore that objects cut out properly.
05:28Again the TrkMat goes one layer up, takes a look at the information, converts that to
05:33the Alpha, and in this case I chose Luma Matte option, so it's looking at Luminance information, in other words Brightness.
05:38Brightness is converted into Alpha for this nested render layer, and therefore it's cut out properly.
05:44So we have seen the advantages and disadvantages of working with render passes on separate layers.
05:50The advantage is you can adjust each layer individually.
05:53Disadvantage is it's difficult to move those layers together as a single unit.
05:56Luckily you can either parent the layers together or you can nest.
06:01In this case nesting worked out great for us because it helped us to solve the problem
06:04of the Alpha Channel for this spyglass render.
06:09
Collapse this transcript
5. Transforming Motion Tracking in After Effects
Setting up a motion tracker
00:00We have recombined our render passes within a single composition called Render. We then nested that
00:05composition within the shot1 composition. Therefore that spyglass is a single layer.
00:10However, it doesn't have the motion of the scene.
00:13If I was to play this back to the RAM preview, you'll see that the spyglass did not really
00:18follow her hand, so this is where motion tracking comes into play.
00:22Motion tracking will allow us to determine what the motion is in the original footage
00:27in terms of camera movements and the movement of her hand and apply that to the spyglass render.
00:32If I zoom in here through the middle mouse key and then scroll, we can see that there
00:37is a little stick with an X on it, and that's actually intended for the motion tracking.
00:42So the goal here is to cover up this stick, and this piece of tape where the spyglass
00:47make look like the spyglass is actually in her hand and therefore as a same motion.
00:52Now there is a little bit of animation on the spyglass itself.
00:54If I play it back again, you can see that the spyglass just tilts backwards, but that's
00:59all it does, it doesn't move any further in the scene, so again that's where motion tracking comes into play.
01:04So motion tracking works by applying the motion tracking tool, identifying the feature and
01:09tracking over time to create a motion path.
01:12The motion path is eventually applied to a layer such as a spyglass layer, so let's get started with that.
01:18Now in this case, I want to apply the motion tracking tool to the original footage, so
01:22I'm going to select shot1, go up to Animation and select Track Motion.
01:27That's the tool you want.
01:28Now if you're using a slightly older version of After Effects, this area of the menu is
01:32going to look a different; however, this menu item track motion is consistent, so I want to select that.
01:38When you select it, a couple of things happen.
01:40The first thing is the view jumps from the composition view into the layer viewer.
01:45Motion tracking has to occur at least initially in the layer viewer.
01:48Another thing that happens is there's a track point that's positive in the center of frame
01:53in that view. We're going to use this to identify the feature that we want to track over time.
01:58The third thing that happens is the Tracker panel opens up at the bottom right.
02:02Now again, if you're using slightly older version of After Effects, this will look a
02:06little bit different. But fortunately, the menus we're going to change and the buttons
02:10we're going to press are going to be exactly the same.
02:12So in terms of this panel here, let's talk about a few things.
02:16The first thing is a motion source. That is the footage we are tracking.
02:19In this case, we're tracking shot1.
02:21You can also multiple trackers in any given layer, so they are numbered.
02:25We're just going with Tracker 1 which you're given for free, so we're just going to stay with that for now.
02:30There is also Track Type.
02:31There is actually different styles of motion tracking.
02:34For this particular project, we're just concerned with Transform Tracking.
02:38Transform Tracking means we're going to track the left-right, down-up motion of the feature.
02:43In another words, track the X and the Y direction of the feature over time.
02:48That's commonly called Transform Tracking, so if you ever hear of transform tracking, that's
02:51motion tracking that just tracks those in two directions.
02:55Below that you have some various transform option.
02:57Position, Rotation and Scale, I am going to talk about these further. We're going to start with just Position.
03:03Below that there are some options we'll get to little bit later on and also some Analyzation buttons.
03:08Use these buttons to go through the footage and allow the tracker to try to determine
03:12where the feature moves.
03:14In terms of track point, again, that's placed over the feature you want to track.
03:17So what's the feature? The feature is something that's high contrast that's easily visible,
03:23relatively small, that stays in frame the entire duration of the timeline and what the
03:28tracker does, it identifies that pattern within that track point and tries to follow it as it moves.
03:34So in terms of this footage, if I pull back here, we're given a great place to track.
03:39If I go to frame 10 or so, you can see there is a little excellent piece of tape.
03:44That was put there to track, and that's great, because it's relatively high contrast, relatively
03:48small and stays in the frame, plus it replicates the motion of her hand, because again, the
03:53original goal of this project is to place that spyglass in her hands, so we want to
03:57figure out where her hand is moving over time. So that's one variation of Transform Tracking.
04:01You are tracking an object like her hand moving through the frame.
04:05Now there is a little bit camera motion in the scene also. It's going to detect that,
04:09too, because we want that spyglass to pickup also the virtual camera motion, so the motion
04:14of her hand and the motion of the camera, so those both will be detected by the tracker tool.
04:18So what we want to do is place this track point over that X.
04:22So how do you move this around? If I zoom back in, you can simply click-drag any empty
04:27part of that track point like in the center, for instance right here, click-drag.
04:32As you drag, it magnifies what's below it just so you can see that a little better. When we let
04:37go, it returns to its original state.
04:38So what I can do is click-drag it and scroll until I get this up to that X mark.
04:43I'm going to do this on frame 10, because frame 10 is relatively free of motion blur.
04:48The motion blur can interfere with the tracking, so 10 is the good place to start.
04:52So I'm going to place this up here at the center of this X as close I can.
04:56There we go, and let go.
04:58There are ways to adjust this track point further, but we're going to save that for later step.
05:02So we applied the tracker to the live action footage, we have placed the track point over
05:06a trackable feature, and now we're ready to analyze in order to find out what the motion is.
05:11The analyzation is relatively complex, so what we're going to do is save that for the next video.
05:16
Collapse this transcript
Using a tracker to analyze motion in footage
00:00At this stage of Project 1, we have applied a tracker to the shot1 footage.
00:04Now if you open up the scene file, and you see that the tracker is missing, or at least
00:08it's grayed out, there is a way to get that back.
00:10We can just go Motion Source and change it from None, which sometimes it gets set to,
00:16to the name of footage that actually carries the tracker, in this case shot1, and it often comes back.
00:21Now if you still don't see it, it's possible the tracker is also set to None, in terms of Current Track.
00:26So just pick the tracker you are working with, like Tracker1 in this case, and then all these features come back.
00:32Also once this comes back, the Track Points should be visible on the layer view.
00:36Again, you have to do this in the layer view and not the Composition view.
00:39So if you are on the Composition view, switch over to layer view.
00:42In any case, we have the tracker, we have the TrackPoint positioned over the feature
00:45on that piece of tape which is the X. Now we are ready to analyze.
00:50So you can use the analyzation buttons down here at the bottom of the tracker.
00:53There is a Analyze forward it and also Analyze backward.
00:56This is based on what frame you're currently on.
00:59Now we set the Time slider on frame 10 because the X part was nice and clear at that frame.
01:04So what we can do is choose to go one direction to the other.
01:06I am going to start by going forward. I will click the Analyze forward button.
01:10What happens is it's going to go through the footage one frame at a time.
01:12When it reaches the end in this case, it stops and what you're left with as a result is a motion path.
01:19If I zoom in closer, you can see the motion path is composed of both segments between keyframe boxes.
01:26These little hollow boxes are keyframes that are placed on the tracker's properties.
01:33The former path that represents where the X is going over time, or where that feature is going over time.
01:38Now once the tracker stops, you can interactively play it back to see how well it's doing.
01:42You can just crab the time indicator and move it across, and we'd see how well that
01:48motion path is sticking to the center of the X.
01:50So, so far, the center of the X is pretty much lined up with those keyframe boxes.
01:55So we're doing pretty good at this stage.
01:57Now, we have only analyzed for frame 10 to the end, we start to do with Frame 0 through 9.
02:03So what I can do is go back to frame 10, then and use Analyze backward button, let's click
02:08that and see how that does.
02:09Once it's done, it finished the motion path, and I can playback timeline and see how well it does.
02:15So here it's doing well, so go towards zero, pretty good, and now it some has an problems.
02:21See how it drifts off?
02:22So when I am on Frame 0, the center of that TrackPoint does not match some of the X. That's a problem.
02:28Why'd that happened? Well, there's lots of motion blur.
02:31Motion blur tends to confuse the motion tracker because pattern becomes too soft and blurry.
02:36Some really here the first two frames are a problem, after that it's doing okay.
02:41So what do you do in that situation? Now this arises a lot because often the footage is
02:46so varied that you never get a perfect motion path at the start.
02:50There are several solutions. The easiest one in this case is to manually adjust the motion
02:54path to fix it, because we are only really dealing with two frames that are a problem in this case.
02:58What you can do is go to the problem frame like frame 0, zoom in and then interactively
03:03click-drag the box.
03:05Now I'm just going to drag it by its empty center to where you think it should be for
03:09that frame, say, about right here.
03:11Once you let go, the motion path is Updated, plus a little keyframe box is updated.
03:16So Frame 0 is actually correct now.
03:18I can go to the next frame, frame 1 and again that one is off a little bit, so then
03:22I can click-drag the TrackPoint until it lines up.
03:27Again you are lying at the center so that little tiny center X needs to line up with
03:30the center of my big X on my tape.
03:32And you can adjust this as many times as you want to. All right.
03:35So frame 0 and 1 are now correct, and everything else looks pretty good.
03:39So we have been able to analyze the footage with the Analyze buttons, both forward and
03:43backwards, we've looked at how good that motion path wound up, and then we figured
03:47out a way to fix the first two frames which had drifted off. And the quick solution in that
03:52case is to manually adjust the TrackPoint position.
03:57
Collapse this transcript
Adjusting tracker options for better results
00:00So far with project 1 in After Effects, we have applied the Tracker and created a successful motion path.
00:07Now, remember that the first few frames were giving us problems because of the heavy motion blur.
00:12To fix that, we manually adjusted the position of the Track Points to improve that location
00:17of the Track Point where it is compared to that feature we're tracking, which is the X
00:21on the piece of tape. Now, there are some options you can apply.
00:25There's Options button on the Tracker itself that you can adjust.
00:27Also the option to interactively change the shape of the Track Point, and we
00:33haven't talk about this yet, but there are two boxes on the Track Point.
00:36The inner box is the feature box.
00:38That represents the region that contains the pattern that it's trying to track over time.
00:44And generally, you leave that about the size of that pattern like the X.
00:48The outer box is a search region, and that's a region that it goes into if it has a hard
00:53time finding the pattern.
00:55The pattern might be obscure because of motion blur, like it is here, or because there is
00:59erratic motion, and all of a sudden it loses where the feature is.
01:03So it will go into the search region to try to find it again.
01:06So one thing you can try to improve the motion path is just to resize these boxes.
01:10You can click on the corners, interactively drag them to scale them in the left, right,
01:14or up, down, or both directions, and also do that with the search box too.
01:19So, what we can do is try to go to frame 10, where it's a pretty good track, and then experiment
01:24by resizing these boxes. So let's say I make the boxes really big.
01:28Now sometimes a really large set of boxes, on the Track Point, will help you track something
01:33that's a little too blurry, or too erratic.
01:36And in general, a larger set of boxes will mean that the tracking tool works a little bit more slowly.
01:42Let's give it a try and see if it helps us. I'm going to analyze backwards from frame 10.
01:47In that case, my boxes were so large, it got completely confused, and slipped off.
01:53So, for this particular project, that's probably not a good solution.
01:56But keep in mind that sometimes it is necessary to adjust these.
02:00Again, in general, you want to make the feature box just slightly larger than that thing you
02:05are trying to track, like this X.
02:08The search box can be just made a little bit bigger, something like this is generally fine.
02:12So let's try it again.
02:14Looking pretty good, it's still going to slip off in the first two frames.
02:17Let's talk about some of the other options though that come with the Tracker tool itself.
02:20If I click the Options button, this window comes up.
02:23It's divided into several regions.
02:25You have your Channel section, you have your Process Before Match, and then your Adapt
02:30Feature menu along with the Confidence amount.
02:33What the Channel does is allows you to track different channel elements.
02:38It sets a luminance, by default, which means it looks at the pixels in terms of their brightness,
02:42not their color just the brightness, and often this is very good.
02:45There is also RGB where you can track based on red and green and blue values, and that's it, no brightness.
02:50There is also Saturation where you track simply by the amount of any of the primary colors.
02:56In this particular case, these channel themes will not make a huge difference, but it's
03:00good to be aware that they're there. Now, there is also Process Before Match.
03:04This will put a pre-process on your footage to help the Tracker figure out where the pattern is.
03:09I'm going to turn this on.
03:11There's Blur, and that's going to blur the image in advance, and this is good for any
03:14kind of footage that's very grainy where you have a grain pattern interfering with your tracking.
03:19Let's give that a try, and see if that helps.
03:21I'm going to click OK and then go to frame 10 again and analyze backwards. Slightly different
03:26result, often you get a very slight difference in the motion path.
03:30Now, in this case, it didn't help us a lot because we don't really need to blur this.
03:34Let's go back to the Options.
03:36The opposite is Enhance, which sharpens beforehand.
03:39It's looking pretty good until the very last frame where it goes off of the tangent.
03:43So, in this case, I think turning Process Before Match off is going to be just fine.
03:47Now, in terms of this lower menu Adapt Feature and the Confidence, that allows Tracker to
03:53go into different modes where it reacts differently based on how successful it is.
03:57Now Adapt Feature, what that does is instead of looking at the pattern on frame 1, it actually
04:03looks at the pattern at the prior frame.
04:05So, if you're on frame 10, it double-checks frame 9.
04:07It assumes that the pattern is going to shift a little bit over time, it's going to try
04:11adapt its knowledge based on that.
04:13So, if the X on this piece of tape is changing perspective, or its motion blur, try to take
04:19that into account and continue to track that feature, or that pattern.
04:23It's actually a pretty good option to leave as is.
04:26There is also Confidence, and what the Confidence means is when the program's confidence drops
04:31too low, it does something.
04:33For example, if you set it to Stop Tracking and set to a very high confidence, what that
04:38means is it's going to stop tracking if its confidence drops below 100%.
04:43And 100% means that it's absolutely sure it knows where the pattern is.
04:47So odds are, if I do Stop Tracking at 100%, it's going to stop really quickly.
04:52Okay, frame 10, analyze backwards, and it did indeed stop at the next frame.
04:58What happened was it was a little unsure of that next frame where the pattern was, it
05:01was it's only 98% because it's below 100%, it just stopped.
05:06Now you can have other values too like 50%.
05:08If I was to use that, it would probably go much further because it's going to go as long as
05:13conference is above 50%. So it goes much further.
05:17So you don't have to use these other options, but they're good to know that they're there.
05:21Again, the Adapt Feature is quite useful in most cases.
05:24I'm going to turn this to 80% also. I think we're good with our defaults here.
05:31We'll return to these in later projects, but I just wanted to let you know where these were.
05:36So, based on the original settings here, I'm going to click OK, and then re-analyze
05:40one more time backwards.
05:42And I'm afraid for this particular project, the first two frames we're going to have to manually adjust.
05:47So I'm going to adjust the frame 0 and then go to frame 1 and adjust that.
05:51Now we're back to having a pretty good motion path.
05:53Now, before I move on, there's one other thing I want to talk about, and that's where the
05:57Tracker stores the information.
05:58If I go down to shot 1, and expand this dropdown arrow here, you will see there is a Motion Tracker section.
06:05You get that as soon as you apply Motion Tracker.
06:07If I expand further, you'll see Tracker 1, which we're working on.
06:10Even further, you'll see all of the things that are keyframed automatically, includes
06:15Feature Center, Confidence, and Attach Point. We talked about Confidence.
06:18Basically After Effects stores the values for each frame.
06:22The Feature Center is the center of the feature it's tracking where it is in screen space,
06:26and the Attach Point is actually that tiny little x in the center of the Track Point.
06:31Now, if you haven't adjusted the motion path manually, the Feature Center and the Attach
06:36Point are identical.
06:36As soon as you start to move things around though, you can have slightly different values
06:41between the too, and that's fine.
06:43Now, we're going to return to some of this information later, but this is where the keyframes
06:47are actually stored on that layer, and the positions are represented on the screen by
06:52these little keyframe boxes.
06:53So, now we have a decent motion path, we can move on and learn ways to apply that motion path to other layers.
07:03
Collapse this transcript
Matching layer motion by applying tracker data
00:00We have come up with a good motion path by applying the Tracker to the footage.
00:04We have tracked that X on the piece of tape as it travels through the scene.
00:07As soon as you feel that you have created a good motion path, and it's accurate, you can
00:11apply that data to a different layer, and therefore activate the actual motion tracking.
00:15In this project, we're going to apply the data to the Render layer, which is the nested
00:20version of that spyglass all combined.
00:23Before we apply the data however, we have to do one additional step in this composition to make this work.
00:28I need to go to the Matte layer, go to the Parent menu, and change it to Render.
00:33I want the Matte layer to follow the Render automatically.
00:35The Render layer is going to get the motion data.
00:38However, I don't want to apply the data second time to the Matte layer.
00:41So what I can do to save time is simply change its Parent menu to follow the Render layer automatically.
00:46So now we're ready to try to apply the data.
00:49I am going to go back to the Tracker, and the first thing I need to check is the Edit Target button.
00:55I need to tell it what layer to apply the data to.
00:58So I need to switch this menu beside layer to Render.
01:01I can only apply data to one layer at a time. So I have to pick the one I want to apply it to.
01:05So, I'm going to click OK.
01:06And now I can go down to the Apply button, and apply that data.
01:10It's going to ask me if I want to apply it in the X and Y? And I do, I want to apply
01:13the left- right and up-down movement, so OK, and there it's applied.
01:18A couple of things happened.
01:19One, if I check out the Render layer and look at the Transforms, the Position property is
01:24animated for every single keyframe, that's where the motion tracking data winds up.
01:28Another thing that happens is the thing you applied the data to is going to move.
01:33In fact, our spyglass moved way up in the air. Let's play it back to see how it's working.
01:38So Tracking is working, however the spyglasses is hovering up in the air, it's following
01:42the stick, at least it's relative to it, but it's not in a good position.
01:47Why'd that happened? Well, what happens is when you apply the tracking data, the position
01:51is animated, but basically wherever the anchor point was for the layer you applied it to
01:57is moved to where the motion path was.
01:59Now, because the anchor point for the spyglass is in the center of frame, the entire frame
02:05was moved upwards so that anchor point was stuck to where the motion path was, and that's
02:09where that little X was moving. So therefore it's too high.
02:11Well, how do you solve that? What you can do is adjust the anchor point before you apply
02:17the Motion Tracker.
02:18So, what I'm going to do is destroy the position animation.
02:21I'm going to turn off the Time icon. That gets rid of it.
02:25Then reset the spyglass, or Render layer, and then do some preparation work by altering
02:30where the anchor point is.
02:32You can see the anchor point in the viewer, it's actually a little circle with four little
02:37lines coming out from it.
02:38It can be a little hard to see, there it is right there.
02:40It's a little circle with four little lines, that's where the Anchor Point is.
02:43Now, by default, that is placed in the exact center of frame when you make a new layer.
02:47I want it to be up here behind the spyglass, because I want that X on the tape to be basically
02:54behind the spyglass, or where you see it in an opposite fashion, the spyglass seems to
02:58be in front of this pole, and this X.
02:59So, I need to place the anchor point where the X would be.
03:03So I'm going to grab the Pan Behind tool, which is this little square with the four arrows.
03:07I can use that to interactively move the anchor point, click-drag up to here.
03:12So, you can imagine that when this is in place, the pole is here, tape is here, and the X
03:18is somewhere in this area. So, it looks like a pretty good position.
03:21So I'm going to go back to the arrow to get out of that tool, and now we can try to reapply.
03:26I'm going to go back to my Tracker, make sure it's visible, and then reapply, and say yes to X and Y.
03:32So instantaneously, it jumps over to left, because I have the anchor point in a different position.
03:38Also it's not nearly as high up in the sky. So let's play it back now.
03:41So now it's definitely tracking, and it starts off in a better position, still not exact.
03:46At frame 0, it's not covering up the pole completely, and then when I play forward, you can see
03:50it's starting to slip off to the right.
03:53Why is it slipping? Well, in Maya, we do not animate the camera, and there is animation
03:57on the spyglass, but that's just a very simple tilt backwards.
04:02It doesn't really emulate the complex motion of the actions of hand or the camera, the
04:06camera in terms of the real camera.
04:07Now, what you do with a slide like this? The motion path is actually working for us.
04:11The problem is the relative position of that 3D object compared to where the 3D camera was.
04:16What you can do though inside After Effects is place the animation on the anchor point,
04:21you can change the anchor point by interactively moving it, and also keyframe it, so it has
04:25slightly different positions over time.
04:26And that will help solve these kind of sliding issues you might come up with.
04:30Well, how you do that? Well, you want to figure out where the object is sliding first.
04:34For instance, I can just start with frame 0, it's not quite in the right place at frame
04:380, so I can go to the anchor point, click the Time icon to turn that on.
04:43And then instead of interactively moving it in the frame, what I can do is go to the values
04:46for X and Y, put my mouse over top of that number cell.
04:50When I do that, I get a special icon with a little hand with a finger and two arrows.
04:54When I have that, I can click-drag left or right, and change the values through this
04:59part of the layer editor, as opposed to the viewer.
05:01So, I am going to slide this around till it lines up with that pole.
05:04I can also do this up and down. So that's the first keyframe.
05:07Then I can move forward and figure out where it really started to slip off.
05:11Some maybe around frame 6 would be a good place for me to keyframe.
05:14It's definitely not in the correct position here.
05:16So I'm going to slide this over, and maybe a little bit of up and down too.
05:20Looking for a gap between the black handle and the fingers, it's fairly consistent, also
05:25when I see it at the same distance from the edge of the finger.
05:27Now, to continue to keyframe this is going to be difficult to do in real time during this
05:32video, so you're going to have do additional work on this.
05:35Now I did probably with this in advance, so I do know additional keyframes are needed.
05:39In fact, a good place to keyframe is frame 0, frame 6, frame 8, frame 18, 24, and 28.
05:47I'm not going to be able to do that right now, it's going to take too much time.
05:50But the general idea is to go to the next keyframe, move the anchor point by sliding
05:56through the cell values, and going on to next one and next one.
06:00So, the next video I'll have this keyframed for you, and it will be solved.
06:05At this point, you have to do a little additional work by setting your own keyframes.
06:09That's the general idea though.
06:10So we have applied the motion tracking data to the Render layer, we made sure the Parent,
06:16the Matte, the Render layers, or the Alpha was working.
06:18We did a little fine adjustment by first interactively changing the anchor point position and then
06:24also setting some additional keyframes.
06:29
Collapse this transcript
Refining a layer's transparency with rotoscoping
00:00We have applied the motion tracking data to the render layer, and now the motion tracking
00:04is working where the spyglass follows the hand of the actress.
00:07One thing we had to do though is spend a little bit more time working with the anchor points.
00:11Because there is a little bit of slide based in the way the spyglass is rendered in terms
00:16of it's sliding left, right, up, or down compared to her hand, we had to keyframe the anchor
00:21point, and it took me a total of six additional keyframes to make the motion look better.
00:26Let's play it back there and see what it looks like.
00:28So the spyglass is following her hand fairly well.
00:30It looks like it's right there where her fingertips are.
00:33Now, one problem of course is the fact that the spyglass handle covers up her hand.
00:37This should be really in between her fingers.
00:39This is a common problem with visual effects compositing.
00:42You have a CG Render, you have to put it behind something that was shot in the real world.
00:47So, how do you do that? Well, the best way to fix that is through rotoscoping, which is
00:52a very common task.
00:53With rotoscoping, you can create a mask, and that mask will affect the Alpha channel of
00:58the layer you apply it to.
01:00Therefore, we can draw a mask to cut out the bottom of this handle.
01:04So, let's give that a try. I'll go to frame 1, or frame 0, zoom in.
01:09What I can do is select the render layer, and then draw a mask with the Pen tool up at the top.
01:15With the Pen tool selected, I can click in the Viewer, and each time I click, I get a mask point.
01:20So, I'm going to outline the top of the fingers here, because this is where it's going to
01:24cut, and then drop down, and just make it extra big down here.
01:28Now, I do need to make sure it's a closed path all the way around.
01:31So, if I click on the very first point, I get that little circle icon, and I can close that path.
01:37As soon as it's closed, that mask is going to start working.
01:40Now, in this case, it saved the lower handle, and cut out the rest.
01:44What happens is whatever is inside that closed path becomes solid Alpha, in other words, it's kept.
01:52Anything beyond the mask becomes transparent Alpha and is tossed away.
01:56So we want the opposite result. We want to keep the top to get rid of bottom.
01:59You can do that by going to the Mask options.
02:02Once you draw a mask, and go to the Masks section on that layer, and there is Mask 1,
02:08expand that, and you have a few options here.
02:10In this case, you want to check on the Inverted Checkbox to get the opposite result.
02:14So now it's starting to work.
02:16Now I'm going to have to keyframe this mask's changing shape over time because her hand
02:21is in different position, therefore this rotoscoping has to change over time too.
02:26Before we get to that though, I want to adjust the mask a little bit further.
02:30Now, one thing you can do to see what the quality is, is hide this from the Viewer.
02:35So I can go to the Toggle Mask button, click that, and that yellow line goes away.
02:39However, the result is still there, I can still see what's happening.
02:43So it looks pretty good.
02:44However, there's a really hard edge there in terms of the transition.
02:47So another thing you can do is go to the Feather on the mask, and increase that, and go from
02:530 to 3, and that gives me a softer transition.
02:56That actually looks better, and is a better match.
02:59I will zoom out again and then turn on the Mask.
03:02Now, right now the mask has some very hard corners.
03:04There are different ways to make softer transitions between the points.
03:09One I like to use is called RotoBezier.
03:11So, what I'll do is pick the entire mask, and then go to the Selection tool, double-click
03:16at the mask lines until the entire mask is selected.
03:19I can tell it's selected because all the points are solid, which means they're selected, and
03:24also there is a big Transform Box around it, but I just want to pick the entire thing.
03:28I then go up to layer, go to Mask and Shape Path and go to RotoBezier.
03:33This converts the mask into a special version, where it's a little bit easier to get smoother,
03:38or harder, transitions interactively.
03:41Once I have converted it, I can click off this to pick nothing, and then for instance pick
03:45one point by clicking on it so it becomes solid and then change that to become
03:50smoother, or harder, and there's a special tool for that.
03:52I'll go up to the Pen tool, click and hold down. There's something called Convert Vertex tool.
03:58When I pick that, I get the special arrow up here, and I can then place it over at that selected point.
04:04I'll see that arrow there in the Viewer also. Then I can click-drag left or right.
04:09It interactively makes it harder to the left, or smoother to the right.
04:14Once it's converted to RotoBezier, it becomes really easy to convert these points, and interactively
04:19change whether you have a hard corner, or a soft corner.
04:22So I can click on one at a time with this tool, click-drag left or right, and affect
04:27the way that point is transitioning.
04:29So, this is actually a better shape, it's smoother, and it matches the fingers better here.
04:33So I'm going to go back to my Selection tool.
04:35Now again, I am going to have to keyframe this, but I think we're ready to do that now.
04:38So, while I'm on the first frame, frame 0, I'm going to click the Time icon beside Mask Path.
04:44That gives me a keyframe right there.
04:45Now, the keyframe stores the entire shape of that mask.
04:48So now I can go to additional frame, or a later frame, and change the shape, and get additional keyframes.
04:54So, I'm going to go to frame 10, and then change the shape.
04:57In order to change the shape, what I can do is click off of the mask to pick nothing,
05:01and with my Selection tool selected, click on one point at a time and interactively move
05:06it to reshape that path.
05:08As soon as I reshape the path by moving points, I get a new keyframe.
05:12So, I want to do this for the entire timeline.
05:14Now, I don't need to do it for every single frame.
05:16In fact, there are several ways to approach it, one is to simply jump ahead every 10 frames,
05:22maybe another would be to bisect where you go to the end frame.
05:26Next, you shape it, and then go to a center frame.
05:29You bisect what you already have.
05:30Go to some center position, change the shape, and then go to another position that's in
05:35the center of your old keyframe, so you bisect old ones.
05:38Again, reshape your mask, and then continue to bisect.
05:42In this case, because the motion is not that big, it's relatively subtle, this works fairly well.
05:48I'm doing it fairly quick though, you defiantly want to spend some time to make sure that
05:51the mask is following the fingers accurately for the entire duration.
05:55So, it might take a few more keyframes.
05:57Another thing you can do when you adjust the mask is move the entire thing as one unit,
06:02and we have already seen that when we select the mask by double-clicking, get the Transform Box.
06:06If you see the Transform Box, you can click-drag in the center, and move the entire thing as a single piece.
06:12This is often very useful.
06:13Again, if I were to do that, I get a new keyframe, or it overwrites old keyframe.
06:18So, let's turn off the mask so we can't see it here, and let's play it back, fingers,
06:24and the rotoscoping is left in, so it's okay.
06:25Now, you will probably want to spend more time on yours, but that's a general idea in
06:28terms of how to apply it, and how to make it cut out the handle.
06:32rotoscoping has allowed us to place the spyglass behind her hand, or at least make it look
06:37like it's behind her fingers.
06:39We're now ready to move on to other steps where we further integrate the spyglass, so
06:43it better matches the footage.
06:48
Collapse this transcript
Improving layer movement with the Smoother tool
00:00We have applied that motion tracking data to the Spyglass Render layer and also rotoscoped
00:05that layer so that the handle does not cover up the front of her fingers.
00:09Now the rotoscoping took a few additional keyframes.
00:11If I look at the mask, this is the number of keyframes I wound up with, and that's to
00:15ensure that the shape changes to always fit the front of her fingers.
00:19Let's play it back and take a look.
00:20So at this point, it's looking pretty good, it looks like it's in her fingers.
00:23Now there is still a little bit of tiny motion where it appears like the spyglass is sliding
00:28a tiny bit, bobbling or jittering.
00:30Now there are several things you can do to try to get rid of that.
00:33Now one problem when you apply the tracking data is the fact that it applies a keyframe
00:39for every frame of the timeline, so if you look at the Transform section you can see
00:42that the position has a keyframe for every frame.
00:45Now that many keyframes packed closely together, often leads to really tiny motion
00:50that might not be good for this particular scene or some other project.
00:53In fact, if I click on Position, here, you'll see the motion path.
00:57If I zoom in, you will see there is a lot of keyframes really tight along this area.
01:01If you look closely enough, you can see how there might be tiny jittering going on as
01:05it moves back and forth.
01:06So, one way to deal with that is to apply a special tool called the Smoother.
01:11Now the Smoother is hidden by default, but I can go up to Window and show that, just click Smoother.
01:16It comes up in its own tab over here by the Tracker.
01:19Now the idea of the Smoother is you can pick a property such as Position, it's going to
01:24look at the curve, and basically the motion path which is associated with that and decimate
01:30it so that there's fewer keyframes, while trying to maintain the shape.
01:32So tend to get rid of keyframes that are very closely packed together like up here.
01:37Now there is only one setting in this case, which is Tolerance, so Tolerance is how aggressive it is.
01:42So if I apply it now, it's really aggressive, it really clears out a lot of keyframes.
01:46Not only on the motion path up here, but also you can see down on the Timeline.
01:50Now it's probably too aggressive for us, it's going to make it even more inaccurate, I am
01:53going to backup with the Undo.
01:55Let's try a lower number like 0.2 and reapply it.
01:59So it's not as aggressive, it's definitely killed some of the keyframes, and the idea
02:03with that is you potentially get a smoother result, so let's play it back now.
02:08Not too bad.
02:09Now you can try to do different values in terms of the Tolerance, you just have to undo
02:13each time and reapply it.
02:15If you apply it multiple times it will be more and more decimated.
02:17Now that's one solution, and that's okay in this situation.
02:20Another way to approach any kind of unwanted small motion is to deal with the keyframes directly.
02:27For example, you can scrub through the Timeline and try and identify any place where maybe
02:32the spyglass is slipping, let's find a spot.
02:35Looks like right here if I scrub back and forth, there's a little bit of slippage, where
02:39it kind of jumps a little bit.
02:41Now one problem is the mask is also a little bit off there, so before we edit the keyframes
02:46and the position, I think I'll go ahead and go back to the mask.
02:49Now you can edit this as much as you want, whenever you want.
02:51I am going to show the mask again, click on that layer to see it, double-click it to pick
02:57the entire thing, and move it up and down with my arrow keys.
03:00That's actually a shortcut, you can move it interactively like this in the viewer, or
03:04once the entire mask is selected use your arrow keys on your keyboard to move it up and down.
03:09That's great for really small fine tuning. Let me hide the mask again.
03:13Now I can still adjust even though it's hidden because it's selected, that looks a little bit better.
03:18In any case though, aside from the mask, it feels like there's a little bit of a jump
03:22here where it's just sliding maybe too far to the left all of a sudden.
03:27Now it looks like these keyframes right in this area are a problem.
03:30So one solution, in this case, is to get rid of those.
03:34To do your own manual smoothing, I could pick these two keyframes and delete them.
03:39Now the motion path is unbroken, it's still there.
03:41I just have fewer keyframes, and it has to make a bigger jump between them in terms of
03:45the motion path.
03:46But sometimes that will solve any kind of really small jittering, so let's see if we
03:50can play that back. So I think that little area looks better.
03:52Now there's probably other areas to deal with, and this is not going to be a super fast solution,
03:57you might have to spend a little bit of time editing these keyframes down here to determine
04:01what might be causing any kind of unwanted jitter.
04:04Now associated with deleting the keyframes, if you want to you can also update the positions.
04:08For example, let's say that you felt that certain frame had the spyglass too low.
04:13Well, you can go to that frame and then put your mouse over the X, or the Y, and then click
04:19left-mouse drag to increase, or reduce, the value.
04:24Now note the mask will slide along with it, so you have to be careful with that.
04:28That's one solution to update the position manually.
04:30So I am going to undo that for now.
04:33Just keep that in mind for possible way to fine-tune that position curve.
04:38So we have applied the smoother to try to simplify that motion path to have fewer keyframes to
04:43move some of the jitter and slide.
04:44We have also manually deleted a few keyframes, and then we talked about how two update a
04:50keyframe for the position.
04:52Once you feel that you have sufficiently adjusted the position, curve, and the motion path, and
04:57have the motion tracking looking well, you can move onto the final phase of this project.
05:01Where we're going to adjust the color, and other qualities of the render, to better match the original footage.
05:06
Collapse this transcript
Improving the CG by adding blur and effects
00:00We are now moving on to the final stages of project 1. We have the motion tracking working
00:04well on the spyglass so that it follows her hand, along with the rotoscoping that cuts it out,
00:09so it doesn't overlap the fingers.
00:11Now we have to worry about the CG in terms of how well it matches the live-action in
00:16terms of its color, its sharpness, and whether it's blurred or not.
00:20So first thing, we could do is activate Motion Blur.
00:22After Effects offers the ability to blur any layer that's in motion, and because the Render
00:27layer has a motion path, I can activate motion blur for that and get some blur to
00:31match the blur of actress's hand.
00:33So I am going to zoom in here, and you can turn on Motion Blur in two places, the first
00:37place is right beside the layer.
00:39I can't see the switch now, but if I go down to Toggle Switches, I will be able to see
00:43the button for that and each layer can support Motion Blur.
00:48So here is the Render layer and here is the switch for Motion Blur, I will turn that on,
00:52it looks like three tiny circles.
00:54That's on for the layer but I also have to turn it on for the entire composition, there
00:58is big button here that looks the same that enables Motion Blur for any other layer that
01:02has it activated. So I am going to click that on.
01:04As soon as I do that, you will see that there is definitely additional blur on the spyglass.
01:09There is more of Motion Blur for the first few frames where that spyglass is moving the
01:14fastest and little less for later frames.
01:18So now we have Motion Blur to help for the realism.
01:20Now one thing you might notice on the first frame is when I do that, it really exaggerates
01:25the dark edge here.
01:27I probably want to get rid of that because it looks very dark and heavy compared to the brightly
01:31lit scene behind it. So there we can tap into some of our effects and adjust the matte.
01:36Remember the Matte layer is what's providing the Alpha for the render.
01:39If I double-click that and look at it in the layer viewer, once again it's just that white
01:43render over black.
01:45But the transition from white to black is pretty harsh, it's pretty quick, it's not very soft.
01:49What we can do though is add effects to the Matte layer, so let me go back to the Composition view.
01:54I am going to look at the layer by turning on the eye for it right now, and then apply a couple of effects.
02:00The first effect is going to be a blur, so Effect--with that layer selected--Blur & Sharpen,
02:06and Gaussian Blur.
02:07Also I want to adjust the contrast, I am going to go to Effects > Color Correction > Curves.
02:13If I increase the Blurriness, then it gets blurrier.
02:15Now one disadvantage of that is, that it's going to expand the matte edge, giving more
02:20black, so the trick is to blur it, and then to adjust the contrast. And the Curves effect
02:24is great for that. The way it works is a straight line by default, the line is perfectly straight
02:30nothing has changed.
02:31But you can click on this Curve, you get tiny little points which you can then move around.
02:36You move around, you ultimately adjust the contrast, so if I click on the point in center
02:41and drag that downwards like this at a angle, it erodes the matte inwards to keep some of the softness.
02:48So let's say that our Blur is about 3 and pull this down a bit, and then we will check,
02:54how this is going to look by turning off the eye.
02:57And so now we can also see it interactively, if I increase the Blur it gets even softer,
03:01if I pull this curve around I get different results, bigger edge or smaller edge.
03:07Let's take a look on another frame now to see what the quality is when there's not that much Motion Blur.
03:11Okay here it's been eroded too far, so I have too much blur.
03:14Let's try 3 again, and we will continue to play around with this curve here and see different
03:18results, so you can erode it quite far or erode it just tiny bit.
03:23So I think I am just going to do a tiny bit just to soften that little bit, okay about
03:27there looks pretty good. All right, next thing to deal with is the color.
03:32Now the Render has very specific colors, we want to make sure they match the colors
03:36contained in the live-action footage.
03:37One of the first things to look at, along those lines, is the blacks and whites.
03:41When I say that I mean how dark are the blacks on the Render versus the blacks within the
03:46live action footage, let me go back to frame 0.
03:50Now one way to test that is to place your mouse over different parts of the frame and
03:53look at the Info panel.
03:55This reads out the RGB values, so let's say put my mouse over the hair here where it's
04:00relatively dark, I can look over at that panel and see the values, those are in the low 40s for RGB.
04:06I do the same over the spyglass they are darker, around the 20s, all the way down to around
04:126 or so, so it will be good to raise up the blacks, the blacks have a brighter value and
04:16they are more equivalent to the live-action.
04:18Great way to do that is go to the Render layer, select that, and apply a Curves effect once
04:23again, so Curves.
04:25Now in this case, I want to raise up the dark area and the darks really are on the left
04:30side of this graph and the brights are on the right side.
04:33So I am going to click twice here, and I am going to put a new point in center just to
04:37control the center, a new point down here towards the left bottom.
04:42Now if I raise this second point up, you see how it makes the blacks much brighter, you
04:46can go really far and make it super bright but that's too far.
04:49So we just bump up this little bit, then go back and read what the values are, so right
04:53now my blacks are more on 30s so that's definitely closer, now I have to be careful not to get
04:59too bright because I will wash out the entire render.
05:02The only thing I can do is pull a center one down towards the end here, so my bump is smaller.
05:07So I would say maybe in the mid 30s is pretty good so that's where I am in the darkest part
05:12right here, let me load in at 30s, and we bump it up a bit more, it's pretty good.
05:17I don't want the top to bend down too much or darken the bright so I can also put a new
05:20point here to straighten this out.
05:22Now I am going to zoom out and take a look so that's looks better in terms of the blacks
05:26are better match, you can also do that with the whites, you want to match the whites you
05:30would see what the brightest areas are of the live action footage and for instance,
05:34the teeth are in the mid in 130s and 120s, and compare that to the brightest parts of the spyglass,
05:40and that's definitely much brighter in the reflection in similar and some other parts,
05:44but you would continue to adjust the Curves effect to try to match the bright areas.
05:50Again the upper part of the graph is bright part, so it would affect the points up here.
05:54You can see if I lower down this top point, the brights get darker so that's one way you
06:00deal with that.
06:00I am going to leave this right, pretty much in center though, that looks pretty good.
06:04I'm not too worried if the reflections are little bit brighter because that matches her eye.
06:08Okay that solves the blacks and whites. The color in general is also good to match.
06:12You notice the live action footage is pretty red, if I put my mouse over this background wall
06:18and look at Info panel, you will see that the Reds are more around the 210 range, the
06:23Greens are in the low 200s, but the blues are way down on 185, so definitely skewed
06:29towards red, little bit more green than blue.
06:32We can try and get the same balance on the spyglass by applying a color balance effect to the Render layer.
06:39So Effect > Color Correction > Color Balance.
06:43So it gives you is sliders for the shadow area, the midtone, area and the highlight area
06:48of the layer. The shadow area being the dark area and the highlight area being the brightest area.
06:53You can change the balance between red, green, blue.
06:56So, for example, I can expand the Highlight sliders by clicking these arrows, and if I
07:01just move one, you will see it will change instantaneously.
07:04So now I have reduced the red really far down, and now I have a lot more green and blue.
07:08Now it's too extreme in this case. I am going to reset this to 0.
07:12What I want is little more red, a tiny bit more green, and a little bit less blue.
07:17So good values in this situation would be +5 for the red, +3 for the green, and -3 for the blue.
07:25And what that does, again it's going to give you a little bit more red, a tiny bit more
07:30green, and definitely subtract the blue, and now I will start to skew it to more of a reddish hue.
07:35I can go farther but in this case, very subtle numbers work well.
07:40So we adjusted the matte to try to get rid of the black edge, we have also activated Motion
07:45Blur to make it blurry when the spyglass is moving fast.
07:49Then we adjusted the overall Brightness and Contrast, which affected the blacks and the
07:54whites, try to matching better to live-action footage.
07:56There is final step, we did a little bit of color grading by adjusting the colors to the color balance.
08:02Those are all important steps.
08:03There's few additional steps to take to get even better integration.
08:08
Collapse this transcript
Adding shadow to make the composite believable
00:00We spent some time adjusting the spyglass render in terms of the color and the motion
00:05blur and the matte edge to try to improve the integration.
00:08There are a few more steps we can take to sell that even further.
00:12First one is to put a slight blur on the entire render layer.
00:15Now CG Sharpe in general compared to the background the live-action footage in this case, which is slightly soft.
00:20If I zoom in there, you can see it a little bit better.
00:22So what I can do is go to the Render layer, go to Effects, and apply a Gaussian Blur.
00:28Now I don't want the blur to be too big.
00:30So a small number below 1 will probably be sufficient.
00:33So I'm going to enter .2. That just softens it a little bit.
00:37So here is with the Blur applied. If we turn off the Effect button right beside Gaussian
00:42Blur, here is before, and once again here is after, very subtle but very useful.
00:47Now while I am looking at the blur, I should probably reconsider the matte edge.
00:51I have additional blur to the blurred edge, and I want to see if that edge is still holding out.
00:55I think it's too blurry at this point.
00:57If I look really close I can see that some of the flesh color from the cheek is creeping into the gold.
01:02I think too much.
01:03So I'm going to go back to the effects we applied to the matte layer to try to adjust that.
01:08In this case, there was a blur of 3 and the curve is bent down this much, so I think the Blur
01:13is too heavy. If we go back to 1, you can see it definitely gets sharper.
01:17So I can also adjust this curve here to see whether it looks better with a more routed edge or more expanded.
01:24So let's say that this looks pretty good right here.
01:27Now that color is bleeding in, it's still a little bit soft.
01:30All right, so there's one final thing you can do to sell integration, and that's actually
01:34a big component of the scene.
01:36That's a fact that there's no shadow on her cheek. If she is really holding this device
01:41as she held her close to her face that would block the light, therefore there would be
01:45a shadow somewhere to her nose shadow right here on the cheek.
01:47So we don't have any kind of render pass for that, but we can fabricate that in the composite,
01:52and it's a great trick to do in After Effects.
01:55To do that what I will do is create another layer of the background footage or live-action
01:59footage, rotoscope that, and make it darker for fake shadow.
02:03So I am going to go down to shot1, select that, then go to Edit > Duplicate, and I will
02:09Copy the entire layer. It will be absolutely identical to the original.
02:13Once have that copied, I can darken that. So I am going to go back to Effect > Color Correction
02:18and apply the curves one more time.
02:20In this case I want to darken that copied layer so I'm just click in the center and
02:24pull it straight down to darken it, well that's really dark right now, much too dark.
02:28So little bit darker is good, we can adjust that in a minute.
02:32Now I need to rotoscope out of patch of this so it looks like the shadow on her cheek,
02:36I am going to go to frame 0, grab the Pen tool again and draw a shape that's going to represent that shadow.
02:43In this case and went to loosely draw a shape around her eye and down into her cheek and
02:49then now to be sure to close that.
02:51So it's like closer you see that there is definitely a darker patch now.
02:54Now it's really dark someone to adjust curve again.
02:57That's why a little bit darker.
02:59Now if click off of it so it's not longer selected, you can see it has a super-sharp
03:04edge to it. That's not really good for a shadow.
03:06What I want is a softer transition, so I'm going to go to the copy shot1 layer expand
03:12the Masks section and increase the Feather. Let's try 50.
03:16If I hide the Mask you see that it's definitely a softer transition. In fact, it's hard to tell where
03:20it starts, and that's actually great.
03:22So at this point I need to--as does the spyglass so the shadow location is going to change.
03:28So I'm click on Mask path to get the animation for that frame and then skip ahead and change
03:34the shape of that Mask. I'm going to turn on the Mask again.
03:37And one click way to do with this is double- click on the Mask edge, or on the Mask line, and then move
03:43it as a single giant unit.
03:44So I am going to skip ahead 10 frames at a time, each time double-click to select the
03:49entire Mask and then move it so it's consistently over her eye and cheek.
03:53And there is more motion at the beginning, so I am going to add a few more keyframes
03:57here to close to start.
03:59That's a general idea, though. You want the Mask to be in the correct position to emulate that cheek shadow.
04:03Now if you want to get out of this transform handle, you can hit the Escape key and that will
04:08put you back into your normal selection mode.
04:10At this stage, the shadow is dark the entire time, but the reality is the spyglass has
04:16been tipped towards her eye, so it would be great to change the darkness over time.
04:20One way to do that would be to the transform section on that layer and animate the opacity over time.
04:26So I'm going to the frame where it should be the darkest, and she brings a spyglass close
04:31to her eye around frame 20.
04:33So by frame 20 it should be the maximum darkness, so I am going to click on the time icon beside opacity and leave it at 100%.
04:39Now I will go back down the frame 0 where the spyglass is far away, enter 0.
04:44So now if I play through it, it's going to get slowly darker.
04:48Let's go to frame 20 again to make sure that shadow is dark enough.
04:51I am going to hide the mask, and then we could play around with the curves again.
04:55So there's definitely darker, and there is little bit lighter, some place in between like that.
04:59So this is the last step of the integration. Let's play it back.
05:03So you can see the shadow fading in slowly as she brings that closer, and we have motion tracked
05:08the spyglass and adjusted its various qualities like its color and softness to try so sell
05:13the fact that's incorporated into that video footage.
05:15So that wraps up project 1.
05:18We're going to move onto other projects in this course to learn other aspects of the
05:22Maya preparation and how to deal with the renders in After Effects.
05:27
Collapse this transcript
6. Transforming Motion Tracking to a Moving Camera
Recombining render passes for project two
00:00We're now ready to move project 2 into After Effects, so the first thing we'll do is bring
00:04in the spaceship render from Maya.
00:06Now before I do that I want to check a few things and make sure the footage is interpreted correctly.
00:11First thing I'll do is go to Edit > Preferences > Imports and make sure the Sequence Footage
00:17is set 24 frames per second that the speed that the original live-action was shot at,
00:21so we want to match that.
00:23I also want to check the Project Settings and make sure I'm set to frames, it's a easier
00:28way to work with image sequences.
00:30All right! Let's bring the footage in, File > Import > File and have a spaceship render
00:35saved out in the Renders folder under Shot2Ship.
00:38I want to just pick the first frame of the image sequence, make sure that Photoshop Sequence
00:43is checked--which it is--and Open that.
00:45Now just like project 1, because a render passes are stuffed into layered PSDs, what
00:50I can do is choose individual layers and bring them in one at a time, so I'm going to click
00:54Choose layer and here are all of the different layers in that file.
00:58Now I don't need the background, I don't need the MasterBeauty, but I do need all of the other passes.
01:03So I am going to start with the bottom one and working the way out, and so matte first,
01:06now I am going to go back and repeat the process.
01:08So here are all our render passes from Maya.
01:11Now I also want to get the original live-action footage too.
01:15So File > Import > File, and this is saved under the Footage folder under Shot2.
01:21So first frame, make sure it's clicked to Sequence, and Open.
01:25Now because we checked our preferences, we know that these are all interpreted 24 frames
01:29per second, which is correct.
01:31So now that we have the footage imported, we can assemble a spaceship into its own composition,
01:36so there is no competition yet, in fact, it says None right here.
01:39What I can do is pull down the first render pass and have the program automatically create
01:44a composition that has the correct resolution, duration, and frame rate. So let's start with
01:49the Diffuse layer, diffuseNoShadow, we'll pull that down, drop it in, and there it is.
01:54So let's assemble it, let's pull some more render passes down.
01:57Next thing I'll grab is shadowRaw, pull that down put it on top.
02:00Now again the shadowRaw pass creates a white shadow over a black field, and because there's
02:06no proper Alpha, it includes what's below it.
02:09So what we have to do is invert this first, so I'm going to apply Effect > Channel > Inverts,
02:15so now we have black over white, then I need to change the blending mode.
02:19In this case for a shadow, it's great to use Multiply.
02:22Here's the blending mode menu. Now if you don't see it, you can always click Toggle Switches.
02:27There, it goes away, and here it is again, so I'm going to change the shadow layer to Multiply,
02:33and that multiplies the shadow over the spaceship, diffuse in this case and darkens a little
02:38bit, particularly around the fin.
02:39Next thing I will do is grab the reflection, so I'm going to back to my list of footage
02:44here, we can use this little scroll bar to find it, there is the Project tab, grab the
02:49reflection, pull that down. And reflection needs a blending mode like screen, again,
02:54not proper Alpha, you want to just keep the bright areas.
02:57So I'm going to go back to the blending mode, change that to Screen, and then I want to
03:01grab the specular, same situation, pull that, put it on top, that needs a Screen also, I
03:06just want to save the bright areas. And last, incandescence, hold that down, put that on
03:11top, and these are just bright logos over a black field, so Screen works great for that also.
03:17So there's a reassembled ship.
03:18There is one more render pass, we're going to use that later, which is the matte pass.
03:22Now all the passes are stacked together in their own composition, we can nest the composition
03:26later to move that as a single unit, but since I have all these render passes in separate
03:31layers, I can adjust them individually.
03:33For example, I can increase the intensity of the reflection in the specular highlight,
03:38so I can go to the reflection layer and apply an effect to adjust that.
03:42In this case the curves effect is great for adjusting the contrast and brightness.
03:45So I am going to go up to Effect > Color Correction > Curves, and if we want to brighten that
03:51reflection I can click to put a point here and pull this up, and there it becomes brighter.
03:56I can do the same with the specular pass, Effect > Color Correction > Curves.
04:01You can also click to add single point there, pull that up, to brighten the specular component.
04:06You can see along the edge of the wing there.
04:09So you can adjust these layers if they're too dim or too bright. And another thing you
04:13can do is go to incandescence layer, which is just a logo.
04:16Now I could brighten that or darken it.
04:19In another option for any of these layers is to adjust the color.
04:22Let's say I want a totally different color for the logo. I have the opportunity to that
04:25because this is rendered separately.
04:26So, for example, I can pick the incandescent layer, go up to Effect, go to Color Correction
04:33and go to Color Balance, and because these are all bright colors, I can go to the Highlights
04:37sliders Red, Green, and Blue, and change the values to shift the color.
04:42For example, if I put in -75 for Red, 100 for Green, and -75 for Blue, I have shifted the colors to a neon green.
04:54Of course, you can pick any color you want just by moving the sliders around.
04:57I'll shift the balance of colors, so there's a reddish logo, let me go back to green one though.
05:02So it gives you a lot power in terms of adjusting your render.
05:06So now we have reassembled the spaceship through all the render passes, and we adjust a few
05:11of those layers to effects, so now we're ready to add the spaceship to the live-action footage.
05:16
Collapse this transcript
Removing unwanted elements with a garbage mask
00:00We have assembled the spaceship render passes inside our composition in After Effects, we
00:05also adjusted the various layers to improve the quality of the specularity in the reflection
00:10and also changed the color of the incandescence on the logo.
00:13We are now ready to take this composition and nest it into another one, so we can add
00:17the live-action background footage.
00:19So let me go straight to Composition > New Composition. I want to create new composition
00:25that matches the first one.
00:26In this case I need HD 1080, 24 frames per second, and a duration of 90 frames.
00:33So this is all correct. I can click OK now, and there is a new composition called Comp 1.
00:38Let me go ahead and grab the Shot2Ship composition and drop it in this one and therefore nest it.
00:44Now I want to see this in front of the live- action, so I'm going to go to Shot2 and pull that
00:49down and place it underneath.
00:50Now even though that's in the composition, I cannot see it in the viewer. That's because
00:54the Alpha around the spaceship is not correct, I do not have the transparency information to make that work.
01:00So what I can do though is use the matte trick or use the matte render pass as Alpha information
01:05and apply that to the ship.
01:06So I'm going to drag this matte render pass down and place it on top. And once again,
01:12as a matte, it's whites or a black, so I can use this as Alpha information for the track matte feature.
01:18Now there is one issue with this. If I zoom back and play this back, you'll see that this
01:23render pass also traps the shadow on the building.
01:27Now we're going to be able to use that later, but I don't want it for this particular iteration
01:30of the matte layer, I want to cut this out and just use the matte on the ship.
01:34Well, how we do that? Well, a great way to get rid of something you don't want for a layer is to rotoscope.
01:39In fact, when you rotoscope in order to get rid of something, it's often called creating
01:44a garbage mask or a garbage matte.
01:47So in order to create a garbage matte, what I can do is go back to the Pen tool in rotoscope
01:52and then change some settings on that mask to get rid of that section.
01:55Let's give that a try.
01:56I'll go to Pen tool and draw a loose mask around that shadow area.
02:00I just want to encompass it.
02:03I want to close the masked path, it's going to keep that area, now that's not good for
02:08our purpose of using a track matte, but just for now, I'm going to leave it set to that
02:12option so that we can see where it is.
02:14What I do need to do though is animate this mask changing shape over time, because the
02:19shadow moves, and so does the ship.
02:21So let me go to the matte layer, expand it, expand the Mask section, and then beside Mask 1,
02:27expand that and then click on Mask Path to activate the keyframing, so there is the first keyframe.
02:34Now I can go to the timeline and adjust the shape of the mask so it continues to encompass
02:39the shadow, but I don't want it to touch the ship itself.
02:42So in order to change the mask shape, I can use Selection tool and click on or off the
02:47various mask points, and then move them to change the shape.
02:50It's going to be a tight fit between the shadow and ship, there should be just enough room,
02:55so you don't cut into the ship.
02:56So I'm just scrolling through and try to find the palm areas, it looks pretty good.
03:01Again, I don't want to touch the ship itself, I just want to make sure I always encompass the shadow.
03:06Now that I have the shadow isolated with this mask, I need to invert the way it's operating.
03:11I want to give the rid of the shadow, but keep the ship matte.
03:14A quick way to do that is to go back down to Mask 1 and change its functionality.
03:19There is a mode menu right here that determines how that mask is going to operate.
03:23If it's set to Add, which is the default, it's going to keep whatever is inside the mask.
03:27If I switch this over to Subtract, it's going to invert that, now the matte is kept.
03:32So now we can use this as a source of Alpha, so I'm going to collapse this.
03:37I want to hide that layer, I don't need to see it, go down to the ship layer, go to the
03:42track matte menu and switch this to Luma Matte.
03:44Luma Matte is going to take the luminance information or the brightness information
03:48from the layer above, in this case the matte layer and convert that the Alpha for the ship layer.
03:53So there we go, the ship is now cut out, and I'm not going to see a shadow, we will return
03:58to the shadow later on.
03:59It will be a good time to play this back and see what the ship looks like over the background.
04:04As we play it back, we can see that the ship doesn't quite match the building, remember
04:08we created some planes inside Maya to cut the edge of the ship out.
04:12However, as the footage moves forward, I'll just zoom in here, you can see that that's edge drifts.
04:18That's where Motion Tracking comes into play.
04:21What we can do is motion track the ship so that that edge lines up with the building edge.
04:26And the problem arises because the camera's zoomed quite a bit, not only in terms of left-right,
04:31up-down motion, but also some rotation on there where the camera tilts left and right.
04:36Now you may know ship also looks a little bit jaggy right now, that's just because we're zoomed out.
04:40If we zoom all the way in to 100%, you can see the edges are clean.
04:44So we have successfully cut out the ship with the track matte trick using the matte render paths.
04:49We have also placed it over the background, now we're ready to tackle the problem of the
04:52motion, a figure a way to motion track the ship to the original camera movement.
04:57
Collapse this transcript
Applying motion tracking data to a null layer
00:00We placed the spaceship layer over the background footage. Now we're ready to try to motion track the
00:05ship so it matches the camera movement of that footage.
00:08Let's take a look at it.
00:10One thing you'll notice is that there is more chaotic motion, particularly at the beginning,
00:14also the fact of the camera's rotating or tilting left and right.
00:18If you watch the top of the building, you can see how that perspective changes quite a bit.
00:22That tells us two things.
00:23One, we need to have the tracker figure out the rotation of the camera.
00:27Two, the fact that there is lot of chaotic motion at the beginning of the footage, means
00:31that you probably want to do the tracking from the end of the timeline towards the beginning,
00:35in terms of analyzation.
00:37When we go to the last frame, let's apply a tracker.
00:40I'm going to pick shot2, go to Animation, and apply Track Motion.
00:45Now in order to have it to figure out the rotation, I need to select the Rotation check
00:50box right here, Position is turned on automatically, in this case I need Rotation also.
00:56When you click on Rotation, you get a second track point, that's necessary to figure out
01:01how the camera is tilting, so track point 1 and 2.
01:05The idea is you place these over two separate features. Let's take a look, I'll zoom back.
01:09We are fortunate in the fact that there are two lights in the side of the building that are
01:13good candidates for this.
01:14I'll place track point 1 on the left one and track point 2 on the right one.
01:19So I'll zoom in and just click-drag these by the empty portion of the center to reposition
01:24them, so track point 2 will go over this light here.
01:27Now the track point boxes are smaller then the light feature, so I am going to expand
01:31this box--just want them to encompass that feature loosely.
01:35So here is track point 2, now track point 1, there we go.
01:39Let's try to analyze this from the end of the timeline backwards.
01:42All right, let's take a look at track point 2, that's looking pretty good, now track point 1.
01:48It's here already on frame 0, it slipped off, and however, the rest of the motion path looks
01:52pretty solid, so you could go in and adjust the track points to continue to reanalyze
01:57or check the options in the tracker.
01:58In this case, though, because I only have maybe two frames that are incorrect, I think I'll
02:03manually place the track point.
02:05So on frame 0, I'll drag it back up to where it needs to be, and in frame 1, do the same.
02:09All right, that's looking pretty good.
02:11So now we have motion paths for these two track points, we can apply it to the spaceship.
02:16Now there is a potential issue. Normally when you apply the tracker to a layer, it keyframes the properties.
02:23In this case, because we have Position and Rotation, if I apply to spaceship, it's going
02:29to animate position/rotation here.
02:31Therefore, although I can offset the positions to the anchor point, I cannot offset the rotation
02:36unless I change the resulting keyframes. That could be a lot of work.
02:41So one thing we could do to avoid this potential problem is apply the tracker to a Null and
02:46then parent the ship to the Null.
02:48Now what's a Null? A Null is a special layer inside After Effects, it doesn't actually render.
02:53It has a set of Transforms which you can apply something like a tracker to and
02:57parent things to but doesn't occlude anything below it.
03:01So if I apply the tracker to a Null, then parent the ships to the Null, I'm free to
03:06later adjust the position offset or rotation offset on the ship layer itself. Let's try that.
03:12Now there is one thing we should probably do before we apply it though to the Null,
03:15and that is remember that the tracker applies the data based on where the anchor point is
03:21for the layer, so the anchor point is basically stuck to the motion path.
03:25Now in this case, because we have two track points, that'll be stuck to the motion path for track point 1.
03:31So we really want the anchor points for the Null on the spaceship over here where the track point 1 is.
03:37Let's go back to the composition view.
03:38So here is the spaceship. While we have that, let's go and select that layer and move it
03:43to anchor point from here, down to where the light is for frame 0. Let me go to frame 0.
03:49I want to use Pan Behind tool to move that, and I'll zoom in so I can see it better.
03:54So there is pretty much the center of that track point 1 for that frame, frame 0.
03:59Okay, so we need a Null.
04:01I have already created a Null inside After Effects, you go to layer > New > Null Object, and there
04:07is a Null, it comes in as a red bar, it's indicated by red square inside the viewer.
04:12Now this doesn't actually interfere with the final render, it's just there for reference.
04:16It also has its own anchor point at the top left, and that's red.
04:20So while we had a Pan Behind tool activated, let's try that over also, I want to put in
04:25the same place, about right here.
04:28By doing that when we apply the data, it's going to make that the ship is pretty much
04:33where it needs to be right here.
04:34Okay, I'm going to go back to the Selection tool.
04:36Now there is one another step we should take, we fix the anchor point for the Null, fix
04:40it for the spaceship, but we have to think about what to do with the matte.
04:44Remember the mattes supplying the Alpha to the ship, so it needs to travel also, so I'm
04:48going to do that through parenting.
04:50I'm going to parent the map layer to the ship and then make the ship follow the Null.
04:54I am going to parent the ship to the Null, so matte is parented to the ship, the ship
05:01is parented to the Null.
05:02So now we're ready, fix the anchor point to care the parenting, we have the Null, now we can apply the data.
05:08Now we go back to Shot2 and make sure I can see the motion tracking, click the Edit Target,
05:15select the Null, click OK, then apply the data, Apply, and Yes for X and Y.
05:22So here the Null has picked up the motion tracking data, and therefore the ship is following
05:26the Null and the matte is following the ship.
05:28Now there is a problem. You see how it's rotated? Looks like it's a little off kilter there.
05:32Let's play it back until it's going on.
05:34So the ship feels like it has the same motion as the camera, so the motion tracking is therefore successful.
05:38However, it's off a bit in terms of rotation, but since we use the Null, we can offset that.
05:44Now the Null itself has the position/ rotation animation placed on it by the tracker.
05:48Now if I go down to the spaceship layer, you can see the position/rotation are still free.
05:53So what we can do is change the rotation--offset the rotation and get the ship back where it needs.
05:58In fact, if you enter 7.5 into the Rotation, it snaps back down to where it needs to roughly
06:04be, on top of the building.
06:05Now it's not exact match yet. We left those planes we placed in Maya little bit loose,
06:11so our layer step will deal with a really tight fit, but at least the ship is rotated correctly now.
06:16We'll play it back, rotation is now correct.
06:19Beside from the edge tightness here, eventually there is the issue of the fact to seeing cut
06:23off here, but we'll deal with that in the later step.
06:27So we have successfully motion tracked this footage through two track points with rotation
06:31and position and applied that to a Null, and the Null basically drives the ship and the matte layer along.
06:38
Collapse this transcript
Adjusting shadows and matte edges
00:00We have motion-tracked the spaceship so it follows the camera movement within the original footage.
00:05We're now ready to move on and refine other aspects of the ship so that it better integrates with the background.
00:11Let's take a look at the footage and see what's going on so we can match it.
00:14Now, the background in terms of the building is actually quite soft. It's a little out of focus.
00:19Also, there is a lot of blue haze.
00:21The sun is up here at the right, and it's kicking a lot of blue haze in front of the
00:25building, and in front of the actress.
00:27So, it would be great to get that soft quality, plus a little bit of blue sneaking into the ship.
00:32Now, in terms of the blueness, we can use the Opacity trick to achieve that.
00:36Basically, what we have is an empty sky.
00:39It's mostly the same color of grayish blue, little bit of brightness variation, but not too bad.
00:44Now, the fact that there are no objects behind the ship and we have a clear sky will allow us to
00:49reduce the Opacity and therefore introduce some of the blue into the ship's color.
00:53So, I am going to go to the Ship layer and set the Opacity to 85.
00:58That gives you illusion that there is some blue haze.
00:59Now, if you had a background where there were objects like telephone poles, this would not
01:04work, because those poles would show through.
01:06What you'd have to do instead is apply some Color Grading tools like Color Balance or
01:11Curves to try to introduce that blue color.
01:13But we have the blue here, now we can start thinking about the edges and the overall softness.
01:18The ship is much sharper than the building, also its edges are sharper than the building.
01:23One thing we do for the body of the ship is simply apply a Gaussian Blur to soften that.
01:27So, with the Ship layer selected, I'll go to Effect > Blur & Sharpen > Gaussian Blur.
01:32Now, here the background is quite blurry, so we can use a fairly high blur.
01:36I'll put a Blurriness of 2 in here to soften the ship.
01:40That softens the body of the ship, but doesn't really do with the edge.
01:43The edge is still pretty sharp, especially when compared to the top of the building.
01:46So in order to fix that, there are a couple of approaches we can take.
01:50One, we can apply effects to the matte which is applying the Alpha to try to soften that.
01:55The other thing we can do is perhaps add a mask to the top of the building to better
02:00fit the ship to the building and also feather that edge even more right here.
02:04Before we do that, though, let's play it back and make sure the ship is really motion tracking
02:09correctly to the very top of the building. Now in fact, there is a little slippage.
02:13The ship is slipping to the right.
02:15See, right here, there is a gap opening up where that little cut-out is.
02:19Now, since we applied the tracking data to Null, we're free to adjust the position of
02:25the actual Ship layer. In this case, I think we have to keyframe it.
02:28Now the reason the ship is slipping is in Maya, we roughed in the perspective in terms
02:33of the camera position and rotation, but we never animated the camera.
02:37There is no camera animation.
02:38You potentially have slippage when the real-world camera's moving quite a bit.
02:42I have worked at this footage in advance.
02:44I believe a good place for keyframes is on frame 0, 10, and 25.
02:49So, let's look at frame 0.
02:51Let's make a mental note that this edge of this cut-out should line up with this edge
02:54of the building right here.
02:56So, I'm going to set a key here by clicking on the Time icon for position.
03:00I am going to move the frame 10, then, and figure out how to get that edge back to left.
03:05So, in this case a Position of -14 in the X and 6 in the Y works pretty good, so here
03:13is frame 0, here's frame 10.
03:16Actually, 6 in the Y maybe brings it down a little bit too much, so here you see a tiny
03:22gap on top of the building.
03:23Actually, what we might want to do is leave it here on frame 10 where it intersects a
03:28little bit, go back to frame 0, and adjust that.
03:32So in this case, you actually want a positive 4, so 04.
03:36So, it looks like the same relative position.
03:39The ship is tipping down a little bit into the building edge.
03:41There is Frame 10, and then also frame 25. So in frame 25, we can enter -24 and 8.
03:50So now if we play it back, it's lined up with the builder better.
03:54Now, it's off the slippage but doesn't deal with the fact that there is a sharp edge here,
03:59and it dips down a little bit.
04:00So, in order to soften the edge, there are two approaches that we can take.
04:04One again is to go back to the matte and adjust that, and second one is to add a garbage mask
04:08to cut out the very top of the building, that's where the ship overlaps.
04:11So let's adjust the matte.
04:13I'll go to the matte layer, and we'll apply two effects we have used before, Gaussian Blur and also Curves.
04:19I'm going to increase the Blur, let's try 3.
04:23And the advantage of that is you can already see that the upper edge of the ship is slightly blurred.
04:28That's actually good.
04:29We want that a little bit soft.
04:30Now in order to expand or erode the matte, I can adjust these curves here.
04:34For example, if I pull it down, it erodes it a tiny bit. That's good.
04:37I don't want to wind up with that little dark edge, so about there looks pretty good.
04:42Now, that makes the upper edge look great, but we still have the problem with the top of the building.
04:45So there we're going to switch over to the garbage mask, cut out the excess.
04:49In this case, it's going to go on the Ship layer itself.
04:52So, picking the Ship layer, I'm going to go up to the Pen tool, and draw a mask that represents
04:57the top edge of the building.
04:58We're going to do fairly rough at the start and then refine it.
05:01We'll go fairly wide as the ship does move. Then I'm going to close the mask.
05:06Now, as soon as I do it, it cuts out the top of the ship, so we want the opposite result.
05:10So I'll go down to the Mask section and on Mask 1 set that to Subtract.
05:14There we go! Now, the mask will make a hard edge still.
05:18So what I can do though is go down to the Feather and put a Feather in--say, 4.
05:22I'm going to hide the Mask now. So that's giving me a nice, soft edge.
05:25So basically I just need to adjust the mask so it looks like it lines up in the correct place.
05:30I'm going to do that by grabbing the Selection tool, then hide the Mask.
05:34Now, there is a little bit of blue tracked in the top of the building, that's okay.
05:37But now we have achieved the soft edge there.
05:40Now you don't actually have to rotoscope this over time, in other words, you don't have to keyframe this.
05:44What has happened is we have applied the mask to the Ship layer.
05:48The Ship layer is inheriting the motion of the building through the motion tracking.
05:53Remember, we motion-tracked the building lights right here, and then the other ones in left.
05:57So, that's the motion of the building, which is of course applied by the camera.
06:01But the building is moving through the view.
06:03The motion is applied to the null, the ship follows the null through parenting.
06:08Therefore, the mask inherits the motion of the building. Therefore the mask is always
06:12in the same place relative to the building, and we don't have to keyframe it.
06:16Let me play it back as an example.
06:17So, you can see that mask is relatively in the same position to cut out the ship where
06:22it crosses over the building.
06:23So now we fixed the edges on the ship, one last thing we can do in this movie is add the shadow back.
06:28Now the shadow is trapped in the matte layer, which we're only using for a matte now.
06:32But what we can do is duplicate this layer, Edit > Duplicate, and use that copy as a new shadow.
06:37I'm going to turn it on so we can see it.
06:39Now, first thing we need to do is reverse the mask to get the shadow back.
06:42So, I can go down to the mask and change that from Subtract to Add.
06:46Now next thing I need to do is go to the end of the timeline so I can see where the shadow
06:49appears, and there it is.
06:52Now what I need to do is make sure it gets inverted.
06:55I want a black shadow on white.
06:56So I'm going to go up to Effect > Channel > Invert.
07:00Then I can multiply it through a blending mode against everything below it.
07:03So I'm going to go to the blending mode and change that to Multiply, and there is a shadow over the building.
07:08Now it's extremely hard edge, so I'm going to soften it.
07:10I'm going to apply a Gaussian Blur.
07:12I can put a very large blur number in here in terms of Blurriness to really soften that out.
07:17Now, it's still extremely dark and heavy.
07:20So what I can do next is reduce the Opacity of that matte layer.
07:23So I'm going to reduce that to 20.
07:25And this is barely in there, here's with the shadow, here's without.
07:28Now, if I want to continue to fine-tune the darkness, I can go up to the Curves, it's
07:33left over from the duplication of that matte layer.
07:36If I adjust this, this will affect the overall brightness and darkness.
07:39Of course, we can also adjust the Opacity. Let's try the Curves.
07:42So there it's getting a little bit darker. Let's play it back.
07:45So notice soft channel is coming over the edge. Well, it still looks a little too heavy to me.
07:49So I'm going to reduce the Opacity to 10%.
07:51The idea is you want the ship to look like it's blocking some of the light, but not casting a super-hard shadow.
07:57All right! So we have adjusted the matte edge on the ship, we prevented the sliding by animating
08:02the position, we have introduced some blue into the ship by reducing the Opacity, and then
08:06we added the shadow back.
08:07So now we're ready to move on to the final steps where we improve the integration even more.
08:12
Collapse this transcript
Using color correction to improve layer integration
00:00We have spent some time working with the edge quality of the spaceship to make it
00:03better integrated, we also softened it slightly and then adjusted the color by
00:07just reducing the opacity.
00:09There is more room for color adjustment, however, to make it integrate even better.
00:12In fact, I am going to pick the spaceship layer and apply three new effects.
00:17First one is Color Balance, next one is Curves, and then we will add a new one
00:22we haven't used before which is Hue/Saturation. Let's start with Color Balance.
00:25Now, of course, the goal is to make it look like this was shot in the same scene as the actress.
00:30So I think we have too much red and not enough blue even at this point.
00:34So what I can do is reduce the red for both the shadow midtone and highlight,
00:39maybe increase the blue for the Highlight.
00:41So let's enter -10 for the red, -15 for the red Midtone, -15 for the red Highlight.
00:48So it's -10 for the Shadow, -15 for the Midtone, -15 for the Highlight.
00:54Also, I am going to increase the blue of the highlight.
00:57So what that has done is reduced the overall amount of red and snuck up the blue.
01:02So now, it feels a little bit better integrated into that sky.
01:05Now, it's still very saturated compared to the background.
01:08So what I can do is go down a little bit deeper to my Hue/Saturation and reduce
01:13the saturation through the Master Saturation control.
01:15When I put -40, you will see it becomes much less saturated and feels a little
01:21bit like there is additional haze in front of it which is good.
01:23Now, we still have the Curves tool right here in the center.
01:29I can go ahead and adjust that.
01:30I'd like to get this a little bit brighter because these are very brighter in that scene.
01:35So I am going to click one time in the center and pull up the curve just to brighten it.
01:40Now, one thing to keep in mind as you're adjusting the colors to the curves or
01:44the Hue/Saturation or the Color Balance is the fact that you want the blacks and whites to match.
01:48Now in particular, the blacks are important here, you want the values in the
01:52black area on the spaceship to match the dark areas when the live action plate,
01:56like on the actress' hair.
01:57Now remember, you can check the Info Panel to see what the values are.
02:01So if I place my mouse over the spaceship here in the dark area, my values
02:04are in the mid 30s up to low 40s, with more blue, then green, and definitely less red.
02:10If I check the hair, I have similar values, little less red, little more green
02:16and definitely more blue, all somewhere in the mid 30s to low 40s.
02:19So as you're adjusting those effects, keep that in mind you might want to test
02:24and see what your values are.
02:25So now that matches much better in terms of color. Let's move on to the next step.
02:30One thing we might want to do is reduce the intensity of the logos.
02:33Remember the logos are an incandescent layer by themselves.
02:36Let's go back to the Shot2Ship comp and adjust the incandescent layer.
02:41I am going to expand that.
02:42One quick way to reduce the intensity is to reduce the opacity.
02:47So I am going to reduce this even further down to 60%.
02:50Now, I will fade out the logos a little bit more.
02:53Let's go back to comp 1. All right! So the ship is looking pretty good.
02:57Now, there is one additional thing we can do to make it look like the CG was
03:01shot in that video to start with.
03:03Now, video normally has compression artifacts and noise.
03:06The noise takes a form of shot noise which is 1 pixel variations of light intensity.
03:11The compression artifacts are more blocky kind of compression artifacts that are
03:15necessary to store the video. Now, CG does not have any of that to start with.
03:19So if we want to add that, we have to use another effect.
03:23And one effect that's great for that is Match Grain.
03:25So I am going to go up to Effect > Noise & Grain > Match Grain.
03:29When I do this, I get a little preview box that's white.
03:32You can reposition that if you grab the center circle and move it.
03:36That just shows you what the grain is going to look like.
03:39Now, it's not functioning yet because what it needs is a source layer.
03:42There is a Noise Source layer right here.
03:44We're going to change the menu to the footage where you're going to steal the
03:48grain and right now what has the grain is Shot2, and there is the grain.
03:52Now initially, that grain comes in very heavy. It basically exaggerates it.
03:57We don't want it to be that intense.
03:58So what we can do is go to Tweaking and reduce the Intensity, say 0.2.
04:03Now, it makes it very subtle but still in there.
04:06And what's great about this is the grain from the video and the compression
04:10artifacts from the video changes with each frame.
04:12It's kind of like static on the TV.
04:15So the same motion is picked up by this effect Match Grain and applied to the spaceship.
04:20Now in order to get rid of the white box, I have to go to the Viewing mode,
04:25and set the final, Final Output.
04:26So now it places the grain over the entire spaceship.
04:29Again, it's fairly subtle with these settings, but it's going to add some more realism.
04:34Let's move on and deal with another problem which is the fact the spaceship gets
04:38cut off and the reason it gets cut off is we motion-tracked it, and we end up
04:42moving the ship to the right and left the gap here.
04:45Quick way to fix that is to do another nesting.
04:47We're going to create a new comp or a new composition, make sure it has all the
04:52same resolution, frame rate and duration, and then nest Comp 1 inside Comp 2, so
04:58here is Comp 2 which is empty.
05:00Go back to the Project Tab and pull Comp 1 into it.
05:03Now initially, I am still going to have the same problem, it's cut off.
05:07But what I can do is scale up this nested comp to 105% and then position that
05:13nested composition so that we never see that gap.
05:17So I need to move it pretty far to the left, so let's test that.
05:22So that's good, that's good, that's good. So I think we're safe there.
05:26So that prevents the clipping of the spaceship. Now, a small scale is not too bad.
05:31We're working with a pretty high resolution to start with, so scaling by
05:34105% is not too bad.
05:36The same scale is not gong to degrade the quality too much.
05:39Let's apply the final step.
05:40Now, you notice that in the footage, the sun is right here, so it's making
05:44the haze very bright.
05:45In fact, the bright haze is traveling across the actress' hair and also in
05:50front of the building.
05:51So it would be cool to get that over the spaceship also.
05:54So there is a quick trick for that. Let me go back to frame 0.
05:58What we can do is duplicate this nested comp, Edit > Duplicate and then
06:01make this layer brighter and apply a curve to do that, or Curves and make that brighter.
06:07Now of course everything gets brighter but what I can do then is create a mask
06:11that is circular in this area.
06:12So in order to create a mask, I can use one of the mask shapes we have up here.
06:17Now by default you will see the Rectangle tool. There is also the Ellipse tool.
06:21If I grab that and click-drag, it cuts out that layer in a circle.
06:25So now I can position that circle such a way that it starts to overlap the spaceship.
06:30Now, the overlap is very hard right now, if I click off of it, or Escape--in
06:35this case I have the transform handle, so I need to escape--and then click off of
06:39it and then hide the mask, you'll see a really hard edge.
06:42So what I can do is feather that mask, and that ellipse shows up as just the
06:46mask underneath your layer. So here is Mask 1.
06:48I can increase the Feather to 500 pixels and therefore soften it.
06:52So when I brighten this, that bright fake sun starts to bleed on to the spaceship.
06:57Just play this whole thing back. So there you go!
07:00We have taken a CG Render of a spaceship from a Maya scene that did not even
07:04have an animated camera, we have applied motion tracking and some masking to
07:08make it look like it's actually in the scene with the same camera motion as the live action footage.
07:12We have also spent some time color- grading the spaceship, adjusting its edges
07:16and in general making it look like it's in the same lighting with the same atmospheric haze.
07:20That's pretty cool!
07:21You can apply these techniques we have talked about in this series of videos for
07:25this project and apply it to any CG Render where you need to make it look like
07:29that CG was in the real world to start with.
Collapse this transcript
7. Stabilization and Corner Pin Motion Tracking
Stabilizing shaky video with the Tracker
00:00It's time to start Project 3. In Project 3 we're going to use Motion Tracking to
00:04stabilize a piece of footage.
00:06Now so far we have used Motion Tracking to Transform Track where we identified
00:10some motion in the piece of footage like camera movement and transferred that
00:13motion to a CG Render, like the spyglass or the spaceship.
00:16We can also use Motion Tracking to stabilize, and when you stabilize you
00:21identify the camera shake in the shot and then remove it so it looks like there
00:26is never any motion at all, so let's get started.
00:28I'm going to up here and go to File > Import > File, and retrieve this shot.
00:32In this case this is shot3 in the Shot3 folder in the Footage folder.
00:37Open that, I am going to drag that down, make a new composition, here we go.
00:41Let's play it back, see what it looks like.
00:44So it's definitely lot of camera shake, much more than other shots.
00:47But we're going to apply the Stabilize function of the Tracker tool to get rid
00:50of that, so let's go ahead and do that.
00:52With the layer selected I'm going to go up to Animation > Track Motion.
00:57Tracker opens in the Transform mode.
00:59You can see right here it is Track Type: Transform, I want to switch that to Stabilize.
01:04Just like transform tracking I'm going to get a track point.
01:06Now because the camera is also rotating left and right, I need to click on the
01:10Rotation button down here beside Position, and it gives me two track points.
01:14So the idea is to place these two track points of our features in the frame
01:18that are visible the entire time.
01:20I don't want to place the track points over the actress, she actually moves.
01:23I don't want that, I want to be in the scene that does not move on its own
01:27chord, therefore the wall is a good candidate.
01:29Let's take a look on the less blurry frame, say, frame 10.
01:33So this splotch right here is a good feature to pick, and also this bush, let's try that.
01:37I'm going to reposition these track points, going over to the splotch and the
01:41second one track point 2 over the bush.
01:44Now for the bush I'm going to center it on this leaf at the top that kind of sticks out.
01:49I'm also going to make the boxes much larger--the feature box and the search
01:53box--and you can make this any of size you want.
01:55In this case it's going to help with the accuracy.
01:58Now it will slow down the tracking process, but should help us in the situation.
02:02So now that we have our track points set we can try to analyze, I'm going to
02:06analyze forward from frame 10, and zoom in a bit and just play it back.
02:10So looks like those motion paths are pretty accurate from frame 10 to the end.
02:14Let's analyze backwards from frame 10.
02:15All right, it looks pretty good, but eventually it does slip off because there is
02:19a very heavy motion blur at the beginning.
02:21If I zoom into track point 1 you can see that splotch is right here, whereas
02:25the track point's over here.
02:27Now let's see to another problem we haven't dealt with yet, and that's the fact
02:30there's a zoom on this shot.
02:32If I play it back to the viewer, you can see it starts closer and ends further
02:36away, it's because the lens is changing, how do we deal with that?
02:39Well, what we can do is activate Scale for the tracker, scales of third
02:43transform we can pick right here. What that will do is when we apply the data
02:47we'll animate the position, the rotation and the scale of the layer.
02:50So we definitely want scale in this situation because the track points will get
02:54farther and closer apart as do the features we're tracking.
02:57Just give it that a try, and start frame 10 go forward, play that back, it looks
03:02pretty good, pretty much the same. And you go to frame 10 and go backward.
03:06Let me zoom in here.
03:07So the track points still slip off for the first few frames.
03:11It's okay that we have activated Scale, however, because we still want the scale to be animated.
03:16So in terms of first few frames we are going to have to deal with that manually.
03:20So let's see where it goes bad.
03:22So frame 4 looks goods, 3 is starting to slip, so I'm going to move this track point to fix frame 3.
03:27I'll put it in the center of that streak, which is the blob or the splotch.
03:31Here is frame 2, fix that, frame 1 right in the center of that streak, and frame 0
03:37where it's the most far off.
03:39All right, that one is fixed. Let's go up to the track point 2.
03:43So frame 5 is good, 4 is good, 3 is pretty good, 2 is actually good, 1 is
03:50starting start into slip, that's a little harder to see what's going on with the
03:54blur, we have to kind of guess where the center of that leaf is.
03:58And now frame 0 which is further soft.
04:00All right, so those two motion paths are repaired, now we can try to apply the
04:04stabilization. Now it works differently in this case because I want to apply the
04:07stabilization to the layer itself and not some another layer.
04:10So what I can do is go straight to the Apply button and say yes to X and Y.
04:15It jumps back to the Composition view. You'll see that the anchor point position
04:19scale and rotation are keyframed for me by the tracker.
04:22Now most of the X/Y movement is taking care of the anchor point, let's play it back.
04:28So see what happens is the entire frame has moved in order to keep those
04:32features locked in the same place, so those features don't really move, but the frame moves.
04:38Now the problem with the black gap we have to deal within a minute.
04:41Let's get closer to this to see if the first few frames are still working for us.
04:46There is such heavy blur here, it's often very difficult to deal with.
04:49Now one thing that happens is there's a little but too much or little too less
04:53rotation for the first few frames.
04:54So say around frame 4 or 5, it's looking pretty good, after that the plate looks pretty stable.
05:00Before that, though, the rotation is not quite correct, so in that situation we
05:04can do is go down to your rotation animation and try to repair these keyframes by hand.
05:09So again, let's see where it looks good, maybe frame 2 and on.
05:13Now yours might be slightly different.
05:15Very small changes to the track points and very small changes to the boxes on
05:20those track points can give you different results in tracking.
05:23But the idea is to go in and repair the keyframes for changing their values to
05:27try to fix in any kind of glitches.
05:29So with my version, it's frame 0 and 1, they're not really good.
05:33So let's see frame 2 looks good, so I want to match 2.
05:37So I'd go to frame 1, I am going to try to match rotation there.
05:41Let's try 0 rotation, okay, it looks pretty good.
05:43Let's go down to frame 0, it's already 0 there, so I will try some different
05:48numbers, may be negative number, -0.5, but it's a wrong way so how about 0.5
05:52then we'll play it back, not enough back to frame 0.
05:56Let's try 1, and it looks pretty good. So now there is now major change in rotation.
06:01There's still a lot of blur at the beginning.
06:03That is permanent to the footage. You're not going to be able to get rid of that.
06:08But at least you have stabilized the play, so let's play it back.
06:11That looks pretty stabilized.
06:12Now again, you might have certainly different variation, you might have to spend
06:15additional time adjusting rotation keyframes at the beginning, also it's been
06:18how you set your track points you might find you have to adjust the scale too.
06:22But generally, it's just scale and rotation for a shot like this.
06:25So let's deal with the black edge last.
06:27We got that gap opening it up, and that's not good.
06:30So a great way to fix that is to nest the composition.
06:33Let me go up to Composition and make a brand-new composition.
06:35Now I need to match this to the first composition.
06:39Now note this size of this project is smaller.
06:41This is actually 1280x720, so you need to make sure the composition I make
06:46now is the same size, 1280x720, but still has a same frame rate 24 and also duration of 90.
06:53So where your first stabilization does not really matter based on the
06:58resolution, that seem to be consistent within the project.
07:00So I am going to click OK, now I'm going to pull shot3 comp in the Comp1.
07:05Now I need to make sure my durations are the same, and I went a little bit too quickly there.
07:09My duration for this project is only 60 frames, so let me go back to Composition >
07:13Composition Settings, and make sure to set to 60.
07:16So I can change Composition properties at any time.
07:19All right, now we have the correct duration, and now the shot3 is nested into
07:23Comp1, which is a new composition.
07:25At this point I can scale this up, let's say 107% and therefore disguise the black edge.
07:31So let's go through the footage and make sure we don't see the edge, and now I
07:35have to move this around. That looks pretty good.
07:38So now if I play it back, we see the gap a little bit there, right there on this frame.
07:43So I have to move the entire nested comp, move it to the left, and we'll try it
07:47again, so there we go.
07:48So now we have stabilized play, and aside from the heavy motion blur on the first two
07:52or so frames, you cannot tell the camera's ever moving.
07:55It's just a great way to take footage you might not otherwise be able to use
07:59apply the track over stabilization and stabilize it.
Collapse this transcript
Tracking rectangular elements with the Perspective corner pin option
00:00We're ready to move on to Project 4.
00:02In Project 4 we're going to apply motion tracking in a different form.
00:06It's going to be Corner Pin tracking.
00:08Corner Pin Motion tracking is great whenever you have to track a rectangular or a square feature.
00:13For example, you might track the corners of a billboard or a poster or a window or
00:18a screen, anything that's rectangular.
00:20After you track, you can then apply new artwork or new footage to that rectangular area.
00:25In fact, in Project 4 we're going to replace the screen of a futuristic PDA
00:29device, so let's get started.
00:31Let me go to File > Import > File and pull in that original footage, features an actress.
00:35This is called shot4 in the Footage folder, so I'll bring that in
00:40as an image sequence.
00:41I am going to pull that down into the timeline and create a new composition.
00:44Let's play it back and see what it looks like.
00:47So you see this features a PDA, has a screen, that screen is blank.
00:51We're going to put in new artwork in there, in fact, we have an animation that
00:55was pre-done we will put in this area.
00:57So we are going to Corner Pin track this green rectangle, let's get started.
01:00So you start the same way, you pick the layer and go to Animation > Track Motion.
01:04Now tracker opens up in Transform mode, once again, so you can switch that.
01:09Now there are two types of corner pin, there is Parallel corner pin and Perspective corner pin.
01:13We actually want Perspective corner pin because that give us the ability to
01:17move all four track points that we will have. And in fact, once I choose that
01:21there are the four track points, if I zoom in, you see 1, 2, 3, and 4, and
01:27these are all attached by strings, but you can move anyone of them separate from the others.
01:31So the idea is to place this at the corners. So I'm going to go to frame 10, it's a
01:36good starting place, not much motion blur, and place these track points.
01:39So you want the corner at the very edge of the corner where the green meets the blue.
01:46So now that these are positioned, we can try to analyze.
01:48So I'm going to analyze forward, you can see as it analyzes, it looks like its pretty stable.
01:53Let's try 10 to the start.
01:55Okay, it definitely slips off here. You see the actress lifts up her hand to
02:00raise up the PDA, so there's some amount of motion and blur, and the tracking is
02:05just not able to figure out where are those blurred corners are.
02:08They are almost invisible now because there's so much blur.
02:10We could try to adjust the track points further, change their sizes and reanalyze,
02:15or you can just manually adjust it.
02:17Let's see how many frames are bad in this case, so look pretty good around frame
02:216 or so, so the first 5 frames are starting to slip off.
02:25What I'm going to do is manually adjust this. I'm going to do at on frame 5
02:30first, it's not too bad, so I'm going to zoom in, because what you don't want to
02:34do is accidentally select any of the keyframes on motion paths, so you have to look pretty closely.
02:39So I'm going to fix track point one, two, let's get down to three here, and then four.
02:49I do have to do the other frames. I'm going to skip ahead though, because that
02:53might take a little bit time to move all four of these track points.
02:57So we have now jumped ahead, I have adjusted frames 1 through 5 or so, and now I'm
03:01ready to deal with frame 0. Frame 0 has a biggest slippage, you can see how far off it is.
03:06I'm going to try to adjust the track points for this frame.
03:09Now here I have accidentally grabbed one of the keyframes from the motion path,
03:13you can see it pulls out there is a little square box here.
03:16I want to undo that.
03:17Ctrl+Z, or Command+Z, so if you have a hard time selecting the anchor point
03:21without getting one of the motion path keyframes just zoom in, and then
03:25it's easier to select.
03:26So you fix frame 0, so now 0 to 5 or 6 is correct, so now if I move forward, you
03:32can see that the track points follow that square, the rectangle.
03:35Now we're ready to try to apply this, now the application happens a little
03:39bit differently, I do want to apply it to different layer, but I want to prep
03:43that layer in advance.
03:44So with this project there are some premade animation that features some screen
03:47graphics, let's bring that in.
03:49File > Import > File, it's in the Renders folder, it's called Shot4Screen, bring
03:55that in, we're going to drop that on top of the composite.
03:58Now I do need to prepare it for apply the motion tracking to it.
04:01Now because the corner pin will apply the tracking data based on track point
04:06one to the upper left-hand corner, it's actually a good idea to zero out the
04:11anchor point which is right here and the position of this artwork or whatever
04:16you're going to play the tracking data to, so it sits in the upper left-hand
04:20corner, and just do that. I'm going to expand the transform section of this new
04:24layer and zero out the Anchor Points 0,0, and also the Position. You'll see that it
04:31stuffs it into the upper left-hand corner. This is actually the idea for the corner pin tracking though.
04:36So I can go back to the tracker, make sure I check my edit target, make sure my
04:41screen is selected in terms of this new layer, click OK, and hit Apply.
04:46As soon as I hit Apply it snaps that artwork right to the screen. If you look at
04:52the layer you can also see that it's had a corner pin effect, and that's where
04:56it stores the position of the four corners terms X, Y for upper-left, upper-right, or left or right.
05:02In other words, all four corners of that artwork are pulled down to these positions.
05:06It's also animated the overall position of the entire layer. Let's play it back, so
05:11it's looks pretty good.
05:12There are so some issues with some of the early frames, because of the heavy motion
05:16blur, doesn't quite match exactly. There's also little bit of wiggle in there.
05:19Now we can deal with that, and we'll talk about that a little bit later.
05:23We have the basic tracking down now.
05:25So now we can move on to better integration of that animation with the background.
Collapse this transcript
Adjusting corner pin points and paths
00:00We applied the motion tracking tool with corner pin options to track the screen
00:05onto the PDA in the actress' hand. Let's take a look at our movie so far.
00:09So it's tracking pretty well, but there are definitely areas we can improve to
00:13make the integration better.
00:14If I go to a non-blurred frame, one thing that pops out is the fact that there is
00:18a strange gap at the edge of the screen.
00:21There is a new screen animation on top of the old screen edge, and that edge
00:25kind of shows through and looks a little strange.
00:28What might be nice here is to stretch the screen out a little bit more to cover
00:32up that old screen to get rid of that edge.
00:35So one trick for doing that is to adjust the corner pin properties and move this
00:40set of keyframe as single units.
00:42So let's go down to the layer first, expand the Effects and look at the corner pin animation.
00:47So again, we have the four corners here, upper left, right, lower left, lower
00:52right, here's all of the keyframes.
00:55There are so many keyframes, we don't really want to adjust them here in the
00:59timeline, so another trick is to go into the Graph Editor, where we have more control.
01:03So what we'll do is we'll edit one corner at a time and offset the curve in both
01:07the X and the Y so that the corner on the screen appears in different place.
01:11So, how do you go into the graph editor?
01:13Well, first pick a curve you want to work with or property you want to work with.
01:18For example, maybe we want to start with the lower left corner. I'm going to
01:22click this Include this property and graph button right here, so it turns dark.
01:25Next thing I'll do is go to the big Graph Editor button here, which switches to
01:29the graph editor view, so I'll click that and here's the view.
01:32Now the way it works is the red curve is the X, it's the traditional way that
01:37After Effects colors these, so you have the X value here and the Y value here,
01:42and you have the curve that results from that in the graph editor.
01:46The cover is made up of a bunch of keyframes very close together, and the curve
01:50just threads through those keyframes to show you the result.
01:53Now in terms the way that graph editor works as for its values, the frames run left to right.
01:59The value that's stored by the keyframe, values run from 0 above 100.
02:04So there is particular keyframe, maybe this one right here I just clicked on it,
02:08well, you can figure out the value by reading down to up on the graph, so it has
02:12a value of around 150, 160.
02:15Its frame number is determined by the left or right motion, so this is frame 36.
02:19All right, so what we do with the curves now we have them?
02:21We want to move these curves as single units, so what I can do is drag a marquee
02:26selection box around the curve, so let's start with the Y.
02:29I'm going to click right here in the empty space and form a marquee box,
02:34highlight the entire curve and let go, turns to deep gold yellow, which means it's selected.
02:38I can then move this curve straight up or straight down.
02:42Now I'll change the values of all the keyframes in that direction, so I'm going
02:45to click right here and drag straight down. You can see it goes up in the Y in the viewer.
02:50If it goes opposite direction, it goes down, in this case I want to go down.
02:55Now you have to careful not to go left or right, that'll change what frame
02:59number it's on, that'd be bad, so just be careful. So there I pull that curve down, that's great!
03:04Now I can go and get the X curve, select the entire X curve and then pull that
03:09up or down to make it go further left.
03:10When I say left, I mean left in the viewer, so there it's going further left, to
03:15where that corner is. So it looks pretty good.
03:17Now what we will do is do that for the other three corners.
03:21Now it's going to take a little while, so we're going to skip ahead, and we'll
03:25come back to that completed.
03:26All right, so now we're coming back after I have adjusted all four of the corners
03:30to the corner pin section in the graph editor.
03:32For each of these four, I have gone in and adjusted the X and Y curves.
03:36Now I can see them all at once, but what I do is go through one at a time.
03:41So Upper Left, Upper Right, Lower Left, Lower Right.
03:44Now once these are adjusted, you can see that that all of the edge is now
03:48covered up, that looks a lot better now.
03:50So I can go out of the graph editor and work on the next step.
03:54So let's look on ways to integrating the screen render better, so looks like
03:58it's actually in the live-action footage. First thing we can do is activate motion blur.
04:01This track screen is ruined quite a bit, so motion blur would help us with the
04:05blurriness, especially at the beginning, so when I turn on the motion blur for
04:09the screen layer, now it's in by default, so I can go down to Toggle Switches
04:13and show that again.
04:14So I want to turn on Motion Blur right here for that layer, and also motion blur
04:19for the entire composition. Once we do that and I go to an earlier frame, you can
04:23see there is lot of blur.
04:25In fact, there is so much blur there, it looks like the screen is popping off the top now.
04:29This would be a good place to adjust the corners individually for individual frames.
04:34So as we click the Corner Pin section, you'll see these four circles, you can
04:39move those interactively.
04:40So if I zoom in here, and just click, say this corner up here, I can move it around.
04:46They don't want to do this for all the frames, but for just a few frames it's not that bad.
04:51So I'm going to adjust this so that the blur doesn't quite go that far.
04:55I'll do that for the bottom ones also and go to the next frame.
04:58It's mainly the top that's looking a little strange.
05:00Set the frame 3, it should be pretty good. Let's take a look, okay, not to bad.
05:04So now we have added motion blur to get that very, very blurry beginning and also
05:08adjusted those corners so it looks like the screen fits better at the start.
05:11So what can we do to improve the integration? Let's move to a non-blurred frame.
05:15Well, right now the screen animation is very crisp.
05:19One thing you can do is reduce the opacity on that layer and let some of the
05:23phone show through, let's do that.
05:25I'm going to Transform here on that layer, reduce the Opacity to 80.
05:28When I do that, some of the colors sneaks through and actually that fades out a
05:33bit, I think it make the screen more integrated.
05:35Now if you had a reflection on the original PDA, then that reflection will also
05:39show through, so it's a good trick when you have something that reflective where
05:42you are replacing the screen.
05:44Now I can also add a regular blur to the entire screen just to soften the
05:48letters and little graphics, I think it's a little too sharp now.
05:51So I'll apply Gaussian Blur to the layer, so Effect > Blur & Sharpen > Gaussian
05:55Blur, probably a fairly subtle blur will work.
05:58Let's try it 1, so just a little blur to soften it, I think it looks better.
06:03Now speaking of blur, the edges are very sharp still, in other words, the edge of
06:06the original animation that was stretched to fit the screen is still pretty
06:10sharp, that's why I softened it.
06:13Now since the Alpha is working correctly here, the way I do that is apply a
06:17special blur that just works in the Alpha by itself, and there is something
06:20called Channel Blur for that.
06:22So if I go up to Effect > Blur & Sharpen, I can apply Channel Blur.
06:25Now Channel Blur allows you to blur any channel, including the red, green, or blue.
06:30We just want to blur the Alpha, so I'm going to change that value.
06:34Let's try 3, so just by blurring the Alpha Matte or the Alpha Channel by small
06:38amount and see the edge gets softer, that looks much better.
06:42We have adjusted the Corner Pin Tracking to make the screen fit the edges of the
06:46PDA much better, we also added some additional blurs and manipulated the opacity
06:52to get the animation to feel like it was shot in the same original scene.
Collapse this transcript
Applying corner pin data to multiple layers
00:00We have adjusted the screen animation to better match the footage of the PDA.
00:04Now since we have used motion tracking to move that screen around, we can use
00:09that data and apply it to another layer to make that move in conjunction with the screen.
00:13For example, with this project there is a render of a Wireframe ship, and we
00:17can bring in and make it look like it's a hologram floating above the PDA, so let's do that.
00:23We go to File > Import > File and retrieve the Shot4Ship animation.
00:28Now I want to bring in so it will look a little different.
00:31So far we have used layered PSD files.
00:34However, when I bring this one in, we'll see a new window pop up, and this is the Interpret Footage window.
00:40Now layered PSD converts the Alpha Channel automatically and knows what to do with that.
00:45However, when you bring in some other file format like a Targa or TIFF, it's
00:50going to pop up this window if it senses that there is an Alpha Channel.
00:54And what it's asking is is the Alpha premultiplied or not?
00:57Now when you render something in Maya, it pre-multiplies the Alpha, that means
01:02the values of the Alpha are multiplied by the color channels, and this is just
01:06done for efficiency and for higher-quality edges.
01:09So if you see this window and the render has come out of a program like Maya, go
01:13ahead and pick Premultiplied, that will give you the best result.
01:17So Premultiplied, click OK, here comes the footage.
01:20We'll drop this around top of the composite, that's going to be too short.
01:23I'm going to back my slider up so we can see it.
01:27It's basically this Wireframe ship, and because it's so short, it's only 30
01:30frames, what we need to do is loop it.
01:32And this animation is designed to repeat over and over as it spins around.
01:36So I'm going to go to the footage itself, up here in the Project panel, right
01:40mouse key, and go to the Interpret Footage, and then Main.
01:43This way you can change your frame rate, but also you can make the footage loop.
01:49In fact, there's a loop down here at the very bottom.
01:51So I'm going to loop this three times and then hit Enter to close this window.
01:56So now the bar has stretched out, now the breakout of the bar is still short,
02:00so I need to grab the end of this and click-drag it so it fills the entire duration.
02:05So now it repeats three times and will spin three times on the screen.
02:09So let's move this and scale it so it looks like it might be a hologram, say, on top of this PDA.
02:14I am going to scale it down. I'll go to the Scale, under the Transform, scale it down to 70%.
02:20I'm going to move it, so it looks like it's near just above the PDA right here.
02:25A good place to test is at frame 58, that's where the nose of the ship is pointing straight down.
02:30So I'll move it up some place around this area.
02:33Now it's a little light, we can try to experiment with blending modes to get
02:36this shot better and then apply some effects to it.
02:39I'm going to switch over to the Blending mode menu that's hidden now.
02:43I'll toggle the switches one more time and get to that.
02:45Let's try Screen, that makes it kind of interesting, where it's a little bit
02:51lighter over the background ground, but darker over the screen itself.
02:54The other thing we can do to integrate this is just to activate Motion Blur.
02:58So I'm going to toggle my switches again, activate Motion Blur, now eventually
03:01this is going to move along with the screen, so I need to blur it also.
03:05Now it's not actually moving, what I can do is parent this to the Screen layer
03:11and therefore, I'll inherit the same animation that the screen has, and the
03:15screen got that from the Motion Tracking. So I'm going to switch to Parent menu to Screen.
03:19Now if I play it back, you'll see that it follows the screen the entire time,
03:24even at the beginning when there is a lot of blur.
03:26It's blurred because of the Motion Blur, and because of the way we positioned
03:30the scale that render, it looks like at some place just above the screen, as if it's floating.
03:34Now it's still a little dim, it's hard to see, so what we can do is apply an
03:39effect to make that a little bit glowy and more bright. In fact, there is a Glow effect.
03:43So with that chip layer selected, I'm going to go up to Effect > Stylize > Glow.
03:47And you can see already, it's starting to get brighter and a little bit more glowy-looking.
03:51So you can play around with the threshold and the radius and the intensity.
03:55Threshold determines what pixels get glowed and which ones are ignored.
03:59The radius is the size of the blurry glow, how far it goes away from the original render.
04:04Intensity is just the strength of the glow.
04:06So let's try a threshold of 20, a radius of 45, and an intensity of 2.
04:13So now it's little bit more visible.
04:16Whole we are at it, we can use this glow and apply to the screen itself, and
04:21you can copy effects from one layer to another, so I can highlight this Glow
04:24effect here and do a copy.
04:26I can do Edit > Copy from the menu and then go down to my screen layer,
04:30highlight that so that screen layer is selected, and then Edit > Paste.
04:34That glow is transferred down to the screen. Looks like that gets a bit strong, so I can adjust that.
04:40It's right here in the Effects Control Panel, I can experiment with making it a
04:43little less intense, so there we go.
04:45So we have added our additional ship render, we have scaled and positioned it to
04:51make it look like it might be a hologram, we adjust its blending mode, and
04:55applied a glow to it to make it look like it was glowing along with the screen.
04:59We now have our futuristic PDA.
05:00So we started off with the blank screen, and now we have this cool
05:04animation, let's play it back.
05:05So tracking is great anytime you need to track something on to a rectangular feature like this PDA.
05:10And of course, all the effects can really help integrate that CG render, so it
05:15matches live-action much better.
Collapse this transcript
Conclusion
Next steps
00:00Thanks for joining me on this video series, Maya Rendering for After Effects Composites.
00:05We discussed various ways to get started with visual effects compositing using Maya and After Effects.
00:09Now if you'd like to expand your knowledge and continue to practice this, there
00:13are many great resources on the web.
00:14The first place to stop would be lynda.com. If you search for software, you'll see an
00:19entire section on just After Effects.
00:21It's a great way to expand your knowledge on how to create composites within that program.
00:26You can also search for Maya. There's an entire section on just Maya.
00:30For example, you can expand your knowledge of lighting and rendering just within that program.
00:35Beyond lynda.com, there are other great resources.
00:38For example, there are forums that deal with just visual effects.
00:42Here's one, Visual Effects Talk, vfxtalk.com, it's a great place to post
00:46questions and look for solutions for problems.
00:49There are also forms for just Maya. For example, there's a Maya section of
00:54creativecrash.com, another great place to look for resources.
00:58Beyond that I would like to mention a few books I have written, one of which is on
01:02Compositing, you can find this on the Amazon.
01:04The title is Professional Digital Compositing, this covers After Effects and a lot
01:09of the basics and theory you need to be a good compositor.
01:12So thank you again, and have fun with your visual effects compositing.
Collapse this transcript


Suggested courses to watch next:

V-Ray 2.0 for Maya Essential Training (4h 46m)
Brian Bradley


Maya Essentials 6: Lights and Rendering (1h 52m)
George Maestri


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 104,069 instructional videos.

get started learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 2,025 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.

preview image of new course page

Try our new course pages

Explore our redesigned course pages, and tell us about your experience.

If you want to switch back to the old view, change your site preferences from the my account menu.

Try the new pages No, thanks

site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked