[Radiance-general] Mkillum bsdf + sample density

Greg Ward gregoryjward at gmail.com
Thu Dec 10 20:30:12 PST 2009


Hi Andy,

That's some good guessing!  Yes, the difference is due to the very  
different sampling strata.  I had to check my code (line 444 of src/ 
gen/mkillum2.c) to verify.  I don't add 1, but round-off to the  
nearest integer, rather than the lesser one.

With regards to the mismatch of samples, this does cause some issues,  
particularly near the zenith, where the altitude/azimuth strata used  
by mkillum are a very poor match to the Klems/Tregenza strata used for  
the BSDF.  Mkillum does a reasonable job with normalization and sample  
distribution to make sure some rays go through each little window (and  
the s= setting can still affect this).  So long as the light and  
distribution are not simultaneously "peaky," it all works out.

Cheers,
-Greg

> From: Andrew McNeil <andrew.mcneil at arup.com>
> Date: December 10, 2009 4:17:04 PM PST
>
> Hi Greg,
>
> Thanks for your response, that d= option behavior makes sense now,  
> but leads
> to a question about the number of output directions in illum.dat...
>
> My BSDF has 18 "latitudes"  and 24 "azimuths"  (432 divisions)
> The resulting illum.dat is 13x39 = 507 angles
>
> After considering your response, I guess the difference between 432  
> and 507
> is a result of a BSDF pattern that doesn't match the typical radiance
> hemisphere division scheme used by mkillum?
>
> I'm guessing that mkillum gets from 432 to 507 by:
> sqrt(432/pi) = 12
> 12*pi = 38
> 12+1 x 38+1  =  13 x 39  = 507
> Am I close?  I don't have an explanation for adding one to each  
> dimension.
>
> Finally, the sampling pattern of my BSDF (18x24) and the hemisphere  
> division
> used by mkillum (13x39) results in double-sampling of some BSDF  
> angles and
> non-sampling of others.  In conclusion I would be best served by  
> using the
> typical radiance hemisphere division ( m x pi*m ) to generate a BSDF  
> that
> "agrees" with mkillum.  (or should I stop speculating...)
>
> Andy



More information about the Radiance-general mailing list