Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Applying physical light shaders

From: Lighting and Rendering with mental ray in Maya

Video: Applying physical light shaders

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.

Applying physical light shaders

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.

Show transcript

This video is part of

Image for Lighting and Rendering with mental ray in Maya
Lighting and Rendering with mental ray in Maya

59 video lessons · 8239 viewers

Eric Keller
Author

 
Expand all | Collapse all
  1. 3m 46s
    1. Welcome
      1m 32s
    2. Using the exercise files
      2m 14s
  2. 19m 8s
    1. What is a CG light?
      1m 22s
    2. Types of CG lights
      10m 55s
    3. Direct lighting
      4m 48s
    4. Indirect lighting
      2m 3s
  3. 53m 20s
    1. Decay rate
      6m 30s
    2. Previewing lighting and shadows
      2m 37s
    3. Creating depth map shadows
      1m 57s
    4. Troubleshooting depth map shadows
      2m 38s
    5. Shadow map overrides
      5m 30s
    6. Using the shadow map camera
      5m 31s
    7. Saving and reusing shadow maps
      2m 48s
    8. Creating raytraced shadows
      1m 56s
    9. Adding softness to raytraced shadows
      3m 42s
    10. Creating area light shadows
      5m 11s
    11. Sample: mental ray area light
      4m 23s
    12. Setting area light visibility
      8m 7s
    13. Creating soft shadows with spot lights
      2m 30s
  4. 43m 35s
    1. Setting global illumination for interiors
      2m 33s
    2. Tuning global illumination
      5m 56s
    3. Global illumination photons
      1m 12s
    4. Activating caustic light effects
      3m 28s
    5. Tuning caustic settings
      3m 35s
    6. Setting caustic light effects on metal
      2m 35s
    7. Using final gathering for indirect lighting
      2m 9s
    8. Tuning final gathering
      4m 2s
    9. Reusing final gathering maps
      3m 21s
    10. Adding light with shaders
      5m 27s
    11. Creating final gathering maps for animation
      4m 26s
    12. Combining final gathering with global illumination
      4m 51s
  5. 1h 2m
    1. Activating the Physical Sun and Sky network
      2m 33s
    2. Tuning the Physical Sun and Sky settings
      7m 18s
    3. Applying physical light shaders
      8m 54s
    4. Applying image-based lighting
      8m 57s
    5. Tone mapping
      6m 23s
    6. Applying portal light shaders
      7m 45s
    7. Creating light beams with participating media
      10m 9s
    8. Adding depth of field with the Bokeh lens shader
      10m 39s
  6. 48m 21s
    1. Introducing render layers
      6m 13s
    2. Creating render layers
      4m 28s
    3. Splitting a scene into render layers
      15m 36s
    4. Applying render layer presets
      7m 47s
    5. Setting render layer overrides
      7m 7s
    6. Creating render layer composites
      3m 52s
    7. Organizing renders with tokens
      3m 18s
  7. 42m 24s
    1. Introducing render passes
      2m 56s
    2. Comparing render passes and render layers
      6m 44s
    3. Editing render passes
      10m 41s
    4. Using appropriate materials
      5m 51s
    5. Batch-rendering passes
      5m 56s
    6. Compositing in After Effects
      6m 41s
    7. Rendering the EXR image format
      3m 35s
  8. 23m 3s
    1. Anti-Aliasing Quality
      6m 44s
    2. Setting color profiles
      2m 53s
    3. Diagnosing raytracing
      5m 7s
    4. Adjusting motion blur
      6m 57s
    5. Finding mental ray help
      1m 22s
  9. 21s
    1. Goodbye
      21s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Lighting and Rendering with mental ray in Maya.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.