[Radiance-general] Confirm Procedure to Convert Spectral (SPD) Data to Radiance rgb color triplet

Kolomenski, Andrei (JSC-SF311)[WYLE INTEG. SCI. & ENG.] andrei.kolomenski at nasa.gov
Wed Jun 10 09:13:13 PDT 2015


Hi Greg,
Thank you for the informative reply. Yes, the efficacies you mentioned make sense as these are the ones used to compute photopic luminance from radiance.
Using the ra_xyze & the ra_bmp command I can convert from Radiance RGB color space to sRGB color space used by common digital monitors. Converting the rpict .hdr rendering of my material to sRGB color did produce a much more realistic color. Thank you for pointing out this transformation, as I forgot to that the final rendering must be transformed to the display color space.
Kind Regards,
Andrei Kolomenski
From: Greg Ward [mailto:gregoryjward at gmail.com]
Sent: Tuesday, June 09, 2015 4:06 PM
To: Radiance general discussion
Subject: Re: [Radiance-general] 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<http://www.anyhere.com/gward/papers/egwr02/index.html>," Thirteenth Eurographics Workshop on Rendering (2002), P. Debevec and S. Gibson (Editors), June 2002.

Cheers,
-Greg



From: "Kolomenski, Andrei (JSC-SF311)[WYLE INTEG. SCI. & ENG.]" <andrei.kolomenski at nasa.gov<mailto:andrei.kolomenski at nasa.gov>>

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
0
0
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.
X= ki=1Nx*SPDMaterial*SPDIlluminant
Y= ki=1Ny*SPDMaterial*SPDIlluminant
Z= ki=1Nz*SPDMaterial*SPDIlluminant
k=1i=1Ny*SPDIlluminant
#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, MS.
Tristimulus of D65 Illuminant≝XW,YW,ZWD65T=94.811, 100.0, 107.304T
Tristimulus of Equal Energy Illuminant≝XW,YW,ZWE.E.T=100.0, 100.0, 100.0T
Sharp Color Space Transformation Matrix≝MS=1.2694-0.0988-0.1706-0.83641.80060.03570.0297-0.03151.0018
XDYDZD= MS-1LDLS000MDMS000SDSS[MS] XSYSZS

LSMSSS= MSXWYWZWD65
LDMDSD= MSXWYWZWE.E.
#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.
Equal Energy White Chromatcity ≝xW,yW,zWT=13, 13,13T
            Define the primary chromaticity coordinates for sRGB color space, obtained from ‘xyz_rgb.cal’ file within the Radiance source code.
Red Primary Chromatcity ≝xR,yR,zRT=0.64, 0.33, 0.03T
Green Primary Chromatcity ≝xG,yG,zGT=0.29, 0.60, 0.11T
Blue Primary Chromatcity ≝xB,yB,zBT=0.15, 0.06, 0.79T
RGB= M-1XYZ
M=CL
C=xRyRxGyGxByB111zRyRzGyGzByB
L=LR000LG000LB
LRLGLB=C-1xWyW1zWyW

#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.
Channel Efficacy ≝eR,eG,eBT=0.29, 0.60, 0.11T
Measured Reflectance ≝R
rgb= RWRGB
W=eRR+eGG+eBB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20150610/e71f4e16/attachment-0001.html>


More information about the Radiance-general mailing list