Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 courses, including more 3D + Animation and personalized recommendations.Start Your Free Trial Now
- View Offline
- 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
Skill Level Intermediate
At this point we have set up five render passes through mental ray's contribution map system for project 1. We have the five passes listed here inside the Render Settings window and those are associated with passContributionMap2. And that contribution map appears in the Render layer Editor under the master layer. We're now ready to try Batch Render. There are a couple of other things we need to check to make sure that the render goes as expected. One is, we want to make sure that we set the project so that renders go where we expect. So File > Set Project, in my case, I want to select the exercise files folder.
And what will happen during the render is the rendered images will be placed in the Images folder underneath this folder. So now I'll click the Set button, and everything I want to check is a Common tab in the Render Settings window to make sure I set all of the common render attributes, including the name. I'm going to call mine Shot1Monocular. Then the Image format. Now what's interesting is, if you set it to PSD Layered, mental ray will take all those render passes and place each one on a separate layer of a Photoshop file.
So you'll have one Photoshop file per frame, in that single file we have all the different render passes arranged as layers. This is really convenient for bringing the render into After Effects. Next I want to check my Frame/Animation extension. In this case, we are going to start by testing a single frame. So this is good, name.ext. Then I want to check my render resolution, and we have been working in HD 1080, so this is good. And it couldn't hurt to double-check also, the Quality tab, to make sure Anti-Aliasing settings are good. Now we set this to 0, 2, earlier on, and that's good because that's high-quality.
So we have our Common tab set, and then we know where we're going to render. So we're good to try Batch Render. I am going to close this window. Go to the Rendering main menu and then go to Render > Batch Render. If you want to see the progress you can open up the Script Editor. There is a button down here at the bottom-right for that. This will show you the progress. It's rendering the single frame now, and that will show you the percentage. Right there it is 100%. So I can get out of Maya now, go to my folder, go into the Images folder where I put the images. The way it works as a layered PSD is you will have each layer rendered separately, and placed in a separate folder, and these folders will be named after the layer, such as matte.
Those are initially Maya IFF files, which is Maya's native image format. Once it finishes all of the layers for that particular frame, it combines all those layers, places them into the layered PSD file, which is right here, then the original IFFs are destroyed. So you have empty folders, like right here. But everything's stuffed within this PSD file. So I can open that. So now we have all the layers in this PSD file, and they appear on a layer Editor at the right here. So I can turn these various layers off and take a look at them one at a time.
Now the first thing you get is a background. The background is a solid color of empty space in Maya, that's given to you for free. You don't actually have to use it, but it's always on the lowest layer. Now in our case next layer is Matte. This is a matte pass white on black. Next one is diffuseMaterialColor, which is the color of the render, but there's no actual shading, or shadows, just the color. The next pass is the shadowRaw pass. This is what you get when you pick Raw Shadow. It's a white shadow against black. Now there's a way to make this work in After Effects, which we'll talk about later.
The next is a reflection component, next is a specular, which specular component without the reflection, and the last one that mental ray gives you is MasterBeauty. This is actually a beauty render, which you would normally get if you did not render passes. It gives you that for free also. You don't have to use it. It's just there for reference. So we have rendered one frame successfully through the Batch Render. Now we can go back to Maya, and I can show you how to batch render the entire sequence, because we do need all of the frames so we can go into After Effects for the entire sequence. So going back to the Render Settings window instead of rendering a single frame I need to switch to name.#.ext.
This is very important in terms of having the files be read in the correct order by After Effects. You always want to use name.#.ext. There are other options down below that, this is the one you want to use. Another important thing is often skipped is the Frame Padding, which is right below that. Frame Padding determines the number of numeric places between the dots. So you can see it up here where it says .1.psd, .10.psd. If Frame Padding is on 1 you don't get any extra numeric places. What we want is to have consistent number of numeric places though, so the After Effects tell them how to read them in the correct order.
You'll get confuse with this numbering system. So what I can do is let's go up to a higher number, for instance 3, and therefore it goes .001 and then .010. So in Frame Padding, the 3 actually works from frame 1 up to 999. So if you set to 3 you're safe there. It's an important step otherwise the files might come in the incorrect order inside After Effects. So once you set the Frame/Animation extension to name.#.ext, set the Frame Padding to non-one number, you are ready to batch render the entire sequence.
What will happen is it'll render the entire range set by the Frame Range section. So in our case, we want to set this to 16, that's a duration of this premade animation. So at this point you are ready to batch render the entire thing. You'll launch it the same way, you'll go to Render > Batch Render, and go to the Script Editor, and it will show you the progress, and when all 60 frames are finished you'll have 60 layered PSDs.