[Radiance-general] specifying sources

Gregory J. Ward gregoryjward at gmail.com
Mon Mar 27 23:02:10 CEST 2006


Hi Will,

> 1. using blackbody.cal:
> -should i use this to calculate the emitted power for a selection  
> of lambda values (presumeably using a separate script to input the  
> lamda values)? if so, how do i then go about converting the results  
> into XYZ values, so that i can then convert to the sharp rgb colour  
> space? (presumably illumcal.csh uses the power vs. lamda data and  
> CIE standard observers, but i dont follow how to use it! also, does  
> it produce RGB or XYZ values?)

I gave you the result for a 3200K black body.  To compute the same  
for other temperatures, illumcal.csh should work.  I get weird  
results for the correlated color temperature, and I think there is  
something wrong with that part of the calculation, but the CIE (x,y)  
values seem OK.  If I run:

( echo '# Black Body at 3200K' ; cnt 100 | rcalc -e 'lambda=(780-350)/ 
99*$1+350' -f blackbody.cal
-e temp:3200 -e '$1=lambda;$2=u(lambda,temp)' ) > bb3200.dat
csh -f illumcal.csh bb3200.dat

I get nearly the same results as before.

> -or should i use it to calculate the cromaticity (x,y) coordinates?  
> if so, can i  then simply use rgb.cal (if this is what its  
> equations do!) to convert the (x,y) cromaticity results to RGB  
> values, ignoring the Y, "brightness", value?

CIE (x,y) chromaticity coordinates can be converted to CIE XYZ if you  
have a Y value using:

X = x/y*Y;
Z = (1-x-y)/y*Y;

Similarly, you can get CIE (x,y) from XYZ using:

x = X/(X+Y+Z);
y = Y/(X+Y+Z);

> -currently (ie before i apply any colour filters) my sources are  
> simply white, i have ignored their colour temperature. when i  
> applied the colour filteers i was going to use the XYZ data given  
> for a 3200K source, rather than that measured with the C source. i  
> was hoping that this would mean i do not have to add the effect of  
> the colour of the source as well, is that correct?

Yes, that is correct.  It also means that they should have done you  
the favor of premultiplying the source and filter spectra, so you  
don't have to.

> 2.using neutral light sources
> -i think i understand the principles of what you said in your  
> paper, but i dont really follow how to implement this!
> my scene has only one source in it, so this is what i understand i  
> should do:
> once i have calculated the sharp RGB values of the output of my  
> source i should divide every material colour by the source colour  
> (individually for r, g, b) and replace the source with a white one.  
> should this white source be normalised to a value of 1 1 1, and the  
> intensity of the source be taken into account in the  
> premultiplication above, or should the intensity of the source left  
> out of these premultiplications?

You should premultiply, not divide, your source and scene colors, and  
preferably do this over each wavelength of the visible spectrum.  If  
you don't have spectral data, then yes, you will just be multiplying  
the (Sharp) RGB values.  The intensity of the source should not be  
taken into the scene colors, so that you don't have reflectances  
greater than 1, which would be a disaster.

> how do i then regain the colour information after the rendering? is  
> it as simple as postmultiplying every pixel in the pixel by the  
> inverse of the appropriate r, g or b value used in the pre- 
> multiplication?

You don't need to "regain" the color information, as you have  
effectively accomplished a vonKries white balance during rendering.

-Greg



More information about the Radiance-general mailing list