Start learning with our library of video tutorials taught by experts. Get started
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.
There are a couple of techniques you can use to cut down on your render times when working with a scene that requires ray tracing to create reflective and refractive surfaces. So, I would like to show you how to use some of these techniques. In this scene, I have a glass vase on a table, and I am going to do a quick render here so we can see what it looks like. It takes about nine seconds to render on this machine, and it's a fairly complex surface, and it's somewhat refractive. Basically mental ray is spending a fair amount of time calculating these refractions.
If you go into the Render Settings under the Quality tab, you'll find that down here at the bottom of the Raytracing section, there is an Acceleration option. These options are there to make rendering reflections and refractions a bit more efficient. The default method for calculating ray tracing is the BSP2. BSP stands for the Binary Space Partitioning. Simply put, when you are rendering a scene with ray tracing, mental ray will divide the scene up into what are known as voxels, essentially 3D containers, and it will look within each one of these containers to determine how ray tracing should be calculated.
So, you have several methods. BSP2 is the default method, and when you have this selected, you don't actually have any other option. It's just calculated automatically. There are two other methods; there is Regular BSP and Large BSP. Large BSP is good for when you are rendering a very large scene. I am going to switch to the Regular BSP, and I see how these two options here, BSP size and BSP depth, is referring to the size of the voxels, the 3D containers that mental ray uses to divide up the scene.
So, in order to improve my render times without sacrificing quality, I can adjust these settings. In order to be able to better visualize how adjusting these settings affects the way in which mental ray makes its calculations, you can actually turn on the Diagnose BSP setting. So what I am going to do right now is I am going to set this to depth and do another render, and we will see a color coded version of the render that tells us where the largest amount of calculations are being put.
Depth tends to have more of an impact on the render times than size does. So, I am going to set this to depth. So I haven't changed any other settings. This is just going to be a duplicate of the render we did before. The only setting I have changed is I did switch to the Regular BSP. The areas that are orange and red are where mental rays is spending more time calculating, and areas that are blue and green and cooler colors, mental ray is spending less time ray tracing in those sections.
So, now we can see exactly where all the calculations are going into, and as I suspected, they are going into the rendering the vase. So, I will store this image. You know, switching to regular BSP did have an impact on render time already. It took less time to actually make that render. So, what I am going to do is I am going to adjust the Depth setting. If I set this lower, it's going to take longer to render. So, I will set that to 20, store this image, and you can see, with a lower depth, we are getting more red in the scene, and it's taking longer to render.
Now it took actually nine seconds to render that. So, if I raise this up to 50, you can see less time, more green, and blue colors. What's interesting about this is this changes the way that the ray tracing is accelerated, but it will not affect the quality of the image at all, and in fact, I will demonstrate this. I am going to set this down back to 20, and I am going to turn off Diagnose BSP. So, now we are just going to see the image render with our refractions or reflections.
We will actually be able to see the ways when I do a test render. So, wow. That took an entire minute to render, with a BSP set depth size of 20. So that's fairly dramatic. Now, I am going to store this image, and now raise this value up to 50, and do another render.
This time, my render was nine seconds. And if I store this image and compare it, notice that the only thing that changes is the render time: one minute versus nine seconds. The images look exactly identical. So, this is a great way to improve your render times without changing the way the image looks. If you are rendering a scene that has a lot of reflective or transparent materials and a lot of refractions going on, and your render seems to be taking forever, come to the Quality tab, come down to the Acceleration method, and use the Diagnostic tools to see where mental rays is spending the most time and energy in the scene, and then start to adjust your BSP Depth size.
Raise this value and see how much of an impact it makes on your render time, and you can also try adjusting the BSP size, but generally speaking, depth is going to have a more of an impact than size will.
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.