Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The physical light shader is a special mental ray shader you can apply to Maya lights to get more realistic behavior from the lighting in your scene. I'm going to demonstrate how you can use this to create a nice lighting effect for this very simple scene. I'm going to create a point light and use the Move tool to drag it up. And in this scene, I have very simple geometric objects in an enclosed room, and I have a little lamp here. And the lamp is just a very simple stand and a lampShade.
So I'm going to take this pointLight that I've just created, and I'll switch to the top view, so I can easily position it. I'm pressing 4 to switch to Wireframe. And here's my pointLight. I'm going to position it in the center of the light, switch back to the Perspective view and pull it down, so that it's in the center of the shade. I'll press 5 to switch back to Shaded view. I'm going to go to the pointLightShape1 tab and change a few settings. So the first one I want to change is I am going to set this to Linear, so that the light actually falls off, and we don't get like another nuclear blast look in here.
And I'm going to set the Intensity to 4, and then I'm going to down to the Shadows section and turn on Ray Trace Shadows. So now when I render the scene, this is what I get. So you see the light is being cast in the room. We have shadows here on the objects. This yellow quality is actually created by a very simple blend shader that's been applied to the lampshade that has a yellow color in the transparency. And so I'm going to store this image.
And now I'm going to go in the pointLightShape1 tab in the Attribute Editor and scroll down to the mental ray section. And under mental ray, you'll see there is a section here called Custom Shaders. So to apply the physical light shader, I'm just going to click on this checkered tab next to Light Shader. And this opens up the Create Render Node window. And under MentalRay Lights, you can see there are a number of shaders here that you can apply to the lights. I'm going to click on physical_light. When I do this, this opens up the physical_light1 tab that has the attributes for the shader.
These are the default settings. And I'm going to create a quick render using the default settings and see how it's changed the quality of the light. So already, we can see that it's very bright on this wall nearby, but it also falls off as it goes across the room. You can also see that we also have our shader, and you can see the effect of the lampshade. So if I compare this to the other render, this is what I see. This is the Maya version of the light, and this is with the physical light shader. Let me store this image. Minimize this.
And what I like to demonstrate is if I select the pointLight and go up here, and I'm going to set the Intensity to 0, I'll change this to black, and I'll even turn off the Ray Trace Shadows, and if I create another render, you see that nothing has changed. It looks the same. And this is because the physical light shader has essentially taken control of the light. None of these settings are going to have any effect on the light anymore, only the settings in the physical_light1 tab.
So if I want to start to change things like the Intensity of the Color, I'm going to go to the Color section right here. And this controls both the color of the light as well as the Intensity. When I click on the Color swatch here, you can see that I have an Intensity value of 1000 for red, green, and blue. These are the default settings. So I'm going to lower these to dim the light a little bit, but I'm actually going to set these to about 700 for red and green, and to add a little bit of yellow color to the light, I'm going to lower the blue to about 600, and now create a test render.
And we can compare this with the previous one. So you can see I'm starting to lower the intensity of the light. If I increase the Threshold value, so if I set this up, and I'll bring up the Render view again, and save this, and do another test render, what you'll see is that the intensity of the light is the same as the previous render, but you notice that the light here on the opposite side of the room is darker.
And basically we're sort of tightening the area of light around the physical light. I can even see the falloff right here. So I'm going to return the Threshold back to 0 here. And you'll notice that I'm using the Point Light. The physical light shader is taking care of the shadowing for me. So if I would like to create a more realistic effect, maybe some softer shadows on here, one thing I can do is actually switch this from a point light to an area light.
So I'll select this and go back to pointLightShape1 tab. Under Point Light Attributes, I'm going to set the set the type to Area Light. You can see it automatically turns into a square. Now, the physical light shader is still applied to the light itself. If I scroll all the way down here to the Custom Shaders, you can see physical_light1 is still attached, but we have changed this to an area light now. So the next thing I want to do is turn on Use Light Shape and set this to Sphere, so I can get something that resembles maybe a light bulb.
And I'm going to scale this down just a little bit. And I haven't changed anything else. So now when we do a test render, you can see I'm starting to get more of a softer quality to the shadows here. To remove some of the graininess, I can actually change the samples. So I'll change this up to 32 and create another test render.
So I'll store this image. Create another test render. And we can see now we're starting to get a bit nicer quality to the shadows here caused by the lampshade. And just to demonstrate that using this effect you can start to get some very realistic lighting in the scene, I have created a special lampShade shader that I'm going to apply. I am going to open up the Hypershade. The shader here is called lampShade. And I'm going to right-click over this and choose Assign Material To Selection.
I'll close the hypershade and create a test render. And now we're getting something that really starts to look like a very realistic lampshade. At this point, I can tune things like the samples on the shadows to remove some more of that graininess, but we're starting to get something that's close to realistic. So that's the basics of using the physical light shader on a Maya Light. So to use the physical light shader, just remember, select the light that you want to apply the shader to - in this case the areaLight1 - in the areaLightShape1 tab of the light, scroll down to the mental ray section, and towards the bottom, you want to go to the Custom Shaders section.
Click on the little checker box next to Light Shader to open the Create Render Node window. I will just right-click over this and break the connection. Click on here, on this little checker box. It opens the Create Render Node window. Under MentalRay Lights, click on physical_light, and this will open the attributes for the Light Shader. Then you can adjust the color by clicking on the color swatch here to open the color chooser. The default value is 1000.
You can lower this, but generally, the values that you want to use are going to be between 500 to 1000. And then you can adjust things like the Threshold to tighten the area around the light. And remember that the physical light shader is going to override the settings for the light. In other words, it's going to take over for the Color and the Intensity, as well as it will automatically cast Ray Trace Shadows. So turning these on and off in the Attribute Editor will have no effect.
If Use Ray Trace Shadows is off here and you're using the physical light shader, you'll still see shadows cast by the light.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 35354 Viewers
100 Video lessons · 5813 Viewers
94 Video lessons · 24703 Viewers
83 Video lessons · 10355 Viewers
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.
Your file was successfully uploaded.