'Maya'

 
'Physical Light Exploited'
by Florian Wild


Better, but there's still a big difference for some reason..? Well, it has to do with the cosine_exponent attribute of the physical_light. The cosine_exponent is narrowing the light's default cosine distribution by taking cosine to cos_exp's power - so if we use a physical_light again and set cosine_exponent to 0 it should be equal to what we just rendered with the Maya light



Same result! Sweet! But didn't we want to emulate a physical_light with Maya lights, not vice versa? So how can we simulate this cosine_exponent? I had to experiment, and found out that a Maya spot light's dropoff attribute has the very same effect - only drawback is that you need to max the spot light's cone angle (~179.994°) - this can get a bit annoying, because the displayed cone get's incredibly huge (tip: to overcome this scale annoyance we can trim down the Locator Scale attribute under Object Display of our lightShape node to something like 0.001 or lower). So I switched my maya light to type spot light with cone angle 179.994, penumbra 0 and dropoff 1 - intensity again is physical_light's intensity/1pi (and don't forget to switch decay rate to quadratic again, as it gets switched to 'No Decay' when switching light types):



Snap! It's the exact same result as with physical_light.




Conclusion:

For rectangle and disc ('flat') area lights:
Maya light intensity = physical_light intensity / 1pi (=~3.142)
Maya spot light's dropoff (with cone angle maxed) = physical_light's cosine_exponent
For sphere, cylindrical and geometric area lights:
Maya light intensity = physical_light intensity / 4*pi (=~12.566)
note: cosine_exponent does apply to flat area lights only

Well, this perfectly emulates physical_light's intensity and cosine_exponent. But what about it's cone attribute? The cone attribute simply represents (out of the manual) 'the cosine of the opening angle of the inner solid cone'. With Maya lights this can easily be imitated by using a negative penumbra angle (a positive penumbra would make the cone angle actually wider).

So what's left is the threshold attribute of the physical_light. That's why my success goes as far as exactly 75% (4 attributes to be 'emulated', 1 failed, makes a loss of success of 25%, heh). The threshold attribute sometimes helps to effectively reduce the amount of shadow rays when using finalgathering. It's kinda useless though when used solely with direct lighting. However, this internal optimization cannot be achieved by a standard Maya light - maybe in future?

With the above correlations in mind, you hopefully better understand the interplay of direct and indirect (photon) intensity and you can get physically plausible solutions without abandoning Maya's native lights and material shaders.

I hope you enjoyed another experiment that maybe will let you get a bit more out of MentalRay than usual.

Contact me via mymail@floze.de, or visit my website at

http://individual.floze.de/


Page 4


3D Total Homepage