[Radiance-general] specifying sources

Gregory J. Ward gregoryjward at gmail.com
Tue Mar 28 03:35:12 CEST 2006


Hi Will,

> -converting radiance RGB to sharp RGB (all my material reflectances  
> are in RGB, eg from the materials file in lib/) and i'm not sure  
> how to convert them to sharp rgb. i thought i could use  
> xyz_rgb.cal, by converting RGB to XYZ, then the XYZ values to sharp  
> RGB. but i thought i'd check my idea by converting RGB to XYZ, and  
> then converting it back again, thinking it should be the same, and  
> its not.

This is the correct method.  Converting to and from works for me:

% icalc xyz_rgb.cal
X(.351,.918,.015)
$1=0.480220278
Y(.351,.918,.015)
$2=0.709181111
Z(.351,.918,.015)
$3=0.134033796
R($1,$2,$3)
$4=0.351
G($1,$2,$3)
$5=0.918
B($1,$2,$3)
$6=0.015

You could have a problem if you go from XYZ through RGB to XYZ again,  
since RGB gets truncated to zero, where negative values do in fact  
exist for some visible XYZ colors.

> -you say that a white popint adjustment is effectively made during  
> the rendering. is this just the shift needed to account for the  
> different viewing conditions (ie being in the room, and looking at  
> the monitor)?

No, it really assumes that you are viewing under the same tungsten  
illuminant.  To complete the white point conversion to some other  
adaptation, you need to apply the final matrix equation in Section 2  
of the paper.  This can be done using ra_xyze and the -p option if  
you happen to know your display's primaries, e.g.:

	% ra_xyze -r -p .603 .352 .289 .590 .146 .066 .319 .348 sharp.pic  
display.pic

This does not account for the surround condition, but I don't know  
what to do for that, either.

> -premultiplying surface reflectances. the RGB values i am geting  
> for the XYZ data i have for the filters are much bigger than 1, so  
> premultiplying will give reflectances much bigger than 1.
> for example:
>
> the RGB values for a certain red filter = 55, -3.6, -0.7 (from  
> X,Y,Z=21.3, 9.1, 0) [i thought the range for these values was  
> (o:inf)?]

Nope, they should all be between 0 and 1.  Since they are not, you  
should assume these are percentages and divide them by 100.  This  
still yields a negative value for green, but I get a Sharp RGB of  
(0.2614, -0.0143, 0.0035).  I'm not sure how you got your values --  
are they not Sharp RGB?  The xyz_rgb.cal file should truncate the  
green value to zero.  Your XYZ value seems to be right on the edge of  
the visible boundary.  A Z value of 0 is highly unusual.

> the RGB reflectance for a white painted wall = 0.9, 0.8, 0.8
>
> so the compensated RGB reflectances would be 49.5, -10.08, -0.56  
> (ie. 55*0.9 etc) But these should all be between 0 and 1 shouldn't  
> they?

Yes, or nearly.  Actually, you can have values slightly greater than  
1 in some cases, but negative values won't even be storable in a  
Radiance picture unless you use some fancy means to render with  
rtrace and convert from RGB to XYZ prior to storing the picture.

> should i simply normalise the filter's RGB values to sum to 1, or  
> am i missing something more important here?

No, don't do that.

-Greg



More information about the Radiance-general mailing list