Viewers: in countries Watching now:
Lighting and Rendering with mental ray in Maya with Eric Keller shows how to master practical mental ray techniques for rendering models created in Maya. This course walks through the most efficient and innovative mental ray techniques, including direct versus indirect lighting methods, creating different types of shadows, using the new ShadowMap camera, and reusing shadow and final gathering maps. A chapter on optimizing render times and enhancing render quality is also included. Exercise files are included with the course.
This movie reviews the basic different types of decay rate for direct lighting in the Maya scene. Decay rate refers to how fast the intensity of a light decays as it leaves a light source. So in this scene, I have added two point lights to represent candle flames above the candle geometry. I am going to select this light here, and we can see I have positioned it just above this candle here.
Now, if I am going to position these lights and then do a quick render, what we'll see is something sort of similar to a nuclear blast. Certainly, no candle that I can think of creates this much lighting in the scene. So this is a typical problem when you first add a light to a scene, especially noticeable with things like point lights where they shed light in all directions. So what I need to do in order to fix this problem is turn on the Decay Rate for the light.
So I am just going to hide my first candle here, and just look at this light right here. Now that the light is selected, I can open up the Attribute Editor and start adjusting some of its attributes. I am clicking on the candleShape2 tab right here, so I can get to the actual lighting settings. And as you can see that we have the Light Type is set to Point, the Color is White and our Intensity is set to a value of 1. These settings ensure that it actually sheds light in the scene, and it emits both specular and diffuse lighting.
The Decay Rate is set to No Decay, which means that no matter how far the light travels from the light source, it's never going to lose intensity. It's essentially infinitely bright, and that's why when we render with just a single candle flame, we get what looks like a nuclear blast. You can see how it affects the scene. So I am going to store this image, and I am going to turn on the Decay Rate. So we have three basic types: Linear, Quadratic, and Cubic.
Linear Decay Rate essentially means that as light leaves the light source, it goes down in intensity, equal to the distance as it travels from the light source. So it's just got a Linear drop-off and if I render using Linear, I'll lose my nuclear blast, but you will see that this room is much darker now, because by the time the light actually hits this table surface, it's decayed so much that it's not bright anymore. So in order to fix this, all I need to do is increase the Intensity.
And generally speaking, this is something I do when I'm just establishing the basic lighting for the scene. So I am going to pump this us up to 5, do a render, and see how it affects the lighting in the scene. Now, we are getting something closer to candle light. I don't have any shadows turned on for this light; it's just basically what we are seeing is the falloff, the decay of the light as it hits these other surfaces. So I can store that and compare it with my previous render. So this is with an Intensity of 1, and this is an Intensity of 5.
If I set this to Quadratic, Quadratic is actually the most realistic type of decay, and what it means is that the light intensity drops off based on the square of the distance from the light source. This actually represents how light in the real world works. So this is the most realistic type of lighting, but you'll notice if I leave this at an Intensity of 5, and do a Render, we are going to get back to a situation where it's almost completely dark; you can just barely see a little bit of lighting there. So I am going to store this, and now I am going to pump this us up to, let's try 15 and see what happens.
I am trying to get a little bit more lighting, so I am going to go up by 25, and I usually do this in a very experimental way. I'm just trying to see what looks good. Since I am not a physicist or mathematician, I don't actually think of the formula right offhand. I just basically pump up the light until it starts to look good. So I am going to set it this to 50 and do another render, and we should start to see something that looks a little bit more like a candle flame.
I'll compare this to, this is a linear drop-off; this is quadratic. We see a pool of light here that really drops off in more of a softer kind of way, so it leaves the light source. If I set this to Cubic, now the intensity of light drops off based on the cube of the distance from the light source. This means, as you can probably guess, that we really start to have to pump this light Intensity up.
Well, let me do a render with it set to 50, so it matches what I had for Quadratic. And what we are basically going to get is a dark room. The light falls off so quickly that it doesn't even reach the surface before it's at 0. So, I am going to pump this us up to 200. This is an experiment, and we'll see how this looks. A very small pool of light, it is actually lighting the scene. Let me set this up to 500. There we see it's bright here in the candlestick, but even by the time it reaches the surface, it barely reaches the chair. It's very dim.
So if I compare this to Quadratic, and this is Linear. Now, which type of Decay Rate you use depends on the kind of lighting that you are creating, and how realistic you want that light to be. Generally speaking, for most basic lighting, you can get away with using Linear because it's one of the easiest ones to work with, or Quadratic. Very rarely I'll actually use Cubic because Cubic actually the light is falling off even faster than it would in the real world. But every once in a while, when you just can't get the right intensity for your light, you might want to experiment with one of these settings while you are establishing the basic lighting with the scene and see which one works best for you.
I am going to set this back to Linear with an Intensity of 20, and do a quick render and see what we get. A little bit bright, but you get the basic idea.
There are currently no FAQs about Lighting and Rendering with mental ray in Maya.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.