PhotonGI cache

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

Re: PhotonGI cache

Post by Dade »

lacilaci wrote: Thu Feb 14, 2019 5:50 am the whole floor has no samples, I wonder where is the issue with this
It is a huge bias, you loose all light reflected from the floor. To clarify:

1) normal matte Vs PGI matte => same output (should be but there may be a bug at the moment);

2) normal glossy Vs PGI glossy => more shining is the glossy and a bit more bias there is;

3) all other materials => huge bias;

Indeed, larger and more visible is the surface and larger will be the impact on the final output.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3104
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg »

Ok new test at the office this morning. on a i7 4930k (only 30% faster than the i7 2600). This time i turn floor roughness to 0.21 and remove the glossy coating for simple glossy.


PGI settings 10mn i7 4930k
Japan PGI Settings.jpg
PGI Cache 10mn i7 4930k
Japan PGI Cache.jpg
PGI 10mn i7 4930k
Japan PGI.jpg
PGI + OIDN 10mn i7 4930k
Japan PGI + OIDN.jpg
___________________________________________________________________
___________________________________________________________________


Pure Path 10mn i7 4930k

Japan Pure Path.jpg

Pure Path + OIDN 10mn i7 4930k

Japan Pure Path + OIDN.jpg
___________________________________________________________________
___________________________________________________________________


Some suggestion :

As we always need Milions of photon/ Max size can we make the settings easier for user ? So if tip 5 Blendluxcore convert to (5000k internally) so we get :

500 = 500000k
50 = 50000k
5 = 5000k
0.5 = 500k
0.05 = 50k

Also a possibility to switch between debug and true render while rendering.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
epilectrolytics
Donor
Donor
Posts: 814
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics »

Dade wrote: Thu Feb 14, 2019 10:18 am
lacilaci wrote: Thu Feb 14, 2019 5:50 am the whole floor has no samples, I wonder where is the issue with this
It is a huge bias, you loose all light reflected from the floor.
I don't get this.
During the photon cast there should be energy conservation of the photons.
Photons should bounce about all surfaces (no matter if those get cache entries later) in a physically correct way and therefore not losing energy.
Materials with low roughness reflection cause problems and therefore get no cache entries and are rendered via conventional path tracing which also accounts for all ways of light distribution.

I don't understand where an energy sink (light loss) can occur?
User avatar
Dade
Developer
Developer
Posts: 5675
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

epilectrolytics wrote: Thu Feb 14, 2019 10:59 am I don't get this.
During the photon cast there should be energy conservation of the photons.
Photons should bounce about all surfaces (no matter if those get cache entries later) in a physically correct way and therefore not losing energy.
Materials with low roughness reflection cause problems and therefore get no cache entries and are rendered via conventional path tracing which also accounts for all ways of light distribution.

I don't understand where an energy sink (light loss) can occur?
Any cache entry information must be view independent to be usable, any view dependent information is lost. A matte material will reflect the same amount of light form any position you look at it. A glossy material has view independent component (matte-like) and a view dependent component (the shiny highlight). The last part is "mostly" lost.

When you connect your current eye path with a cache entry, the ray can come from anywhere (that is why the cache entry can have only view independent information to be usable).
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5675
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

I should have finally fixed the darker output of PhotonGI. This is an old test rendering:

old.jpg

and this is the new one:

new.jpg

while this is the reference:

ref.jpg
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: Thu Feb 14, 2019 11:21 am I should have finally fixed the darker output of PhotonGI. This is an old test rendering:


old.jpg


and this is the new one:


new.jpg


while this is the reference:


ref.jpg
Oh, now I wish upload was before testing on azure :D
epilectrolytics
Donor
Donor
Posts: 814
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics »

Dade wrote: Thu Feb 14, 2019 11:15 am Any cache entry information must be view independent to be usable, any view dependent information is lost. A matte material will reflect the same amount of light form any position you look at it. A glossy material has view independent component (matte-like) and a view dependent component (the shiny highlight). The last part is "mostly" lost.
Ok I understand.
Not only when directly looking at a glossy surface with a cache the shiny part will be lost, but also bounced rays from the ceiling when hitting the ground will lose that shiny part and therefore appear darker.

Thanks for clarification!

Now the question is if some kind of compensation could be smuggled in ...
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

epilectrolytics wrote: Thu Feb 14, 2019 11:25 am
Dade wrote: Thu Feb 14, 2019 11:15 am Any cache entry information must be view independent to be usable, any view dependent information is lost. A matte material will reflect the same amount of light form any position you look at it. A glossy material has view independent component (matte-like) and a view dependent component (the shiny highlight). The last part is "mostly" lost.
Ok I understand.
Not only when directly looking at a glossy surface with a cache the shiny part will be lost, but also bounced rays from the ceiling when hitting the ground will lose that shiny part and therefore appear darker.

Thanks for clarification!

Now the question is if some kind of compensation could be smuggled in ...
Good question, last time I've seen corona's comparison with pure pathtracing and pt+uhd cache it was 1:1, if anything, cache gave a tiny bit more bounces to the result. Should be pretty much same story with vray's lightcache.
The biggest difference between those and luxcore (as far as I know) is that they trace from camera... For caustics, corona has now some new solver.
epilectrolytics
Donor
Donor
Posts: 814
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics »

epilectrolytics wrote: Thu Feb 14, 2019 11:25 am Now the question is if some kind of compensation could be smuggled in ...
The view dependent information is lost during path tracing, not photon tracing.
Knowing that there will be a loss of "directional energy" with rough reflections, could this be compensated for by introducing a corrective factor during the photon tracing that increases photon power according to specular color as some kind of anti-bias?
User avatar
Dade
Developer
Developer
Posts: 5675
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

epilectrolytics wrote: Thu Feb 14, 2019 11:25 am
Dade wrote: Thu Feb 14, 2019 11:15 am Any cache entry information must be view independent to be usable, any view dependent information is lost. A matte material will reflect the same amount of light form any position you look at it. A glossy material has view independent component (matte-like) and a view dependent component (the shiny highlight). The last part is "mostly" lost.
Ok I understand.
Not only when directly looking at a glossy surface with a cache the shiny part will be lost, but also bounced rays from the ceiling when hitting the ground will lose that shiny part and therefore appear darker.

Thanks for clarification!

Now the question is if some kind of compensation could be smuggled in ...
Like I wrote is "mostly" lost because I'm averaging the amount of light reflected by material over the entire hemisphere. This is the average of a constant value for matte, while for glossy is the average of different values. The "shiny" part of gloss is averaged over all the hemisphere (so energy is not lost, it just more "smooth").

If you want to study the problem, you can use indirect cache debug view. If it is not yet clear it is a complete rendering and it should match the output of a normal rendering (splotch-ness aside).

Look this is a rendering with a glossy with 0.0 diffuse and 0.95 specular, PGI rendering:

pgi.jpg

reference:

ref.jpg

See how PGI makes the surface look like a diffuse material while the reference is truly glossy. This is the bias introduced in this case however just look at other surfaces, the difference in indirect light is very small (and it is what PGI cache is used for).

Indeed, if all the right wall is black, the bias is huge.
Support LuxCoreRender project with salts and bounties
Post Reply