GSoC 2022: Many Lights Sampling in Cycles X (Feedback Thread)

Did not seem to work with the latest version of 7zip. However, I did remove the excess detail from the name of the zip folder (before unpacking) and the build now works correctly. Go figure.

The IES issue should be fixed now in the branch, build will be updated soon.

13 Likes

I’ve tested MLS build with the volume scene with nearly 700 lights.
Render time 3min, no clamping, no filter, full GI.

No MLS and no path guiding.

Path guiding only.

MLS only.

MLS + PG.

25 Likes

WOW!
MLS significatly improved the noise level!

2 Likes

HOLY SMOKES! MLS lookin’ real yummy :hot_face: :hot_face: :hot_face:

1 Like

I decided to run some Many Lights Sampling tests in a larger scene inspired by the city scene shown in the Many Lights Sampling white paper. Here are the results.

30 second render time
Scene 1

Scene 1 - Many Lights Sampling Off:


Scene 1 - Many Lights Sampling On:

Scene 2

Scene 2 - Many Lights Sampling Off:


Scene 2 - Many Lights Sampling On:

Scene 3

Scene 3 - Many Lights Sampling Off:


Scene 3 - Many Lights Sampling On:


60 second render time
Scene 1

Scene 1 - Many Lights Sampling Off:


Scene 1 - Many Lights Sampling On:

Scene 2

Scene 2 - Many Lights Sampling Off:


Scene 2 - Many Lights Sampling On:

Scene 3

Scene 3 - Many Lights Sampling Off:


Scene 3 - Many Lights Sampling On:


Reference of scale for each scene

Scene 1:


Scene 2:


Scene 3:

I should note that scene 3 is unrealistic in terms of production rendering. I have included the city, plus many other light sources that aren’t visible to the camera in the scene even though they will have little to no impact on the outcome of the image.

26 Likes

I tried to render one of my bigger scenes with MLS branch but unfortunately I hit a segfault at updating lights | computing distribution.

`--debug-cycles` printout

I1129 15:40:58.372268 108060 device_impl.cpp:58] Using AVX2 CPU kernels.
I1129 15:40:58.374333 108060 device_impl.cpp:58] Using AVX2 CPU kernels.
I1129 15:41:26.276662 108060 sync.cpp:296] Total time spent synchronizing data: 27.902
I1129 15:41:26.276862 111173 integrator.cpp:352] Cycles adaptive sampling: automatic min samples = 128
I1129 15:41:26.276916 111173 film.cpp:597] Effective scene passes:
I1129 15:41:26.276926 111173 film.cpp:599] - type: combined, name: “Combined”, mode: NOISY, is_written: True
I1129 15:41:26.276937 111173 film.cpp:599] - type: adaptive_aux_buffer, name: “”, mode: NOISY, is_written: True
I1129 15:41:26.276945 111173 film.cpp:599] - type: sample_count, name: “”, mode: NOISY, is_written: True
I1129 15:41:26.276966 111173 integrator.cpp:352] Cycles adaptive sampling: automatic min samples = 128
I1129 15:41:26.291333 111173 scene.cpp:680] Maximum number of closures exceeded: 73 > 64
I1129 15:41:26.291373 111173 scene.cpp:592] Requested features:
I1129 15:41:26.291381 111173 scene.cpp:593] Use BSDF True
I1129 15:41:26.291388 111173 scene.cpp:594] Use Emission True
I1129 15:41:26.291395 111173 scene.cpp:596] Use Volume True
I1129 15:41:26.291404 111173 scene.cpp:597] Use Bump True
I1129 15:41:26.291410 111173 scene.cpp:598] Use Voronoi False
I1129 15:41:26.291417 111173 scene.cpp:600] Use Shader Raytrace True
I1129 15:41:26.291424 111173 scene.cpp:602] Use MNEEFalse
I1129 15:41:26.291431 111173 scene.cpp:603] Use Transparent True
I1129 15:41:26.291440 111173 scene.cpp:605] Use Denoising False
I1129 15:41:26.291446 111173 scene.cpp:606] Use Path Tracing True
I1129 15:41:26.291458 111173 scene.cpp:608] Use Hair False
I1129 15:41:26.291466 111173 scene.cpp:609] Use Pointclouds False
I1129 15:41:26.291476 111173 scene.cpp:611] Use Object Motion False
I1129 15:41:26.291483 111173 scene.cpp:613] Use Baking False
I1129 15:41:26.291492 111173 scene.cpp:614] Use Subsurface True
I1129 15:41:26.291500 111173 scene.cpp:615] Use Volume True
I1129 15:41:26.291508 111173 scene.cpp:616] Use Patch Evaluation False
I1129 15:41:26.291517 111173 scene.cpp:618] Use Shadow Catcher False
I1129 15:41:26.291532 111173 svm.cpp:73] Total 83 shaders.
I1129 15:41:26.295879 96539 colorspace.cpp:135] Colorspace Non-Color is no-op
I1129 15:41:26.295914 96554 colorspace.cpp:135] Colorspace Non-Color is no-op
I1129 15:41:26.320237 96546 colorspace.cpp:135] Colorspace Non-Color is no-op
I1129 15:41:26.320283 96520 colorspace.cpp:135] Colorspace Non-Color is no-op
I1129 15:41:26.320305 96389 colorspace.cpp:135] Colorspace Non-Color is no-op
I1129 15:41:26.322316 96382 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322355 96549 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322381 96523 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322405 96566 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322427 96551 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322446 96535 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322463 96550 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322489 96390 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322525 96381 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322551 96385 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322566 96520 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322582 96546 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322597 96553 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.322614 96532 colorspace.cpp:140] Colorspace sRGB is sRGB
I1129 15:41:26.336038 111173 svm.cpp:149] Shader manager updated 83 shaders in 0.044508 seconds.
I1129 15:41:28.564169 111173 object.cpp:693] Total 1087 objects.
I1129 15:41:28.615062 111173 particles.cpp:108] Total 0 particle systems.
I1129 15:41:28.615103 111173 geometry.cpp:1754] Total 68 meshes.
I1129 15:41:36.347868 111173 geometry.cpp:1243] Using EMBREE layout.
I1129 15:41:41.252265 111173 camera.cpp:534] Detected camera inside volume.
I1129 15:41:41.252286 96525 camera.cpp:534] Detected camera inside volume.
I1129 15:41:41.252349 111173 tables.cpp:37] Total 1 lookup tables.
I1129 15:41:41.252365 111173 light.cpp:1176] Total 9 lights.
I1129 15:41:41.252408 111173 light.cpp:1155] Number of lights sent to the device: 9
I1129 15:41:41.252418 111173 light.cpp:1157] Number of lights without contribution: 0
I1129 15:41:41.252431 111173 light.cpp:850] Automatically set World MIS resolution to 512 by 256
I1129 15:41:42.425298 111173 light.cpp:363] Total 6757306 of light distribution primitives.
Segmentation fault

I don’t have a clue what could be the problem. I want to simplify the scene, but it’s quite an endeavour, so I want to ask here first if there is anything in the log that could point me to the right direction.

1 Like

It will be very helpful if you attach your .blend file here. In the meantime, I think you are using an old build of the branch.

Thank you, I’ll update the branch.

I cannot upload the file unfortunately. It’s too big and you will need at least 128GB of RAM to open and render it. I want to simplify the scene and remove objects that are not contributing to the crash. If there are no traces where the problem lies I’ll do it manually. That’s not a big problem, it just takes some time.

If there are any tools for debugging that are not involving compiling Blender in debug mode that might be helpfull.

Wow! Thanks for these tests, they really do show what are the enhancements brought by MLS

Was the bug with IES fixed?

I tested a branch on scene with 20 lights and found that Ligth Tree works really well without IES, but with it become much noisy:

3min, no IES, no LT:

3min, no IES, with LT:

3min, IES, no LT:

3min, IES, with LT:

I believe the fix was just avoiding a crash with IES lamps, not in making sure the sampling is properly weighted.

Anyway, we are getting to the point where a new build of the branch is needed if the feedback here is to stay up to date (as there has been quite a few commits since the last one).

1 Like

The issue may be that we are not taking into account the IES file for energy estimation of lights, which is one of the to do items.

The render result also looks different but that may be light clamping?

3 Likes

Yes different look seems strange, but for all renders i used clamping = 30.

Okay, will wait for fix.

Clamping should be set to 0 to ensure consistent brightnesses between rendering with the light tree and rendering without.

1 Like

The effects of clamping depend on the variance of sampling.

With regular sampling you often get very high variance samples (i.e. fireflies) that correspond to difficult to find but bright paths. Clamping will reduce fireflies specifically because the brightness of these paths is hard-limited to some finite value, so what would be fireflies simply doesn’t get to be so bright. It’s an incredibly crude bandaid fix. Or really it’s more akin to an amputation. Hacking off the top end of the dynamic range in order to avoid some noise.
The image never quite converges to the limiting value that way, but it has been deemed good enough in lieu of better solutions.

These new improved sampling techniques (Many Lights Sampling, Path Guiding) may enormously reduce variance, being far more able to find relevant paths with relevant light contributions.
Instead of fireflies that would perhaps eventually converge after billions of samples, if that, they go towards “the correct” value more or less right away, potentially never exceeding the clamping threshold in the first place.

That’s why clamping will yield such different results with and without these new sampling techniques.

I think technically, since fireflies get reduced, clamping is impacting the image quality less overall now. Unless you end up getting caustics which can be incredibly bright even with a low variance. But it’s less of a problem precisely for the same reason it’s less of a solution: The situations it was most useful for simply won’t occur as much anymore going forward.

But anyway, the upshot is: If you want comparable results, don’t use clamping. Really you probably should attempt to not use it at all even without these advanced sampling methods, and then only very carefully activate it, finding a sweet spot where it has minimal impact on appearance but avoids fireflies. I suspect very few people actually do such careful tuning though.
But for the purpose of tests for this thread, it’s not a good idea even at very gentle settings

2 Likes

image
Just to spread the word :grinning:

22 Likes

And just so everyone knows. Many Lights Sampling has been temporary disabled while some issues are being investigated. rB0808eaf44e81

6 Likes

Thanks for the note, I think they believe they fixed the issues and the light tree reenabled.

Hello, everyone. I saw that MLS was fixed and added to the master build. Where can I download that version for testing? :innocent: