11.07.2015 Views

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

50 2 <strong>Architectural</strong> Material2.6.2.5 Colored GlassFor clear glass the tips in the previous section work. But colored glass is a slightly differentstory.Many shaders set the transparency at the surface of the glass. And indeed this is what happensif one simply sets a refr color to some value, e.g. blue. For glass done with thin walledturned on this works perfectly. But for solid glass objects this is not an accurate representationof reality.Study the following example. It contains two glass blocks of very different size <strong>and</strong> a spherewith a spherical hole inside of it 14 plus a glass horse.With a blue refr color: Glass with color changes at the surfaceThe problems are evident:• The two glass blocks are of completely different thickness, yet they are exactly the samelevel of blue.• The inner sphere is darker than the outer.Why does this happen?Consider a light <strong>ray</strong> that enters a glass object. If the color is “at the surface”, the <strong>ray</strong> will becolored somewhat as it enters the object, retain this color through the object, <strong>and</strong> receive asecond coloration (attenuation) when it exits the object:14 Created by inserting a second sphere with the normals flipped inside the outer sphere. Don’t forget to flipnormals of such surfaces or they will not render correctly!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!