Radiance RGB input from Spectrum

Hi Radiance Community,

I am currently working on a project where I need to generate RGB values for Radiance based on Spectrophotometry data, specifically the reflectance and transmittance spectra. I am reaching out to seek guidance on the best approach for achieving this.

Could someone please provide insights or direct me to relevant resources that outline the steps or methods to convert reflectance and transmittance spectra into RGB values within the context of Radiance?

Hi Ravi,

Welcome to the Radiance forum!

If you know how to convert your spectra into XYZ values, these may be transformed to Radiance RGB values using the xyz_rgb.cal file in ray/src/cal/cal like so:

rcalc -f xyz_rgb.cal -e ‘$1=R($1,$2,$3);$2=G($1,$2,$3);$3=B($1,$2,$3)’

(Replace the single-quotes above with double-quotes if you are using Windows.)
For every XYZ triplet you feed to the standard input of the above command, it will produce a Radiance RGB triplet on the standard output.

If you need to know how to convert spectra to CIE XYZ, there are standard methods for this as well as some more complex scripts. There are also new primitives in the experimental HEAD release of Radiance (6.0a) that will take spectral data directly.

Cheers,
-Greg

1 Like