[Radiance-general] Mkillum bsdf + sample density

Greg Ward gregoryjward at gmail.com
Fri Dec 18 10:14:45 PST 2009


Hi Andy,

Nice analysis.  I had forgotten about this bit of trickery near the  
zenith.  The general assumption with mkillum is that it won't be  
relied upon for the direct component, which is why an illum is  
produced rather than a light by default.  Once you have a non- 
diffusing system that is relying entirely on mkillum, you're in a bit  
of trouble.  This is a key caveat that needs to be worked out somehow  
in the BSDF case....

Cheers,
-Greg

> From: Andrew McNeil <andrew.mcneil at arup.com>
> Date: December 18, 2009 9:49:25 AM PST
>
> Hi Everyone,
>
> Earlier this week Greg inspired me to look deeper into mkillum code to
> understand exactly how mkillum gets arrives at the illum.dat output
> resolution.  It resulted in a double a-ha moment that I wanted to  
> share to
> close out this thread.
>
> First A-ha: the reason for the apparent +1 in the illum.dat  
> resolution:
>
> Following the calculation for hemisphere divisions in the mkillum  
> code I
> still got a sampling resolution of 12x38 instead of 13x39 that is  
> written to
> the illum.dat file.  It turns out that the hemisphere sampling  
> resolution
> *is* 12 x 38, but mkillum purposely writes writes an illum.dat array  
> that is
> one greater in both dimensions.  It makes perfect sense when I  
> consider
> interpolation.
>
> The 0 degree phi value is repeated as a 360 degree value (line 363 of
> mkillum3.c). This simplifies interpolation between the last phi  
> value and
> the first phi value in a theta row.
>
> The extra theata row is less than 0 degrees (or greater than 90  
> degrees
> altitude). This is added so to allow interpolation towards a  
> consistent
> zenith value.  The extra values in the illum array are twice the  
> average of
> the values in the upper theta row minus the value in the current phi
> division (line 267 of mkillum3.c).  The values are place on the  
> other side
> of the zenith (over the top).  The result is that as theta  
> approaches zenith
> the interpolated result approaches the same zenith value for all phi
> divisions.
>
> In most cases this avoids anomalies at the zenith.
>
>
> Second A-Ha: The cause of an artifact I was witnessing when testing  
> my bsdf
> with mkillum:
> http://www.mcneilorama.com/radiance/BSDF/mkillum.html
> (See sun position 2 & 3)
>
> The over the top interpolation explains an artifact that occurs when  
> one of
> the illum values in the near zenith row is much greater the the  
> others in
> the  row ( in this case due to direct sunlight).  The high value  
> increases
> the computed average for the zenith.  Then the over the top  
> interpolations
> create a bright circle between the upper theta row and the zenith.
>
> Now that I know what causes the artifact I can safely ignore it.   
> These sun
> positions used in the renderings are simply for testing the  
> behavior.  The
> sun will never be close to the zenith of the mkillum.  In fact the  
> panelite
> dimensions were specifically determined to preclude sunlight from  
> passing
> directly into the gallery.



More information about the Radiance-general mailing list