PhotonGI cache

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

lacilaci wrote: Fri Feb 15, 2019 11:03 am I get cache fireflies just as before, sometimes even with very hight numbers for photons and sadly sometimes even with large lookup.
It is me or they happens only if you use long path depths ? I'm able to get them if I use a path depth like 32 but not with 4-8.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Dade wrote: Fri Feb 15, 2019 11:09 am
lacilaci wrote: Fri Feb 15, 2019 11:03 am I get cache fireflies just as before, sometimes even with very hight numbers for photons and sadly sometimes even with large lookup.
It is me or they happens only if you use long path depths ? I'm able to get them if I use a path depth like 32 but not with 4-8.
I get them with 8 too, but seems they are less accumulated. However still clearly visible once rendering starts clearing up.
Attachments
fireflies8depth.jpg
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

I tried even 250mil photons with 8 depth... and it almost seems clean but there is still a small firefly randomly appearing.

More photons is not a good way to go against fireflies cause you need insane numbers and still might get some firefly appearing.

250mil photons preprocess time 165 seconds:
250mil_165s.jpg
2.5mil photons preprocess time 5 seconds:
2point5mil_5s.jpg
Also they get stronger with higher depth of photons but also with higher path depth!
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

Ok, I think to have finally understood the problem. Look at this debug rendering:

debug2.jpg

The rays shots trough hemisphere over A will hit many cache entries and average them producing the correct result. While rays shots trough hemisphere over B will mostly (nearly half of them) hit a single cache entry on the side wall. Now if you have a spike like in this image, with a bright cache entry on the side wall, you will end with a bright splotch in B (and in points near B).

Tracing more photons and having less spikes can help. There can be also other options like interpolating and/or filtering cache entries but they are all palliatives: you can always pick a B point near enough to have some problem.

However, we have already the solution to this kind of problems and it is the V-Ray-like "retrace" parameter. Just Increase the value and if B is too near the side wall, brute force path tracing will kick in and there will be not splotch.

This is a rendering with path.photongi.indirect.usagethresholdscale = 0.0:

retrace0.jpg

and this with a value of 4.0:

retrace4.jpg

I have increased the default value to 4 (was 2). So, if you have color leaks in corners, increase the path.photongi.indirect.usagethresholdscale parameter and you should be fine.

Remember also that it is a scale factor of the look up radius (so if you cut the radius in half you have to double path.photongi.indirect.usagethresholdscale to obtain the same result).
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

Dade wrote: Fri Feb 15, 2019 1:20 pm path.photongi.indirect.usagethresholdscale
@B.Y.O.B. can you add this parameter to BlendLuxCore :?:
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Ok, so to a certain degree it clearly helps to increase the retrace threshold scale... but even in your example with value of 4 it looks like a strong leak in the upper corner of the room. I'm not sure if that is supposed to be there.

I'll play around with the value once Simon exposes it in blender...
But adding another parameter to help combat issues is again putting more work for the user. And it's just more permutations to figure what works on per scene basis. Or do you think a safe defaults can be created?

Another reason (other than lazy and noob users like me) for finding a better way to get rid of fireflies is exactly that very safe defaults could be made! Very moderate and fast preprocess values can produce very high quality lighting, if we didn't have to watch out for splotches, you could input some basic defaults that don't have to be touched until animating(at which point you could have a multiplier to controll all the values for stabilization purposes)
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI cache

Post by B.Y.O.B. »

Dade wrote: Fri Feb 15, 2019 1:46 pm
Dade wrote: Fri Feb 15, 2019 1:20 pm path.photongi.indirect.usagethresholdscale
@B.Y.O.B. can you add this parameter to BlendLuxCore :?:
Yes, I'll do it tonight.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Dade wrote: Fri Feb 15, 2019 1:20 pm
I have increased the default value to 4 (was 2). So, if you have color leaks in corners, increase the path.photongi.indirect.usagethresholdscale parameter and you should be fine.

Remember also that it is a scale factor of the look up radius (so if you cut the radius in half you have to double path.photongi.indirect.usagethresholdscale to obtain the same result).
So I'm testing the latest build with those changes, and while it works at some places, it also seems that when I get splotches now they're even bigger (at the same lookup radius)EDIT: might also be different settings, can't make comparison now

I'm gonna wait until it's exposed in blender to make sure that's the case... But as of now, they're just as hard to get rid of as before. Which is mostly situation based, so while even in complex situation lighting looks correct, those splotches randomly appear and I need to readjust settings.
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

Hope we will get out of theses artefact and sploches problem but in an elegant way. not with cumbersome settings. it is certainly hard but we have to take the time to do it right because the gain deserve it by far.
thanks for all the effort put inside this magic box ;)
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Sharlybg wrote: Fri Feb 15, 2019 5:29 pm Hope we will get out of theses artefact and sploches problem but in an elegant way. not with cumbersome settings. it is certainly hard but we have to take the time to do it right because the gain deserve it by far.
thanks for all the effort put inside this magic box ;)
Maybe even those settings would be ok, but I sometimes get those splotches even in well adjusted setting. Like a random sky reflection in corner etc... and if it's a single splotch and weak, you might end up spotting it late in rendering process which might be a problem.
Post Reply