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 »

provisory wrote: Sun Mar 03, 2019 12:29 pm Don't you think, an improved, more noise based adaptivity could handle this (too)?
I have just cut (aka biased) the main source for that fireflies, I'm getting quite good results:

glossy.jpg

with roughness 0.05. This is an interesting debug rendering:

debug.jpg

in red are the pixels done with brute force path tracing while in blue the one with PGI cache. I'm eveluating the idea to take in acount not only the distance from the last bounce but also the angles :idea:

P.S. ray differentials would be very handy here.
Support LuxCoreRender project with salts and bounties
kintuX
Posts: 809
Joined: Wed Jan 10, 2018 2:37 am

Re: PhotonGI cache/ High Gloss, Reflective Surface?

Post by kintuX »

:? Aren't high gloss (reflective) surfaces producing caustics rather than directly adding to GI (ambient lighting). At least on first couple of bounces over high gloss, then as "caustics" disperse further (more and more, up to a certain value/threshold?) they start adding to GI.

From observations, such situations can be experienced in shade near large water body areas (seaside, lake, river shore) or on film/photography sets. When sun light hits the reflective water surface at just the right angle (fresnel plays a huge roll here) tiny waves act as concave mirrors/reflectors which concentrate light into beams bouncing into shade and over glossy surfaces which propagate that energy further until "concentrated E" gets dispersed enough, adding to GI. Thus, IMO, there's no need to account bounced light from glossy surfaces with values below 0.03.

BTW (for interested) there's no pure glossy surface in existence.
& We all constantly approximate to certain level of tolerance, optimized for intended tasks.

This "cache" development looks very promising. 8-)

PS
Oh, yes i forgot about convex glossy/reflective surfaces, which directly add to GI because of light/Energy dispersion. Even, if pure glossy surface like mirror.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Dade wrote: Sun Mar 03, 2019 9:29 pm
Sharlybg wrote: Sun Mar 03, 2019 7:56 pm But just wonder if we cann't pick something fron this to add on top of PGI ? a kind of hybrid ?
The data collected by tracing photons are a gold mine: at the moment I'm in doubt between a new version of visibility map for infinite lights or guided brute force path tracing (we current sutff is done). A newer DLSC version is possible too.

It is a bit funny but now that computing indirect light is insanely fast ... we need new/better ways to accelerate direct light sampling :!:
Yes please, current dlcs produces artifacts and is unreliable. If that would be fixed that would be amazing!
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics »

Dade wrote: Sun Mar 03, 2019 9:29 pm The data collected by tracing photons are a gold mine: at the moment I'm in doubt between a new version of visibility map for infinite lights or guided brute force path tracing
Guided brute force path tracing would be unbiased, right?
Maybe an alternative to caustic cache with its grainy<>blurry problem needing manual adjusting.
An unbiased guided render would progressively converge while the direct implementation of a caustic cache needs a proper photon count/distribution managed beforehand because it will not improve once computed.
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

I have just cut (aka biased) the main source for that fireflies, I'm getting quite good results:
you ____ are___ the___ man

this is art :shock:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

Ok this is the final result with roughness 0.051:

glossy.jpg

I have lower the default value of glossiness threshold (i.e. path.photongi.indirect.glossinessusagethreshold) from 0.2 to 0.05. This can significantly boost the performance on some scene with large glossy surfaces.

I have increased the "retrace" parameter (i.e. path.photongi.indirect.usagethresholdscale) from 4.0 to 8.0 (the net result is exactly the same because before was 0 or 1 while now it is a blend between 0 and 1).

I have also introduced a new debug mode:

Code: Select all

path.photongi.debug.type = showindirectpathmix
It shows in red the pixels where brute force path tracing is used and in blue where cache it is:

debug.jpg

I pushed the patch few minutes ago. Give it a spin.
Support LuxCoreRender project with salts and bounties
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: PhotonGI cache

Post by marcatore »

Dade, it seems a great result!

I'll check as soon as I can
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

I have also introduced a new debug mode:
Would be nice to switch between debug mod and normal rendering.
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 »

Looks great, what's next? Do you think an autofill and autosize cache would be doable?
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: Mon Mar 04, 2019 11:22 am Looks great, what's next? Do you think an autofill and autosize cache would be doable?
Yes, it may be the next target: some type of convergence condition.
Support LuxCoreRender project with salts and bounties
Post Reply