|
Apparently it renders correct. So, if you plan to use native Maya shaders instead of custom MentalRay shaders, physical_light might cause problems. What I came across for example, is that extremely bright final gathering blotches (blotches that are “not” caused by insufficient rays) were caused by this fact.
Second, physical_light lacks of almost every neat feature the Maya lights have: raytrace shadow attributes like light radius, amount of shadow rays, shadow ray depth limit, shadow color, light fog, light glow, intensity curve, barn doors (if you ever use it..), decay regions, and last but [i]not[/i] least the capability to emit diffuse or specular only. With this in mind, I went out to find a 'substitute' for the physical_light. To anticipate but hopefully not to lower the suspense (heh..) I can say that this has been successfully accomplished by exactly 75%.
Foremost we need to know what the key-features of physical_light are: It is a) the decay, following physical light's inverse-square falloff law. And more important b) it works perfectly together with the light's photon emission attributes, creating a physically plausible correlation between direct and indirect illumination.
To maintain this correlation, we need to find an exact conversion factor for the light's intensity. Well, if you ever tried to approximate a Maya light's intensity to a physical_light's, you probably came up with the factor 12.5, +-0.1 maybe. Hmm, why this? The physical_light's source code gives the answer: at line 109 it states
[code] switch(areatype) {
case miLIGHT_NONE: /* point, spot or directional*/
/*
* distance attenuation: 4 Pi r^2 is the area of a
* sphere around the point. Same normalization as for
* spherical light
*/
f = type==miLIGHT_DIRECTION ? 1 : 1 / (4 * M_PI * r2);
break;[/code]
|