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 71declare shader "mia_ciesky" (boolean "on"default on,color "rgb_unit_conversion" default 0.0001 0.0001 0.0001,# Luminance parametersboolean "auto_luminance"default on,scalar "zenith_luminance" default 0.0,scalar "diffuse_horizontal_illuminance" default 0.0,# CIE specific parameters. 0 = clear sky, 1 = overcastscalar "overcast" default 0.0,# Sun directionvector "sun_direction",light "sun",)# Y vectorboolean "y_is_up",version 1apply environment, textureend declareThe shader shares many parameters with the mia physicalsky <strong>and</strong> they work the same, thisincludes parameters on, rgb unit conversion, sun direction <strong>and</strong> y is up. See page 66 fordetails.The following parameters are unique to the mia ciesky shader:• auto luminance. When on, the luminance of the sky can either be defined by settingthe zenith luminance parameter (a c<strong>and</strong>ela per square meter measurement) or bysetting a known diffuse horizontal illuminance value (in lux) - not both.• When overcast is zero, the CIE Clear Sky model is used. When overcast is 1.0, the CIEOvercast model is used. In-between values is a linear interpolation of the two models.3.8 Sky- <strong>and</strong> Environment Portals3.8.1 The ProblemA classic problem in computer graphics is lighting a scene solely through indirect light, likefrom a sky, or other “environment” light from an acquired HDRI or similar.This is accomplished in <strong>mental</strong> <strong>ray</strong> using Final Gathering (henceforth abbreviated as FG),<strong>and</strong> is done by tracing a large number of “FG <strong>ray</strong>s” to see which hit the environment (or other

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

Saved successfully!

Ooh no, something went wrong!