Fwd: [Radiance-general] Generating a black and white pic

Greg Ward gregoryjward at gmail.com
Fri Jan 28 16:41:31 CET 2005


A radiance value of 10^-7 is negligible.  However, even if your value 
_should_ be exactly zero, round-off error could bring it up to as high 
as 10^-15 or so, which would cause your if statement to return 1.  I'm 
just suggesting that you be careful when comparing floating point 
values.

-G

> From: Christopher Kings-Lynne <chriskl at familyhealth.com.au>
> Date: January 28, 2005 7:17:41 AM PST
>
>> Be careful with thresholding, since the if() function takes any 
>> non-zero positive value as "true".  For this reason, it's generally a 
>> good idea to use some small epsilon to avoid errors, like:
>>     if(li(1)-1e-7, 1, 0);
>
> In my case, the areas are in total shadow (ab=0), and hence have an 
> input brightness of exactly zero.
>
> So in your example above, you're also including areas that have a very 
> slight amount of brightness, right?
>
> Chris




More information about the Radiance-general mailing list