mental ray Architectural and Design Visualization Shader Library
mental ray Architectural and Design Visualization Shader Library
mental ray Architectural and Design Visualization Shader Library
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.9 Photometric Lights 833.9 Photometric Lights3.9.1 The ProblemOne difficulty in using base <strong>mental</strong> <strong>ray</strong> shaders to render a physically correct scenes with GI(using photons), is in balancing the photon energy <strong>and</strong> the direct light correctly. The reasonfor this is that the intensity is generally specified as an intensity for some given direction (forexample the peak intensity on a spotlight), but the energy is the sum of (or technically, theintegral) of all such intensities in all directions.So for example for a spotlight, for the same peak intensity, you would need different photonenergies depending on the width of the spotlight cone, <strong>and</strong> depending on the shape of theintensity distribution within that cone. And while this can be calculated for a mathematicallydefined intensity distribution (such as a spotlight cone) what about an arbitrary distributionas defined by a light profile?Furthermore, to ensure optimal convergence of the photon solution for a light which variesits intensity based on the direction of light (e.g. a spotlight or a light using a light profile),instead of emitting photons of different energy in different directions, one should emit photonsof similar energy in different densities. So the amount of energy-per-area (the density ofphoton energy) at a given point must match the direct light arriving at that point.3.9.2 The SolutionTo solve all these issues, we introduce the mia photometric light. It takes all the guesswork outof balancing the photon energy with the light intensity by peforming a numerical integrationof the chosen intensity distribution to calculate the proper photon energy automatically, aswell as takes care of adapting the photon density to the distribution, all automatically.To use it, simply use the same instance of the shader as both light <strong>and</strong> photon shader on alight source. The light must have an origin (i.e. the shader does not work on an infinite lightsource). The light must be set to emit photons, <strong>and</strong> must be given a nonzero energy value(although the actual value will be overriden by the shader, a nonzero energy value is required,or <strong>mental</strong> <strong>ray</strong> will not emit any photons at all for the light). The exponent should alwaysbe 2. If the light is a spotlight, a spread value should be used. See the <strong>mental</strong> <strong>ray</strong> manualabout lights.shader "myLight" "mia_photometric_light" ("on" true,"color" 1 1 1,...)light "theLight" = "myLight"emitter = "myLight"