mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.89k stars 454 forks source link

Spectral range in SpectralFilm is overruled by constants in spectrum.h #417

Open wvierber opened 8 months ago

wvierber commented 8 months ago

When using a SpectralFilm, adjusting "float lambdamax" [1050] and/or "float lambdamin" [330] does not result in the object being rendered outside of the 360-830 nm range. While there are channels for this extended spectral range outputted in the OpenEXR file, these are black.

Adjusting the constants in spectrum.h (to e.g. 330 and 1050) and recompiling PBRT does result in the object being rendered in the adjusted spectrum. It seems that the predefined visible spectral range overrules the arguments of SpectralFilm.

This can be reproduced using the scene and spectra used in debug.zip.