Now that you understand how ray tracing works, we can take a look at optimizingthe ray trace engine, so that we will not get excessive render times, becauseyou will find if you have a lot objects that reflect or refract bending light,this is going to cause your render times to be very, very long.So you want to have control over this.You don't want it to be in control.You want to take the reins here.So we want to prevent unnecessary calculations from being performed.So in the case of reflective objects, you will see here we've got reflectiveobjects appearing in the reflections of other objects and that's fine and that'swhat we want here, because that's realistic.

But we don't want that to go on forever; in other words we do want to have ahall of mirrors effect where a ray is bouncing back and forth here infinitenumber of times or even tens of times, even that is just going to be excessiveand we won't be able to see it on the screen anyway.So that's when limiting the Trace Depth comes into play.You will see at the bottom of the rendered frame window a section here thatsays Trace/Bounces Limits and this is where you can set limits on the number oftimes a ray can bounce.You will see the default for Reflections is 4, and that's actually probably morethan we need in most cases.

I am going to see what happens if I bring this down to 2 and I am also goingto just clone this rendered frame window, so we will have something to compare it to.This is Max Reflection set to 4, which is the default, and now I am going torender it with Max Reflection set to 2.And you will see it looks very, very similar.There is one little black spot here, one little fly in the ointment.But you know what? Our viewers might not even notice that.

So it might be okay, we might be able to get away with this.So a ray strikes a surface, bounces once, bounces twice, the end and that'sgoing to be much faster rendered than 4 reflections over here.So a value of 2 might be good enough.Now if I bring this down even further, let's say I bring it down to 1 and renderagain, we are going to see a very obvious change here, big black spots.So that's a symptom of the Trace Depth being set too low or the number of MaxReflections being set too low in this case.

So I recommend that the Max Reflections should be set to 2 or the default is 4.We also have here Refractions that has to do with transparent objects and lightbending through surfaces.Usually, you can set this a little bit lower too.I often set it to 4 and that's usually good enough.Now there is one other thing I want to show you which is in the Render Setup window.I can access that Render Setup window just by clicking on this shortcutbutton here and in the Renderer tab if I scroll down, you will see the same values here.

Max Reflections and MaxRefractions, but you will also see Max Trace Depth.That's a limit on the total number of rays for both Reflections and Refractions.So your rule of thumb here is that the Max Trace Depth should be equal to the number of Max Reflections plus the number ofMax Refractions and what we have here is just about optimized for theparticular scene that we have.So now that you understand how Trace Depth works and the number of MaxReflections and Refractions work, then you will be able to tune thesesettings to get faster render times and not have to wait as long and get good results.

Resume Transcript Auto-Scroll

Author

Released

12/2/2009

3ds Max 2010: Lighting and Rendering with mental ray explores one of the most powerful toolsets for photorealistic 3D image visualization: the mental ray renderer in 3ds Max. Aaron F. Ross shows how to use mental ray's combination of materials, lighting, and rendering to achieve a variety of effects, from glossy surfaces to reflections and transparency. He provides an in-depth review of photometrics and the tools used to adjust lighting in 3ds Max, including brightness, intensity, and color temperature along with a wide variety of lighting scenarios. Aaron also devotes time to getting the most out of mental ray's powerful rendering engine and improving render efficiency. Exercise files are included with this course.

Topics include:

Applying mental ray materials

Setting photometric lighting

Rendering glossy surfaces with raytracing

Using indirect illumination

Simulating exterior and interior lighting scenarios

Selecting appropriate special effects

Skill Level Intermediate

5h 43m

Duration

455,687

Views

Show MoreShow Less

Q: In Chapter 17 on volume lights, my render did not look quite like the author's render. Why?

A: If you are using the 64-bit version of 3ds Max, you may experience issues with volume lights. They only really work properly with the 32-bit version.