Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
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.
Once you've added the Physical Sun and Sky network to a scene, there's a few settings you can use to change the way that the lighting looks. To change the time of day, all you need to do is rotate the light. So if it's pointing straight down, it's going to look like noon. If it's pointing more parallel to the horizon in your scene, it's going to look closer to early morning or late evening. If I want to change some of the other aspects of the lighting, what I can do is I can select the sunDirection node here in the outliner.
If I open up the tab in the Attribute Editor, for the actual sunShape and start to adjust these settings, such as the Color and the Intensity and even the Shadows, you won't notice any change in the render whatsoever. These settings are actually not controlling the light. The only thing that controls the light is the rotation controls the time of day. If I want to change the color of the light or the intensity or the way that the sun looks like when it's rendered in the background, I need to go to the mia_physical1 tab, and this should be in the Attribute Editor, connected when you select the sunDirection node.
So I'll switch over here, and I'm going to find a number of settings that I can use to control the way the render looks. I like to create a quick test render using the default settings, and I've just rotated this, so that we can see it in the scene, and I'll do a test render, and we can see the sun is very bright light right here. So I'm going to store this image and minimize this, and the first thing I'll do is if I change the Multiplier, it's going to change the overall brightness of the effect.
So if I put this to 0.5, it will cut it in half. So if I compare this, you can see how bright this is, and now this has been cut down in half. Now I can see the sun a little bit easier. So I'll store that. If I change the Haze, I can add some haze to the horizon back there. I'm going to set this to 0.5 and do a quick test render, and compare this with the previous one.
I can see I'm gradually adding. This is the original, with the default settings. That's with the Multiplier set to 0.5, and now I've added some haze there, and it's looking a little bit more like Los Angeles in the background there. I'll minimize that. The Red/Blue Shift will change the lighting either to warmer or cooler colors. Positive values make a warmer look. So if I set this to 0.5, it will start to look like warmer colors overall. Then we get sort of a desert kind of look to that.
And if I set this to a negative number, -0.5, we'll see cooler colors. So I'm going to open up my Render view, make sure I've stored this, and do another render. You can see that now it's definitely shifting over to blue, which is great for alien environments and that kind of thing. I'm going to set that back to 0. Take a look at that Horizon Height. That is the height of this line in the background. If I want to get rid of this, so that I just see the sky, and I don't see the horizon, I can just set this to a negative value.
So I'll put this down to -5. So now we don't see the horizon in the background at all; we just see the sky. Couple of other settings that I would like to point out are the Sun Disk Intensity, Sun Disk Scale, and Glow Intensity all control the way the sun looks in the render. If I want to make it smaller, I could put this down to 1. Maybe change the Intensity, so it's not quite so bright, to 0.5, and I'll lower the Glow Intensity.
We should see a more well-defined-looking sun. And so we can see it's a much smaller area here in the background. The other thing I would like to point out is the background sky that you're seeing here in the render is not included in the alpha channel. So in the Render view window, I'm going to click on this icon right here which displays the alpha, and we're just going to see the alpha for the toy and the ground, the polygon plane that I've added, but we don't see any of that color in the background.
So if you save this image to disk and you bring it into a compositing program, such as Photoshop or Adobe After Effects, you should be aware that what you're seeing in the background won't show up as long as you have alpha activated for the image. If you bring this into After Effects, turn the alpha off in After Effects, and you'll see the background. So when you're using the Physical Sky network, you can restrict all the changes that you're making to the look of the sun and the background to the settings here in this tab, the mia_physicalsky1 tab. These are the only settings that you should really need to play with.
You may encounter problem when you add a camera to the scene. So I'm going to add a new camera, and look through the camera. So I'll just do Perspective, camera1, and position it here, so I have a new camera in the scene. And now I'll create a render. So I'll store this one, and I'll render using camera1. And you're going to notice that things look very different. I don't have my background. Just nothing looks right.
The colors are off. The reason for this is that when you create the Physical Sun and Sky network - I'm going to select the Perspective camera, so I'm going to open up its Attribute Editor, so we have perspectiveShape here - you'll notice that one of the things that mental ray has done is it has automatically added two lens shaders to all the cameras that currently exist in the scene - so the perspective and the other cameras, and these are the mia_physicalsky1 Lens Environment Shader and the mia_exposure_simple1 Shader. So these have been added automatically, and these help to correct for problems that can be encountered when simulating the physical properties of light in a Maya render.
You'll notice when I select camera1 and go to the cameraShape1 tab, I don't have these shaders here. They haven't been applied. And this is because I added camera1 after creating the network. Fixing this is very simple. All I need to do is I'll select my sunDirection node again and switch back to mia_physicalsky1, and scroll to the very bottom, and I can just say Update Camera Connections. If I click in this button and then select camera1 again, you'll see that now these have been connected.
So if I go back into the Render view, I'll store the image and render again from camera1, you'll see that everything has been fixed automatically. So that's a very easy problem to fix, but it's something that can throw you off when you're adding cameras to a scene and rendering.
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.