For academic purposes I have adapted PBRT so that it writes out data about intersections and general path related data (I used the path surface integrator).
There is however some difficulty in getting the RGB value of a spectrum at a certain intersection. It is pretty obvious that I have to use ToRGB(float* rgb)
on the Spectrum class generated at a intersection, but the data observed afterwards is a bit strange. It would make sense for the RGB values to reside between a 0-1 range. This seems to be the case often, but at times I also see triplets such as
(1.851088, 0.882869, 0.772866)
Upon closer inspection, it turns out that the max values for RGB for my set of roughly 400.000 intersections are 3.77 2.00 and 1.76. The lower bound do seem correct as they are close to zero. So the question is what is the range used by PBRT so that I might transform it to 0.0 - 1.0.
Thank you