|
Yeah the tough part is getting it to work so that it creates new nodes each time so that it can be used repeatedly in the same scene and session.
Now here’s a query for you, can elaborate the purpose of this kind of setup, I mean how does it add-up to your Image.
In the Maya help, look for the mental ray “Sun and Sky” section. Towards the end of that it discusses Photometric Light. Here is a copy and paste of part of it:
The Problem
One difficulty in using base mental ray shaders to render a physically correct scenes with GI (using photons), is in balancing the photon energy and the direct light correctly. The reason for this is that the intensity is generally specified as an intensity for some given direction (for example the peak intensity on a spotlight), but the energy is the sum of (or technically, the integral) of all such intensities in all directions.
So for example for a spotlight, for the same peak intensity, you would need different photon energies depending on the width of the spotlight cone, and depending on the shape of the intensity distribution within that cone. And while this can be calculated for a mathematically defined intensity distribution (such as a spotlight cone) what about an arbitrary distribution as defined by a light profile?
Furthermore, to ensure optimal convergence of the photon solution for a light which varies its 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 photons of similar energy in different densities. So the amount of energy-per-area (the density of photon energy) at a given point must match the direct light arriving at that point.
The Solution
To solve all these issues, we introduce the mia_photometric_light. It takes all the guesswork out of balancing the photon energy with the light intensity by peforming a numerical integration of the chosen intensity distribution to calculate the proper photon energy automatically, as well 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 and photon shader on a light source. The light must have an origin (i.e. the shader does not work on an infinite light source). The light must be set to emit photons, and must be given a nonzero energy value (although the actual value will be overriden by the shader, a nonzero energy value is required, or mental ray will not emit any photons at all for the light). The exponent should always be 2. If the light is a spotlight, a spread value should be used. See the mental ray manual about lights.
3ds Max 2013, Maya 2013
Windows 7 Ultimate 64 Bit
Core i7, 12GB RAM
Nvidia Quadro FX 3700 (Driver 267.17)
|