9
Arch & Design Mater ial (mental ray) – Tips & Tricks 1571
outer sphere. Don’t forget to flip the normals of
such surfaces or they will not render correctly.
With a blue refraction color: Glass with color changes at the
surface
The problems are evident:
• The two glass blocks are of different thicknesses,
yettheyareexactlythesamelevelofblue.
• The inner sphere is darker t han the outer one.
Whydoesthishappen?
Consider a light ray t hat enters a glass object. If the
color is located at the surface, the ra y is colored
somewhat as it enters the object, retains this
color through the object, and receives a second
coloration (attenuation) when it exits the o bject:
Diagram for glass with color changes at the surface
Intheaboveillustrationtherayentersfromthe
left,andattheentrysurfaceitdropsinleveland
gets slightly darker (the graph illustrates the level
schemat ically). It retains this color throughout its
travel through the medium and then drops in level
again at the exit surface.
For simple g lass objects this is quite sufficient. For
any glass using Thin-walled it is by definition the
correct thing to do, but for any complex solid it
is not. It is especially wrong for negative spaces
inside the g lass (like the sphere in our example)
becausethelightrayshavetotravelthroughfour
surfaces instead of two, getting two extra steps of
attenuation at the surface.
In real colored glass, light travels through the
medium and is attenuated as it goes. In the Arch
& D esign material this is accomplished by turning
on Advanced Rendering Options > Refraction >
Max Distance, setting the Color At Max Distance,
and setting the Refraction Color to white. This is
the result:
Glass with color changes w ithin the medium
The result is clearly much more satisfactory: The
thickglassblockisadeeperbluethanthethin
one, and the hollow sphere now looks correct. In
diagram form it looks as follows: