[Radiance-general] specifying sources
william reynolds
william.reynolds at oriel.ox.ac.uk
Tue Mar 28 02:16:37 CEST 2006
greg
i think i'm starting to follow you now!
just a couple more things...
-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.
-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)?
-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)?]
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?
should i simply normalise the filter's RGB values to sum to 1, or am i
missing something more important here?
thanks again
will
Gregory J. Ward wrote:
> 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
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>
More information about the Radiance-general
mailing list