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.

3.8 Sky- <strong>and</strong> Environment Portals 73color from the sky outside the window (i.e. an environment shader, like mia physicalsky orsimilar) <strong>and</strong> how much of that sky that is “seen” 4 .Practically, this makes the portal light behave as a “FG concentrator” so instead of having tosend thous<strong>and</strong>s of FG <strong>ray</strong>s around the scene to “find” the window, the portal light actuallyblocks FG <strong>ray</strong>s, <strong>and</strong> instead converts light from beyond the window to direct light, with highqualityarea shadows with no interpolation related issues possible.FG will now see a well lit room rather than a black room, <strong>and</strong> can be performed at muchlower FG <strong>ray</strong> counts. Furthermore, since the light from the window is now direct, we gain oneextra light bounce “for free”.3.8.2.1 mia portal lightThe mia portal light shader should be applied both as light- <strong>and</strong> photon emitter shader ona rectangular area light. The <strong>mental</strong> <strong>ray</strong> light instance must be set to be visible (this is atechnical requirement for the portal light to be able to “block” final gather <strong>ray</strong>s. If the lightactually is visible or not in the rendering is instead h<strong>and</strong>led by the shader).Furthermore, the <strong>mental</strong> <strong>ray</strong> light instance must be set up such that the rectangular area lightis extended in the X/Y plane of the lights own coordinate space, <strong>and</strong> any transformation ofthe light must be h<strong>and</strong>led with the light instance’s transform 5 .The following parameters exist:declare shader "mia_portal_light" (boolean "on"default on,scalar "multiplier" default 1.0,color "tint_color" default 1 1 1,boolean "reverse"default off,scalar "cutoff_threshold" default 0.005,boolean "shadows"default true,boolean "use_custom_environment" default off,shader "custom_environment",boolean "visible"default off,boolean "lookup_using_fg_<strong>ray</strong>s" default on,scalar "shadow_<strong>ray</strong>_extension" default 0.0,boolean "emit_direct_photons" default off,color "transparency" default 1 1 1)version 9apply light, emitterend declareon enables or disables the light.4 The subtended solid angle of the window as seen from the shading point.5 This is how most OEM application already sets up the <strong>mental</strong> <strong>ray</strong> area light instances.

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

Saved successfully!

Ooh no, something went wrong!