-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic Radiance Values for Spectral Render #424
Comments
That is quite odd. Which integrator are you using? If it's one of the ones that splats samples to the image (SPPM, MLT, BDPT), then a bug that was just fixed may be causing that: #450. Can you try with the latest version? |
Sorry, I lost track of this issue and moved over to a different project. This build was from Jan '24 and using the VolPath integrator. Now, I am working with VIS-LWIR spectral scenes (i.e., everything has spectral definitions) and am seeing the same pixel pattern from VolPath and BDPT. Every 100 nm or so, there is a triplet of peaks - a medium one followed by a slightly smaller and then a larger one. Still 100 nm after changing nbuckets to a larger number. I will pull the latest code and see if the issue persists. Edit: Issue persists after pulling latest code (which includes #450 fix) |
I may have discovered a fix. #450 was a good start and solved the access violation errors mentioned in the issue, but it did not get to the root of the unexpected behavior. First, I noticed the pixel-level spectra had zero radiance at some wavelengths in my test scene. EXRs are written with a half-bucket offset in film.cpp.
So, I attempted to adjust the bucketing logic in film.h to ensure the EXR buckets are centered between wavelengths:
With this change, I can get beautifully smooth pixel-level spectra. The spectra now look as expected. I have yet to verify quantitatively. Still, nBuckets should not exceed NSpectrumSamples. So, for anyone getting deep into the spectral film, I recommend cranking up the NSpectrumSamples or adjust it dynamically. |
I was able to reproduce variations of your plots. Thanks for looking at it. Your analysis helps explain why we see what we see. Very interesting. Looks like I need to test the balance of spp and depth with run time. Could the variation at the upper end be due to the RGB material used on the sphere? The irradiance distribution on the film will depend on the scene geometry and scales with intensity. Your plot shows a sharp increase in variation on the upper end, but I wonder if a different seed shows the same kind of transition -- if it does, maybe it's something with the RGB to spectrum conversion. I tried running with lambdamin = 360 and lambdamax = 460 with the original RGB= [0.7 0.3 0.1] color in your test scene, and nBuckets=64, spp=128, 6500K blackbody point light, maxdepth=3, and NSpectrumSamples=4. In this window, we see smooth with spikes. Not much noise at the darker end of the spectrum. And jagged in the 730 to 830 window where reflections are more intense. For the flipped color case, [0.1 0.3 0.7]: Starting with the 360 to 460 window. And here for the 730 to 830 window. Cranking up the spp gives us a smoother result all around. That's good. The amount of sampling error between seeds is interesting. I would like to experiment with seeing the distribution across 30 or so seeds. I have not played around with changing seeds much until now. Consistency between runs with high spp/depth would be important if someone wanted to model real sensors in dynamic scenes. The error can be managed using scale-invariant analyses. For my application, I will need to take a crack at it eventually. Thanks again! |
Hi, I am wondering if anyone could provide some insight into what might cause periodic radiances to appear in spectral renders.
I rendered several data cubes using the spectral film type and all pixels show a periodic radiance pattern. The pattern is more clear in some pixels compared to others, but the pattern is always present. The graphic below is a plot of the radiance values from a selected pixel. In this case, the sample was taken from a zero-day render with 63 spectral channels and the Sobol sampler -- but the pattern appears regardless of those parameters.
Overall magnitude is low because of the dark scene and the peaks are very clear for illustrative purposes. Again, I do not think this is really connected to the core problem since the pattern is present across the whole scene. For reference, RGB=[13, 13, 16] for this pixel, according to the respective 'R,' 'G,' and 'B' channels in the .exr.
My guess is that is has to do with RGB getting mapped into spectral space, which has ambiguity. For the very few materials that have spectral definition, their contribution would be much less than the RGB. So we would see artifacts of that mapping more clearly than with a purely spectrally defined scene. It is always four repetitions, regardless of the number of channels.
Also considered whether the wavelengths list and how I am extracting the data is not organized the same way.
Maybe I am missing something fundamental? Or maybe this is expected behavior when the scene isn't purely defined with spectral materials?
Any insight would be appreciated. Thanks!
Additional information:
Spectral samples were extracted using Python, OpenEXR, and Imath.
The text was updated successfully, but these errors were encountered: