pbrt-v3 icon indicating copy to clipboard operation
pbrt-v3 copied to clipboard

Spectral rendering gives heavy blue tint in renders

Open SergeyShlyaev opened this issue 4 years ago • 3 comments

Spectral rendering produces images with heavy blue tint for some reason.

To enable spectral rendering, I've recompiled pbrt with PBRT_SAMPLED_SPECTRUM defined in core/pbrt.h

Using Mac Os Catalina with Xcode 11.3.1 spec_01

spec_02

SergeyShlyaev avatar Apr 12 '20 20:04 SergeyShlyaev

This is basically due to a bad design decision (that will be fixed in pbrt-v4). Most lights in pbrt-v3 take multiple parameters to specify their emission: e.g. the diffuse area light has both "scale" and "L". In turn, when its emission is calculated, the standard illuminant is included twice (multiplied with itself), which in turn gives that blue hint.

As a workaround, you could remove those "scale" parameters from the lights you care about.

mmp avatar Apr 12 '20 20:04 mmp

Yeah, I tried multiplying light scales by D65 white, which is RGB = (1.20, 0.95, 0.91). It helped with the dragon scene.

But for living room scene it still produce heavy blue tint under couch pillows as on my second image. Any suggestions?

SergeyShlyaev avatar Apr 12 '20 21:04 SergeyShlyaev

Hm, I'm not sure about that blue by the pillows. My best advice would be to render just one of those pixels and add debugging print statements that describe the spectral calculations being done, and then see where they start to go not-so-white...

mmp avatar Apr 12 '20 21:04 mmp