RGB<->Spectrum conversion in pbrt 2.0

150 views
Skip to first unread message

Volodymyr Kachurovskyi

unread,
Oct 17, 2009, 4:46:00 PM10/17/09
to pbrt
Hello,

I did not really run the full pipeline of the pbrt 2 so please excuse
me if I missed anything but I think that full spectrum implementation
in pbrt 2 may suffer from color shifts. You implemented RGB->Spectrum
conversion following Smits's algorithm and you used (.333,.333)
whitepoint for the conversion. While this is a good choice for
reflectance values because it gives constant spectrum for (1,1,1) RGB
triple it is not that good for illuminant values. The reason is that
RGB->Spectrum->RGB conversion gives you an RGB value quite different
from the original one. You need to use another conversion for the
lights and use correct whitepoint for that (D65).

Matt Pharr

unread,
Nov 4, 2009, 9:36:06 AM11/4/09
to pb...@googlegroups.com
Hi, Volodymyr--

You are correct, good catch, thanks. I've updated the code on github
with fixes that take care of that. (And thanks to the lux render guys
for the matching curves for this.)

Thanks,
-matt

mljack

unread,
Nov 8, 2009, 6:42:02 AM11/8/09
to pbrt
Does that affect a scene with RGB-only materials? Will the spectrum
implementation produce different results from the RGB implementation?

-MLJack

Volodymyr Kachurovskyi

unread,
Nov 9, 2009, 1:49:05 AM11/9/09
to pbrt
From what I seen Smits algorithm usually results in less saturated
colors when converted back to RGB.
I did not try that in pbrt but I think it should be the same there as
well.

Matt Pharr

unread,
Dec 2, 2009, 9:23:24 AM12/2/09
to pb...@googlegroups.com
It should have no effect on scenes that are rendered with RGB spectra. In general, using the full sampled spectrum will produce different results from the RGB spectrum representation: for many scenes, the differences should be minor. For ones where sampled spectral data is provided in the scene description, especially those with very irregular spectral distributions, the full spectral representation should give substantially different (and much more accurate) results.

Thanks,
-matt
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "pbrt" group.
> To post to this group, send email to pb...@googlegroups.com
> To unsubscribe from this group, send email to pbrt+uns...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pbrt?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Reply all
Reply to author
Forward
0 new messages