Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the more appealing aspects of using depth map shadows, as opposed to raytrace shadows, is that you can actually save and reuse depth map shadows, and this can help you cut down on rendering time, especially if you're working in a complex scene that has a number of shadow-casting lights. For this example, I'm going to stick to something fairly simple: just three trees and a hill and a single spotlight. So there's my spotlight. I'm going to zoom in here. And in the Attribute Editor for the light, I have Use Depth Map Shadows is turned on, and in the mental ray section, I have Use mental ray shadow map overrides turned on.
My Resolution is set to 1024, and my Samples are set to 64, and I have a little bit of Softness on there. So, the first thing that I want to do is I want to create a name for my shadow map. Generally the process is to create a name for the shadow map, do a test render, and that will save the shadow map to the disk, and then we can turn on Reuse Shadow Maps, so that it will use the same map the next time we render. So, I'm going to call this treeShadows, and I'm going to create just a test render from the Perspective view.
Okay, so here's our render, and we can see the shadow map cast on the surface of the ground. And at this point, we can actually verify that a shadow map has been saved to disk. So I'm going to open up the project, and in the renderData folder, under mentalray, I find shadowMap and here is our treeShadows file. You can see the size of the file and when it's been created.
So, now that I know that that's been saved to disk, I can reopen Maya, and I'm going to go to the Render Settings. In the Render Settings, under the Quality tab, I can scroll down here, and under Shadow Maps, I can turn on Reuse Existing Maps. So this is automatically going to reuse the shadow map that I saved to disk the next time I render. Now, if I open up the Render view, I'm going to save this image and notice that the original render took about 49 seconds and so if I render again, it should take less time.
So the rendering looks identical, but this time it only took 14 seconds. If I scroll between these two images, you can't see any difference whatsoever. So that's the real advantage, especially when you have a very complex scene that uses a lot of shadow-casting lights. So this is one reason why you might choose to use depth map shadows over another method, such as raytracing.
Get unlimited access to all courses for just $25/month.Become a member
100 Video lessons · 8540 Viewers
107 Video lessons · 37410 Viewers
94 Video lessons · 26732 Viewers
147 Video lessons · 6175 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.