-
Notifications
You must be signed in to change notification settings - Fork 262
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
Discrepancy between homogeneous and heterogeneous media #1387
Comments
Hi @phyqh Thanks for the detailed description and reproducers. I'm able to reproduce this discrepancy. There indeed seems to be an issue with |
Thank you @njroussel for your feedback and information! Now that you mentioned it, I could indeed obtain consistent results (between the two mis results) using I have attached my results on volpathmis here, would you help me check if you observe similar behavior: One "hack" to "fix" it is to apply a |
(Without having looked at the scene files)
Some pointers to look at: |
Summary
I noticed a discrepancy between homogeneous medium and heterogeneous medium, when the heterogeneous one is modelled to behave exactly like the homogeneous one (using constvolume). I have ran into this problem using both the prbvolpath and volpath integrators where the media are absorption-only (albedo set to zeros).
System configuration
System information:
OS: Windows-10
CPU: Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
GPU: NVIDIA GeForce RTX 4070 Ti
Python: 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
NVidia driver: 560.94
CUDA: 12.4.131
LLVM: -1.-1.-1
Dr.Jit: 0.4.3
Mitsuba: 3.4.0
Is custom build? False
Compiled with: MSVC 19.37.32822.0
Variants:
scalar_rgb
scalar_spectral
cuda_ad_rgb
llvm_ad_rgb
Description
I have defined two very simple scenes (can be found in the zip file in the beginning of next section) that are geometrically equivalent, where a cube is defined in front of a large rectangular area light source, with the light's radiance set to (1, 1, 1), Below is a view from a different camera configuration as would be used for a simple reproducible, that should show the scene in a clear way:

The only difference in the two scenes is how the participating medium is defined: In simple_light_heterogeneous_volume_modified.xml, the medium type is heterogeneous, in simple_light_volume_modified.xml, the medium type is homogeneous, and both medium should have zero albedo (to model an absorption-only volume), and constant sigma_t that is different across three channels:
and
I expect the two scenes return identical results, but they do not, when comparing between a ground truth image I generated based on manually calculating transmittance, the heterogeneous image appears to be dimmer than a correct result (Up: Heterogeneous, Down: Homogeneous):


Additionally, as you would notice in point 3 of the next section, if sigma_t has the same value across all three channels, the result is correct which appears very curious to me.
I would appreciate your help, and any comments on why this might be happening, or if there is anything wrong about my assumptions / files.
Steps to reproduce
All files needed to reproduce this issue is in this zip file:
reproduce.zip
which I have commented out, if sigma_t is set to be the same across three channels, the results from both homogeneous and heterogeneous media would be consistent.
List of contents in the zip file:$ref - img$ ).
reproduce.py, simple_light_heterogeneous_volume_modified.xml (for the heterogeneous scene), simple_light_volume_modified.xml (for the homogeneous scene), the two results for these two scenes (const_heterogeneous.exr and homogeneous.exr respectively), and a ground truth image that is obtained via directly computing the transmittance (gt_transmittance.exr, this is obtained using another script and not obtained using reproduce.py, this image could be useful if viewed in certain exr viewers that compare two exrs using difference
The text was updated successfully, but these errors were encountered: