Start learning with our library of video tutorials taught by experts. Get started
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.
When using depth map shadows in rendering with mental ray, you are going to find, fairly quickly, that there is only so far you can get using these controls, in terms of adjusting the quality of the shadow. So, I have the Resolution set to 2048, and I am getting a decent shadow, but I'm not getting a softness. If I want to create a nice, blurry shadow, I am going to start to run into some issues, so this is what I have so far. I am going to store this. Now within the Attribute Editor for the light, you are going to find that there is an additional set of controls that are specific to mental ray.
So these are all the Maya native Depth Map Shadow controls, and they work okay. But you can actually get better results if you scroll down in the Attribute Editor, down to the mental ray section, and this appears below raytrace, so here is mental ray, and I am going to close these and just focus on Shadows. So underneath mental ray we'll find Shadows. There is a setting here called Use mental ray shadow map overrides. When I turn this on, I get to use this specific mental ray controls, which I actually find much easier than working with the Maya controls.
The first thing I have here is a button that says Take Settings from Maya. What this button will do is it'll copy the settings that I have already established up here in the Depth Map Shadow Attributes down to the mental ray-specific controls. So, if I click on this, you'll see Resolution immediately bump up to 2048, and I also get Samples set to 0. If I create a Rendering with Samples set to 0, it's still going to look pretty horrible. So let's pump this up to just 1 and see how that looks.
For the most part, it looks the same, but now I want to start to add some softness to the shadow, and I can do this with the Softness setting. These settings don't need to be very high. If I start with the setting of .01 - and I am going to open up the Render view here, and now I am just going to save a little time by just rendering a region here, and that will make it easy to compare shadows. So, I am just going to click on Render Region here. We can start to see that we are getting some softness in here, but the graininess is back. So how can we fix that graininess? Simply start increasing the samples.
I am actually going to jump all the way up to 64 and see how that looks. We'll store this and render the region again. Now, we are starting to get a nice, soft shadow, and this is the kind of thing that I'm actually looking for in my mental ray depth map shadows. So let's store that. I can increase the Softness just by moving this up just a little bit, and render the region again.
Each time I increase that just by a little bit, it's going to increase the Softness a lot. This actually starts to look pretty good. There is also a setting here that can switch from Regular Shadow Maps to Detail Shadow Maps. Detail shadow maps can help you eliminate some artifacts, especially on very curved surfaces, but they also have another advantage. Let me demonstrate that. I'm switching back to Regular Shadow Map, and I'm going to create a transparent surface.
So, I am just going to create, let's say a nice NURBS sphere, and pull it up here, maybe scale that down, it doesn't need to be quite that large; something like that is fine. I am going to apply a Blinn shader to it, and I'm going to make that somewhat transparent, with maybe like a reddish transparent color, bring this color down, and zoom in.
Select this spotLight and open the Attribute Editor again. So, if I create a render right now with this NURBS sphere in here, using depth map shadows, it should look pretty good, but the problem is that the shadow of the sphere itself is not going to be transparent like you would expect in the real world. So we can see we have a transparent sphere, but the shadow itself is opaque. So this is an advantage of using Detail Shadow Maps. If I switch this to Detail Shadow Maps and I am going to just render a region here, you'll see now I should get a nice, transparent shadow.
This is basically what I'm looking for: a nice, red, transparent shadow. There are additional settings down here: Samples and Accuracy for Detail Shadow Maps. You can increase these very, very small amounts if you're finding artifacts within your shadow. But don't go too crazy pumping this up too much because it's going to add a lot to your render time. The other thing I can do, of course, is now that I have a blurry shadow, I can start to decrease this value because I'm adding resolution where I don't need it.
Now that the shadow is blurry, I can reduce that, and that will save a little bit of render time. I've decreased the resolution of the shadow map without losing too much in quality because the shadow itself is going to be fairly blurry. In fact, if I compare the two renders I see almost no difference at all.
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.