8
Getting Good Results with mental ray Rendering 81
Renderer panel >
Rendering Algorithms rollout
(page 3–113)
.
Tip: While the mental ray renderer ignores the
global inclusion or exclusion settings for the ray
tracer, you
can
enable or disable ray-tracing at the
local level of a Raytrace material or map.
Ray Tracing Rules of Thumb
Let’s say you’re rendering a (lathed) wineglass,
withaninnerandoutersurfaceandapiece
of geometry representing the wine. The wine
geometry is just slightly smaller than the inner
surfaces of the wineglass, and capped with a
flattop. Now,yougotorendertheglass. After
rendering the scene, however, there’s something
w rong: the inner surfaces of the glass don’t seem
reflective enough, and the wine isn’t refracting
properly. What’s wrong?
What’swrongisthatyouprobablyhavethe
number of reflections and refractions set too low
for the number of surfaces you have. To check this,
go to the Renderer panel >
Rendering Algorithms
rollout (page 3–113)
and look at the Maximum
Trace Depth s pinners. If you haven’t changed the
parameters, then y ou should see Reflection and
Refractions set to the default of 6, and Sum set to 6.
There’s the problem: you actually have six surfaces
that need to be traced by the light rays for
both
reflections and refractions. The way to always
calculate the number of rays needed for a scene is
to take the ray-traced objects in your scene a nd
draw an imaginary line through them, originating
at the point of view. Then, count the number of
surfaces the line intersects.
For the wineglass and wine, you need at least six
reflections and refractions that correspond to the
following surfaces:
• Near outer glass surface (“near” relative to your
Camera viewpoint)
• Near inner glass surface
•Nearwinesurface
• Far wine surface
• Far inner glass surface
•Farouterglasssurface
Therefore, increase the value of Sum to 12.
Ca ustics and Global Illumination
Before rendering with caustics, there are several
things you need to set up in your scene:
• For caustics to work properly, the generating
object must use a material that contains some
degree of shininess, reflectivity, or refract ion.
AssignaRaytraceorothermapaseithera
Reflection map or Refraction map before you
render caustics.
• Most often, you’ll be using very shiny, highly
reflective materials (such as chrome and other
metals), or transparent or translucent materials
(such as glass goblets or water), to generate
caustics in your scene. If you’re using a glassy
material,makesureit’sdouble-sidedtocreate
the proper results.
• Makesureyouhave
object properties (page
1–121)
set to Receive Caustics or Generate
Caustics (or both). To set up these properties,
right-click an object and choose Properties.
For example, if you’re rendering a wineglass on
a tabletop, you probably want the wineglass
both to generate and receive caustics (so that
caustics are scattered within the glass itself),
and the tabletop only to receive caustics (unless
it’schrome,say,insteadofwood).
• Iftherenderingofyoursceneiswashedout
by light, double-check the Energy setting in
the Light Proper ties group of the Indirect
Illumination panel >
Caustics And Global
Illuminat ion rollout (page 3–104)
.This
globally sets the energy level of all lig hts in the
scene. Reducing the Energy value can eliminate
washout.