Start learning with our library of video tutorials taught by experts. Get started

Lighting and Rendering with mental ray in Maya
Illustration by John Hersey

Using the shadow map camera


From:

Lighting and Rendering with mental ray in Maya

with Eric Keller

Video: Using the shadow map camera

When rendering depth map shadows on directional lights you are going to find a few issues with the quality of the shadow map created by the light. I want to demonstrate that in this movie and also show you a new feature in Maya 2011 that can help you easily solve this problem. So, in this scene I have my tree and my ground plane, and I have a directional light. So, I am going to zoom in here so that we can see what the shadow looks like. I have the light selected and in the Attribute Editor, I have the LightShape tab.
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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Lighting and Rendering with mental ray in Maya
4h 56m Intermediate Jul 22, 2010

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.

Topics include:
  • Understanding computer-generated lighting
  • Creating depth map and ray traced shadows
  • Softening and shaping shadows
  • Working with global illumination
  • Lighting with the caustic settings
  • Applying physical and portal shaders
  • Adding depth of field with the Bokeh shader
  • Splitting a scene into render layers
  • Comparing render passes and render layers
Subjects:
3D + Animation Rendering Photography Lighting
Software:
Maya
Author:
Eric Keller

Using the shadow map camera

When rendering depth map shadows on directional lights you are going to find a few issues with the quality of the shadow map created by the light. I want to demonstrate that in this movie and also show you a new feature in Maya 2011 that can help you easily solve this problem. So, in this scene I have my tree and my ground plane, and I have a directional light. So, I am going to zoom in here so that we can see what the shadow looks like. I have the light selected and in the Attribute Editor, I have the LightShape tab.

I am going to activate Depth Map Shadows and scroll down to the mental ray section and Use mental ray shadow map overrides. So, in the Overrides, my Resolution is set to 2048 and my Sample is set to 64. So, when I do a render I should get a fairly decent-looking shadow, and this is where I get on the ground plane. So I am going to store that image, and now what I am going to do is there's a polygon plane here in the scene, and I am going to unhide it by only Shift+H, and we can see that the plane stretches off from the distance.

Now I am not going to make any other changes to the scene; all I did was make this plane visible. But I am going to create another render, and you'll immediately see what the issue is. Our shadow looks significantly worse. There is before the ground plane was visible - after the ground plane was visible. The reason that it looks so terrible is that a directional light is trying to create the shadow map based on all the geometry visible in the scene. In other words, before I made this plane visible, the shadow pap was just being created for the tree in this little hilly area right here, so a resolution of 2048 was sufficient for that.

But once I un-hid the plane, now the light is essentially trying to create the same resolution shadow, 2048 shadow, but cast it for all of the geometry in the scene, even though there is nothing casting shadows here in the background. So, in previous versions of Maya, there were a number of workarounds that you had to go through in order to improve the quality of the shadow in scenes where there is a large amount of geometry. In Maya 2011, there is a new attribute that allows you to easily solve this problem, and this is the Shadow Map Camera.

This feature only needs to be used with directional lights that are casting depth map shadows. That's the only time you need to turn this on. I am going to turn this on now, and basically what this does is it creates a camera from the point of view of the light and allows us to control how much of the scene is actually going to be seen by the light when it's casting the shadow. So if I just turn this on and create a render, we are going to see not much, actually. It'll look like our shadow, for the most part, disappeared. The reason is because the Aperture is set to 0.

So I am going to increase the Aperture. I am going to start with the setting of 4 and see what that gets us. So, now you can see part of the shadow is visible. So, if I look from the point of view of the light, this is how the light is viewing the scene. You can see the top of the tree here and the ground plane underneath. By increasing the Aperture, if you can imagine sort of a virtual circle right here, we are widening that circle by increasing this Aperture value, but just enough so we can get just the shadow that we need and nothing more.

So I am going to switch back to the Perspective view here, and I am going to set this up to 10 and create another render. Now, we can see most of the shadow. Just a little bit is being clipped off right here. So, I can just set this up to about 12 and do one more render, and I think we should be exactly what we need to be. When you're working with the Shadow Map Camera a good way to approach it is just basically increase the Aperture, do test renders until you get essentially the amount of shadow that you need and nothing more.

So, that works pretty well. Notice that the quality of the shadow is not that much worse than before we made the ground plane visible, but the Resolution is actually set to 512. So, this is being a bit more efficient than when the Resolution was set to 2048. Now the Camera Aspect determines the aspect ratio of the Shadow Map. For Maya, you shouldn't need to adjust this because Maya depth map shadows are square. So, an aspect ratio of 1 means 1-to -1, so it basically means a square- shaped depth map shadow.

So, you really shouldn't have to fool with the setting too much. The only two that you need to play with are the Camera Aperture and the Resolution. So, the main thing to remember is if you're going to use a directional light as a shadow-casting light in a scene, and if those shadows are going to be depth map shadows, and if the geometry in the scene is fairly large, you want to remember to turn on Use Shadow Map Camera, and then adjust the Resolution for the resolution of the shadow - it shouldn't have to be too high - and then use the Camera Aperture to determine exactly how much light you need to cast that shadow. So you can set this at a low setting, something like 4 or 5, and then just do test renders and slowly add to the Camera Aperture value until you have just enough to cast the shadow properly.

There are currently no FAQs about Lighting and Rendering with mental ray in Maya.

 
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.
Upgrade now


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 Upgrade now

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 preferencesfrom 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.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

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.