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.

114 5 General Utility <strong>Shader</strong>sThere is a light hidden behind each of the patches in the image above. The leftmost isemitting both specular- <strong>and</strong> diffuse light. The middle one is only emitting specular light,<strong>and</strong> the rightmost is only emitting diffuse light. Furthermore, the rightmost patch has it’sfg contrib set to zero.As we can see, the leftmost patch creates too much illumination, since we get illuminationboth from the light <strong>and</strong> from the patch. The center patch generates the strange effect of asmall “highlight” (our light source is just a point light) inside the reflection of what we aretrying to sell as “the visible light”.In this case this effect is distracting, so we want it disabled - like we have done on the lighton the right. That is the way to go; let the surface h<strong>and</strong>le the reflection, not the illumination,<strong>and</strong> let the light h<strong>and</strong>le the illumination, not the reflection (i.e. no traditional “specularhighlight”).An alternative, when using area lights, is to allow the area light to create the specularhighlights:Area light specular highlights can also “work”This illustrates the alternative. The leftmost patch again uses a point light with specular on.This is what we do not want, since it looks strange. The other two patches use an area light.The middle patch has the area lights specularity turned off <strong>and</strong> the patch has refl contribset to 1.0, the right has the lights specular enabled, <strong>and</strong> a refl contrib of zero.As we can see, both variants on the right side “work”, so it is a matter of choice which methodis used for area lights.However, the middle method tends to be preferred, because often one is using a geometricallysimple area light (sphere, rectangle, etc.) in place of an object that is actually geometricallycomplex (a neon sign, for example). In those cases one definitely want to use the method inwhich the object is reflected, <strong>and</strong> the light does not emit specular light:

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

Saved successfully!

Ooh no, something went wrong!