Join Lee Lanier for an in-depth discussion in this video Creating layers for the sun, stars, and planet, part of VFX Techniques: Space Scene 01: Maya Animation and Dynamic Simulation.
We have a lit scene and an animated scene. We're now ready to render. Now we're not going to render all of this as a single image sequence or a single movie. What we're going to is we're going to set up render layers and render passes to give us more control. And the idea of this project is we're going to take the renders into a compositing program, After Effects. And do all the fine tuning there. If you split the scene into multiple layers and multiple passes, it gives you much more control in the compositing phase. So in order to do that we're going to use the render layer editor.
Now if you haven't used this before this is over at the bottom of the channel box in the center. There's a render tab, right beside display. If you don't see it, you can always move this line up or down, the center line. And again this is at the bottom of the channel box so if you have something selected, you can see the channels up here. By default you get a single and master layer, this has all the objects and by default it renders. You can create new layers at anytime. Let's start with some very simple layers. We're going to split the sun out so it's on its own render layer and we can render that by itself.
We're going to select the sun, which is just a sphere. And then go to the shortcut button right here, which will make a new layer based on what we have selected. Click that and there's a new layer. If I click on that layer, you can see the contents. In this case it just has a sun, and nothing else. The master layer is still there, but you can switch back and forth. Let's rename this new layer. I'll double-click the layer name and then backspace and we're going to call this Sun and just to prevent any kind of name conflict, I'll use the underscore. That's just optional, but I like to do that.
And there we go. Let's do a test render. Now, in terms of what renders, there's a renderable button beside each layer. If it is has green check mark, like right here, it's going to render in the render view and also the batch render. If it has a red X like the master layer, it does not render. So, let's take a look at Sun and see what it looks like. Render view, and there it is. Now a sun works by itself because it has the material that makes it look self illuminated. If you had another object that required light you'd have to add the light, so this is okay by itself.
If I go take a look at the material. Hypershade. And here's the sun material. Has a lot of incandescence and that's why we see it. Another object that's similar to that is the star field. It's called star shader. This also has a, surface shader material which is not effected by light. So, it does not need lights either. Now, these other materials, like the ship material and so on, have to have lights on their layer. So, sun does not need any lights assigned to that layer. It's ready to go. Let's go back to the master layer and make room for the stars.
I can suck this giant star field plane. And then create a new layer. And I can use this shortcut button right here. There's also a menu for that. Layers, create layer from selected. This will be one or more objects and I'll make a new layer. And there we go. If we go to that layer, we just see a starfield. Now again, this layer will work because the starfield has a service shader and you'll be able to see it. So if I render that, you'll see the stars. Now I'm going to turn off the renderable button for sun. We'll talk about how I deal with multiple layers now that we're rendering simultaneously later on.
For now I'm just going to test one layer at a time. So render view. The rendering quality is still very low right now but we'll improve that later on. So stars work by themselves. I'll go ahead and rename that layer while I'm at it. Stars and there we go. Now let's move on to something a little more complex. I'm going to go back to the master layer. Let's say I want to put the planet on the layer by itself. Well, the planet is assigned to the blend material, which means it needs lights.
If I assign it to a layer by itself, it's just going to be pitch black. What I need to do here, is select a planet, and then shift select at least one light. In fact I'm going to shift select two lights here, the key light and the fill light, and put all three of these objects on a new layer. I'll use the button, there's a new layer take a look at it. And there's the lights and the planet I'm going to test render it by itself, so I'll turn off renderable for stars. I'll rename this new layer, planet. Try it again, planet. There we go.
And then we'll do a test render. So it'll take a tiny bit longer, but there's a planet. Ready to go by itself. Now, if there's no object, for instance, if there's empty space, that'll just render as transparent alpha. So it'll be perfectly fine to fit all these back together when it comes time to composite. So there are our first three render layers. Plus the master layer. We're now ready to do some more complex layers with the ship and the asteroid.
- Animating the spaceship and asteroid
- Animating cameras to follow the action
- Setting key and fill lights
- Creating layers for the sun, stars, and planet
- Setting up shadow and lighting layers
- Creating mental ray render passes
- Exploding geometry in a dynamic simulation
- Attaching nParticle emitter to bodies
- Batch rendering render layers