Confirm Procedure to Convert Spectral (SPD) Data to Radiance rgb color triplet

Hi Andrei,

Your color conversions look mostly correct, except you have the wrong coefficients for the color efficacy at the end. You used the XYZ coefficients for Green when you actually want the RGB coefficients for Y:

  (e_R, e_G, e_B) = (.265 .670 .065)

I don't know if this will make up the difference in appearance, but remember if you are looking at the results on a standard sRGB display that Radiance primaries are slightly different and a color transformation is needed. If you are using Photosphere, the necessary transform is applied automatically, or you can use the ra_xyze program to get back to an sRGB color space before converting to a standard image format such as TIFF:

  ra_xyze -r -p .64 .33 .30 .60 .15 .06 .3127 .3290 result.hdr | ra_tiff - result.tif

The ra_bmp program can perform the conversion directly:

  ra_bmp -p .64 .33 .30 .60 .15 .06 .3127 .3290 result.hdr result.bmp

Alternatively, you can perform your rendering in the 709 color primary space, avoiding the need to convert back-and-forth. Some of these alternatives are described in the following paper, which it seems you may have already read:

  Ward, Greg, Elena Eydelberg-Vileshin, "Picture Perfect RGB Rendering Using Spectral Prefiltering and Sharp Color Primaries," Thirteenth Eurographics Workshop on Rendering (2002), P. Debevec and S. Gibson (Editors), June 2002.



From: "Kolomenski, Andrei (JSC-SF311)[WYLE INTEG. SCI. & ENG.]" <>
Subject: [Radiance-general] Confirm Procedure to Convert Spectral (SPD) Data to Radiance rgb color triplet
Date: June 9, 2015 12:07:26 PM PDT

Dear Radiance Users,

I have a fundamental question about how to convert spectrum power distribution (SPD) of a material to its Radiance material counterpart. For now, I’m strictly concerned with the rgb color triplet passed to a material primitive. Below I summarized four steps that I believe accomplish this task. I would appreciate it people could confirm or provide comments on discrepancies in the procedure. Your input is much appreciated!

I tried the procedure with an experimentally measured SPD of a tan blanket, however my rpict rendering is showing a slightly lighter color than expected. I’m using ambient lighting (-ab 1 1 1) to view a rectangular surface modified by the material primitive obtained from this method.

void plastic material
5 r_calc g_calc b_calc 0 0

#1.) Obtain the SPD data from the spectrophotometer and compute the associated Tristimulus values XYZ. I’m using a CIE 2° Standard Observer for color matching functions and a D65 illuminant, as this is the illuminant used by the spectrophotometer.

#2.) Perform chromatic adaptation on the computed Trisitimulus values, to account for different white point definitions between source (sensor) & destination (Radiance) illuminants. For this transformation, the Tristimulus of the white point of both the source (S) & the destination (D) illuminants must be defined. Also, the Sharp color space is chosen for the chromatic adaptation transformation (Ref 1.), defined by the matrix, .

#3.) Convert white point balanced Tristimulus values to Radiance sRGB color space. For this transformation, the chromaticity of the red, green and blue primaries and the white point must be defined for the sRGB color space used by Radiance. Radiance uses equal-energy white as its white point with the following chromaticity coordinates.

            Define the primary chromaticity coordinates for sRGB color space, obtained from ‘’ file within the Radiance source code.

#4.) Scale each channel by the measured reflectance of the material and by the luminous efficacy weighted sum of the input RGB triplet. An equal weight can be applied or the chromaticity coordinates of the green (photopic) primary can be used as RGB channel weights. The obtained rgb values are to be used as input to a material primitive definition.