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.

54 2 <strong>Architectural</strong> MaterialFor lemonade in a glass, imagine a <strong>ray</strong> of light travelling through the air (IOR = 1.0) enterthe glass, <strong>and</strong> is refracted by the IOR of the glass (1.5). After travelling through the glass the<strong>ray</strong> leaves the glass <strong>and</strong> enters the liquid, i.e. it passes an interface from one medium of IOR1.5 to another medium of IOR 1.33.One way to model this in computer graphics is to make the glass one separate closed surface,with the normals pointing towards the inside of the glass <strong>and</strong> an IOR of 1.5, <strong>and</strong> a second,closed surface for the beverage, with the normals pointing inwards <strong>and</strong> an IOR of 1.33, <strong>and</strong>leaving a small “air gap” between the container <strong>and</strong> the liquid.While this “works”, there is one problem with this approach: When light goes from a higherIOR to a lower there is a chance of an effect known as “Total Internal Reflection” (TIR). Thisis the effect one sees when diving in a swimming pool <strong>and</strong> looking up - the objects above thesurface can only be seen in a small circle straight above, anything below a certain angle onlyshows a reflection of the pool <strong>and</strong> things below the surface. The larger the difference in theIOR of the two media, the larger is the chance of TIR.So in our example, as the <strong>ray</strong> goes from glass (IOR=1.5) to air, there is a large chance of TIR.But in reality the <strong>ray</strong> would move from a medium of IOR=1.5 to one of IOR=1.33, which isa much smaller step with a much smaller chance of TIR. This will look different:Correct refraction (left) vs. the “air gap” method (right)The result on the left is the correct result, but how it is obtained?The solution to the problem is to rethink the modeling, <strong>and</strong> not think in terms of media,but in terms of interfaces. In our example, we have three different interfaces, where we canconsider the IOR as the ratio between the IOR’s of the outside <strong>and</strong> inside media:• Air-Glass interface (IOR = 1.5/1.0 = 1.5)• Air-Liquid interface (IOR = 1.33/1.0 = 1.33)

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

Saved successfully!

Ooh no, something went wrong!