Please help. I'm trying to implement a ray tracer, going by the PBRT book and got stuck on an issue that I fail to find the answer to. My scenes are made from objects and light sources. From that, I can get the spectral power distribution(SPD) of radiance for each pixel (in watts per steradian per meter squared per meter of wavelength). The problem is, how to correctly convert them to RGB color values? It appears that I should first get the XYZ color, and then convert to RGB. But how do you go from an SPD to the XYZ color? I could just integrate the SPD with the xyz-color-mathing-functions, but they work with "relative power distributions", and I have absolute. The problem is with this scaling that needs to be done. So, if my understanding is correct so far, then the question is, how should I scale my SPDs so that the final image is correct and the XYZ values don't fly far out of the 0..1 range?
I'm not an expert in color, and it's possible that my undestanding of the situation is wrong. Does it make sense to ask, what absolute(i.e. not relative) SPD of radiance should the pixel get(watts per steradian per meter cubed), so that its RGB value is exactly white (1, 1, 1) ?