Light strategies and importance change lighting

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Light strategies and importance change lighting

Post by lacilaci »

I always thought that light strategy only change how lights are sampled. So for example some lights can be noisier when undersampled.

However clamping with low values also kills lights with low importance either due to light strategy or if you manually change importance.

Now I understand that this might be the nature of how clamping works in luxcore. But maybe this could be avoided

For example, if I use logpower and low clamping, my strong lightsource(sun) is going to appear much dimmer (respectively with power light strategy and low clamping values, weak lights get killed off)

But if I then set sun importance to 10 for example, I get my sun power back to normal in rendering but the performance is still great.

So the question is, can there be a fix for clamping so that it doesn't change lighting contribution for lights with lower importance? This could make lower clamp values work very well for certain cases.

some examples and testscene here: viewtopic.php?f=2&t=619&start=110
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light strategies and importance change lighting

Post by Dade »

No without some type of warmup with rejection of samples during that period or some additional memory storage.

A solution that may be worth trying is the BCD spikes removal option without the denoiser part. It uses a samples histogram (i.e. the additional memory I was talking about) to reject samples in the "high" band of the histogram (i.e. fireflies).

It should be very effective without requiring an hand defined clamp values (i.e. the most significative advantage) at cost of memory storage (i.e. an histogram for each pixel requires a significative amount of ram at high resolutions.

Short version: there are no free lunch, or we spend performances (trowing away initial samples), or we spend ram (i.e. histogram), or nothing but we have to hand tune the clamping value.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Light strategies and importance change lighting

Post by lacilaci »

Dade wrote: Sun Dec 09, 2018 11:02 pm No without some type of warmup with rejection of samples during that period or some additional memory storage.

A solution that may be worth trying is the BCD spikes removal option without the denoiser part. It uses a samples histogram (i.e. the additional memory I was talking about) to reject samples in the "high" band of the histogram (i.e. fireflies).

It should be very effective without requiring an hand defined clamp values (i.e. the most significative advantage) at cost of memory storage (i.e. an histogram for each pixel requires a significative amount of ram at high resolutions.

Short version: there are no free lunch, or we spend performances (trowing away initial samples), or we spend ram (i.e. histogram), or nothing but we have to hand tune the clamping value.
Or to preserve how strong lights appear and not get them killed off by lightstrategy and clampling, don't clamp direct lighting... Free lunch

Also, take a look at this extreme case. Doesn't it look more properly clamped with tweaked importance(based on light power)? And if on top of it we wouldn't clamp direct lighting, it would be pretty fast and close to unclamped(visually), don't you think? Of course, I intentionally used very low value, could do much better with something between 25-100, which is still pretty low to give a nice boost in perf.

Actually, looking at those pictures it could be interresting to see how default logpower with clamping only indirect light could look....
Attachments
clamp5_importance10vspoint1.jpg
clamp5.jpg
unclamped.jpg
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Light strategies and importance change lighting

Post by Racleborg »

hand tune the clamping value.
I am finding this to be the best option. (letting it breath as much as possible)

In the Suggested Clamp Value switch, it does say that it is only a starting point.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Light strategies and importance change lighting

Post by Racleborg »

BCD spikes removal option without the denoiser
How do I set this up so that the denoiser only effect the fireflies?

Thanks
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light strategies and importance change lighting

Post by Dade »

Racleborg wrote: Mon Dec 10, 2018 2:20 pm
BCD spikes removal option without the denoiser
How do I set this up so that the denoiser only effect the fireflies?
It is an option I have to add but it should be pretty easy.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Light strategies and importance change lighting

Post by lacilaci »

Racleborg wrote: Mon Dec 10, 2018 2:20 pm
BCD spikes removal option without the denoiser
How do I set this up so that the denoiser only effect the fireflies?

Thanks
Why not use clamping? BCD eats a ton of memory and thus limits severely how big your renders can be.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Light strategies and importance change lighting

Post by Racleborg »

Why not use clamping? BCD eats a ton of memory and thus limits severely how big your renders can be.
I thought that if just the fireflies could be removed, then the overall average of brightness could then be greater.

But I'm just guessing as it's all a huge learning curve for me.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: Light strategies and importance change lighting

Post by Racleborg »

Dade
It is an option I have to add but it should be pretty easy
I think that would be cool!

Thank you
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Light strategies and importance change lighting

Post by lacilaci »

Racleborg wrote: Mon Dec 10, 2018 3:35 pm
Why not use clamping? BCD eats a ton of memory and thus limits severely how big your renders can be.
I thought that if just the fireflies could be removed, then the overall average of brightness could then be greater.

But I'm just guessing as it's all a huge learning curve for me.
Here's what you have to do, or could try. Use clamping value of 100 000 (in case you are using sun for example) and if you are still seing fireflies, lower clamping value until you don't see fireflies and/or image starts to look weird(compared to unclamped). If you are using sun, and also some glass or water type of material that is visible by camera and sun, you might want to disable specular visibility in sun properties in blender.

If you are still seeing some fireflies you might want to check that you are not using oversaturated or too bright materials(that would try to reflect 100% of color or brightness) and/or just post example in the forum to be sure. I do think (personal opinion incoming) that using BCD for just fireflies is overkill and should be avoided at all times due to performance and being too heavy on resources.

Clamping works well if you use high enough values, I personally just abuse it too much cause I think that something is terribly boken with, mainly and I'm trying to convince Dade that direct light doesn't really need to be clamped no one needs it.
Post Reply