Cycles Development Updates

I dream Cycles with the multi-light management like in Corona !! :heart_eyes::heart_eyes::heart_eyes:

4 Likes

Quick testing of Many Light Sampling GSoC project:
https://en.blender.org/index.php/User:Erikenglesson/GSoC_2018/Proposal
Light Tree OFF:


Light Tree ON:

I thought that with this project we would get good results when really a lot of lamps or light sources were used. But this scene only has 4 Area lamps and Sun. The grain with Light Tree ON is much finer.
(Clamp indirect = 10 in both renders)

Edit:
More with Sponza scene. Here there is only Sun Lamp and World.
Light Tree OFF:


Light Tree ON:

So I’m not sure if the good result I get with a few lamps is because this project is really great, or a bad configuration of my part (I can not find that slider that Proposal project mentions)

4 Likes

Great to know how the Light Tree is benefiting in real world cases, even in scenes with as few as two light sources.

My guess is that the benefit will only increase the more sources of light you add to the scene. An interior scene with many lighting fixtures would probably benefit the most (boosting an area that Cycles has been the weakest in).

Looking forward to this addition. If images are cleaner in less time it could be enabled by default. Now I wonder if it would be possible to use a smarter way of choosing which lights get sampled as presented in this paper from Siggraph 2018?
http://cgg.mff.cuni.cz/~jaroslav/papers/2018-bayes-directlight/2018-bayes-directlight-paper.pdf

Not all is good news. Here in Classroom scene it introduces much more noise with Light Tree enabled:
Light Tree OFF:


Light Tree ON:

(100 samples, 50% original size)
So I’m not sure why that happens.
Edit:
Apparently something strange happens with Area Lamp called “exterior_fillLight” outside the window. So maybe the problem is simply something that is not yet supported.

Edit 2:
Looking for GSoC reports, I’ve seen that Erik knows about Classroom problems:
https://lists.blender.org/pipermail/soc-2018-dev/2018-August/000169.html

1 Like

If i do remind correctly, the lightree is suposed to be for renders with many (distant) lightsources.
And somehow picks the most relevant light sources (those nearby who should have most effect).
So if you would render a street, perhaps with some cars and streetlights and houses then the effect of distant lights and nearby lights would be of greater effect. (think of renderings of larger environments).
Currently rendering frays dont favour nearby lights (equal? chance)

Even for the classroom i think its not the case (but i dont know of any standard test file having such a light setup yet)

There were early tests showing a bunch of spotlights in a grey room and the light tree at that time gave a major boost in the rate of convergence. It’s supposed to work with all lights to improve convergence, not just distant ones.

Somehow though, the light tree is screwing things up in the Classroom scene. To Yafu, is there also a sampling regression if the light outside the windows comes from the environment rather than an area lamp?

It improves if I eliminate that area lamp and meshes acting as light portals.
But that’s not the only problem. It is a complex lighting scene for my poor understanding. Some lamps have few Max Bounces configured, there are some meshes with nodes materials acting as portals. The problem is not only the difference in noise, there are also differences in lighting. Sun lamp illuminates with much difference in intensity compared between Light Tree enabled and disabled.
So I guess some developer can better analyze that scene to determine if there is a bug with the GSoC project, or if it is the problem due to something else.

Edit:
Looking for GSoC reports, I’ve seen that Erik knows about Classroom problems:
https://lists.blender.org/pipermail/soc-2018-dev/2018-August/000169.html

Yes that’s correct as far as I remember too. A good example of the perfect scene is a hallway with multiple wall lights down the corridor. The lights closest to the sample point are given priority. The light tree determines which lights are closest to the current sample point. Lights farther down the corridor contribute much less to the sample point so they won’t get sampled as often. The overall effect is less noise. Remember that noise is cause by one pixel getting shaded brightly right next to a pixel that was shaded darkly (obviously). So, this can be caused by sampling one of the light way down the corridor that contributes very little to the actual shading.

If you think of it this way, it helps to understand why it works even if you only have two or three lights:

Currently, when a point is being sampled, Cycles randomly chooses one of the lights from the scene to figure out what the light value is at that point. So, in the teapot achvis scene above, what if the light that it picked was outside? Not a lot of influence obviously. Lots of samples are taken per pixel and some of them randomly pick the light that’s closest to the point but since it’s random, maybe not. So, this shows up as noise.

But with a light tree, it can identify which lights are closest to the sample point and bias the sampling toward those lights. Or in the case above, probably the one light that contributed the most to that sample point.

So, it’s not so much that it helps with many lights as it is that it helps with many lights that are spread out over the scene. Distant lights might contribute very little so they are ignored.

I’m curious to see what happens in the case of sun lights. Because they don’t actually have a position so to speak, but rather a direction.

Hi.
Erik did tests with interior scenes. I should have looked for the GSoC reports first :roll_eyes:
https://lists.blender.org/pipermail/soc-2018-dev/2018-August/000169.html
There he mentions about Classroom being complicated scene.

Can someone share a windows build with many light sampling additions?

it would be nice if someone tested a long hallway with this, just simple few chairs in or so

Hi. Share the scene here (.blend file) and I can perform the renders.

HALLWAY.blend (1.1 MB)

HALLWAY

Maybe the white red green bleu light makes it easier to spot how the sampling goes.
The scene is very simple, hall chairs and some monkeys.

Although maybe it has to be done on a larger scale (street with cars or so, I don’t know).

A little less noise, more render time.
LT OFF


LT ON

__
LT OFF - No Clamp - 200 samples

LT ON - No Clamp - 200 samples

Anyway, if we are not developers maybe we should only do tests and describe what we see, without drawing conclusions. I understand that GSoC project does not necessarily have to be functional / usable to be successful.

Maybe handy for comparison
Normal blender 10.000 samples
HALLWAY2

just 1000 samples with denoiser, notice the loss of detail, of floor chair reflections
HALLWAY2

the difference is very small, flipping images in photoshop, the hall lighting is slightly different (Almost unnoticeable) the noise levels are nearly the same but slightly less. From your first two images, the blue lighted Suzane in the distance seems a tiny bit lighter. (looking at her left side skull).
Also a small difference in the first white spot how it is reflected on the floor, LToff shows more of a circle there.

But I don’t know if that’s good or wrong, both seem very realistic to me. I guess if render times are that close (and current code not optimized probably) then this might not be a good example render, or the method is not really practical for Blender. Maybe that hall should be longer and more lights.

Remarkable though, essential code changes and results are so close and with no errors.

The brighter image in the render with the Light Tree turned on could possibly be attributed to the better sampling. Remember that clamping tends to bias the image by dimming samples which then go into the accumulation buffer, so better sampling could help to counteract that a bit.

The hallway test is nice, but I’d imagine the many light sampling might fare even better with more lights.

Here is a test scene I cooked up a while ago to test branched path tracing vs path tracing:

BPT TEST-simple.blend (688.7 KB)

Perhaps some tests with over 100 lights might reveal some deeper benefits.

1 Like

Hi. Render on CPU.

Light Tree OFF - No Clamp - 500 Samples

Light Tree ON - No Clamp - 500 Samples

Longer render time but smaller size and more uniform grain, which is good for denoiser:

Light Tree OFF - No Clamp - 200 Samples - Denoiser

Light Tree ON - No Clamp - 200 Samples - Denoiser

5 Likes