LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.16k stars 146 forks source link

Circular artifacts in volumes when changing asymmetry parameter #550

Closed DEBIHOOD closed 2 years ago

DEBIHOOD commented 3 years ago

Circular artifacts in volumes that visible better only in certain situations. When asymmetry = R0 G0 B0 there is no artifacts. 80m-475mm Camera is 80 meters from the actual volume. (Only small part of the image is rendered with high amount of samples because it is very expensive to render full image in terms of time.)

From my little research on what causes this issue, here is what i find out: 1) These artifacts happens in both homogenous & heterogenous volumes. 2) Happens in both Path and Bidir. 3) No matter which sampler you use. 4) Circles always stays in the center of the frame. 5) Seems like it is visible much more in the volumes with multiscattering, and the bigger the amount of bounces allowed - better visibility of these artifacts.(I am not sure that artifacts is appearing when multiscattering is off) 6) Volumes with high forward scattering(for example with asymmetry = R0.8 G0.8 B0.8 ) seems to have this problem more stonger than the volumes with high backward scattering. 7) Distance between camera and volume is key moment here, bigger the distance - bigger strenght of the artifacts.

15m-77mm Camera is 15 meters from the actual volume. Artifacts are not visible, but if you look closely they are still here.

https://user-images.githubusercontent.com/54025271/127167241-a47293c4-3d49-48ee-9aa4-a0338f0248cd.mp4 Here is a video that shows how artifacts changing depending on the distance of the camera from object. Numbers on the left - distance of camera from the object. Numbers on the right - focal lenght of the camera.

Also i did small test to check if this problem is exists in LuxRender, interestingly no, there is not, but if i change api mode to the "LuxCore API" then artifacts is occuring.

Here is a simple scene: VolumeArtifactsBug.zip

Few more images that shows artifacts: monkey cube

Dade916 commented 3 years ago

I'm looking into this problem, it is numeric precision related and I looking for a workaround.

Dade916 commented 3 years ago

This is actually a general numerical precision problem due to the size of the scene. It is not related to volumes asymmetry or even to volumes in general. I have set volume asymmetry to 0.0 and used a constant infinite light source but the problem is still there (so it is not related to asymmetry but only shown in your scene because of asymmetry value):

constinf

I have than replaced the NULL volume cube with just a red MATTE cube and there are still numerical precision artifacts (i.e. self-shadow artifacts):

matte

Using a max/min epsilon 0.1 solves the problem for matte cube but not for volume cube.

I don't know if it is possible to solve this problem. The only workaround I can think at the moment is to scale down the scene by a factor of 100.