PhotonGI cache

Discussion related to the Engine functionality, implementations and API.
User avatar
epilectrolytics
Donor
Posts: 218
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics » Mon Feb 11, 2019 12:25 pm

lacilaci wrote:
Mon Feb 11, 2019 12:08 pm
I'd like to have cache small but as high quality as possible, no random colors and dark spots etc... or maybe a step between cache and rendering to correct some samples.
I agree, if the cache could be optimised like deleting unneeded entries in dense areas or something that would reduce RAM occupation and increase render speed.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC Ryzen 2700X, RTX 2070, GTX 1060

User avatar
Dade
Developer
Posts: 1913
Joined: Mon Dec 04, 2017 8:36 pm

Re: PhotonGI cache

Post by Dade » Mon Feb 11, 2019 12:30 pm

epilectrolytics wrote:
Mon Feb 11, 2019 12:25 pm
lacilaci wrote:
Mon Feb 11, 2019 12:08 pm
I'd like to have cache small but as high quality as possible, no random colors and dark spots etc... or maybe a step between cache and rendering to correct some samples.
I agree, if the cache could be optimised like deleting unneeded entries in dense areas or something that would reduce RAM occupation and increase render speed.
This is going to be fixed with the accumulation of photons on visibility points (and not on 1 out of 10 random photon hit points). For indirect cache, caustic cache is a totally different beast.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1913
Joined: Mon Dec 04, 2017 8:36 pm

Re: PhotonGI cache

Post by Dade » Mon Feb 11, 2019 1:03 pm

lacilaci wrote:
Mon Feb 11, 2019 10:25 am
here... Different lighting but same problem
Just switch off photongi or switch to opencl and compare results
00_concept_lux.zip
There are 2 problems:

1) The path tracing max. depth is set to 16 while the PhotonGI max. depth is set to 4. Use the same value in order to reduce the difference (and 16 is a LOT, 8 is a bit more reasonable). Indeed, smaller values will transport less light.

2) This is your direct light cache:

direct.jpg

I mean, no surprise the result is darker. Blender is still not outputting direct light cache settings (viewtopic.php?f=5&t=840&start=170#p9653). Anyway I'm going to unify direct and indirect cache so the problem will be fixed at root. None uses direct light cache anyway and it is useful only to build indirect cache.
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 782
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci » Mon Feb 11, 2019 1:17 pm

Dade wrote:
Mon Feb 11, 2019 1:03 pm
lacilaci wrote:
Mon Feb 11, 2019 10:25 am
here... Different lighting but same problem
Just switch off photongi or switch to opencl and compare results
00_concept_lux.zip
There are 2 problems:

1) The path tracing max. depth is set to 16 while the PhotonGI max. depth is set to 4. Use the same value in order to reduce the difference (and 16 is a LOT, 8 is a bit more reasonable). Indeed, smaller values will transport less light.

2) This is your direct light cache:


direct.jpg


I mean, no surprise the result is darker. Blender is still not outputting direct light cache settings (viewtopic.php?f=5&t=840&start=170#p9653). Anyway I'm going to unify direct and indirect cache so the problem will be fixed at root. None uses direct light cache anyway and it is useful only to build indirect cache.
I tried higher photon depth and it did reduce the difference but not by much...
So do I understand it right that you're building direct light cache to then build indirect light cache from it?

User avatar
epilectrolytics
Donor
Posts: 218
Joined: Thu Oct 04, 2018 6:06 am

Re: PhotonGI cache

Post by epilectrolytics » Mon Feb 11, 2019 1:19 pm

Dade wrote:
Mon Feb 11, 2019 12:30 pm
This is going to be fixed with the accumulation of photons on visibility points (and not on 1 out of 10 random photon hit points). For indirect cache, caustic cache is a totally different beast.
Great, sounds like another welcome speedup!
:D
Dade wrote:
Mon Feb 11, 2019 1:03 pm
1) The path tracing max. depth is set to 16 while the PhotonGI max. depth is set to 4. Use the same value in order to reduce the difference
Would it make sense to use PT maxdepth automatically for PGI in order to avoid confusion?
Also for caustic cache and specular bounces.
Or are there cases where different path depths would make sense?
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC Ryzen 2700X, RTX 2070, GTX 1060

User avatar
B.Y.O.B.
Developer
Posts: 2111
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PhotonGI cache

Post by B.Y.O.B. » Mon Feb 11, 2019 1:29 pm

Dade wrote:
Mon Feb 11, 2019 1:03 pm
Blender is still not outputting direct light cache settings (viewtopic.php?f=5&t=840&start=170#p9653).
I thought I fixed that problem?
https://github.com/LuxCoreRender/BlendL ... ig.py#L340
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 782
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci » Mon Feb 11, 2019 1:30 pm

epilectrolytics wrote:
Mon Feb 11, 2019 1:19 pm

Would it make sense to use PT maxdepth automatically for PGI in order to avoid confusion?
Oh, this would be good.. anything that removes editable parameters is good :D

User avatar
Sharlybg
Donor
Posts: 1009
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: PhotonGI cache

Post by Sharlybg » Mon Feb 11, 2019 2:03 pm

Anyway I'm going to unify direct and indirect cache so the problem will be fixed at root. None uses direct light cache anyway and it is useful only to build indirect cache.
Automated algo behind the scene will avoid a lot of headache for user and also help Devs not to have to expalain again and again what is running under the hood.
It will also help to have very good experience while working with Luxcore.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

User avatar
Dade
Developer
Posts: 1913
Joined: Mon Dec 04, 2017 8:36 pm

Re: PhotonGI cache

Post by Dade » Mon Feb 11, 2019 2:37 pm

B.Y.O.B. wrote:
Mon Feb 11, 2019 1:29 pm
Dade wrote:
Mon Feb 11, 2019 1:03 pm
Blender is still not outputting direct light cache settings (viewtopic.php?f=5&t=840&start=170#p9653).
I thought I fixed that problem?
https://github.com/LuxCoreRender/BlendL ... ig.py#L340
I guess I was using and older BlendLuxCore version.

This is what I working on, an old debug rendering:

old.jpg

A new code using regular visibility points:

new.jpg

The light intensity is a lot more uniform and smooth, thanks to the uniform distribution the cache look up is also 2 times faster (check the samples/sec) and independent from number of photon traced or look up radius. The pre-processing is also a lot faster.

P.S. this starts to looks exactly like a V-Ray output...
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 782
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci » Mon Feb 11, 2019 2:40 pm

Dade wrote:
Mon Feb 11, 2019 2:37 pm
B.Y.O.B. wrote:
Mon Feb 11, 2019 1:29 pm
Dade wrote:
Mon Feb 11, 2019 1:03 pm
Blender is still not outputting direct light cache settings (viewtopic.php?f=5&t=840&start=170#p9653).
I thought I fixed that problem?
https://github.com/LuxCoreRender/BlendL ... ig.py#L340
I guess I was using and older BlendLuxCore version.

This is what I working on, an old debug rendering:


old.jpg


A new code using regular visibility points:


new.jpg


The light intensity is a lot more uniform and smooth, thanks to the uniform distribution the cache look up is also 2 times faster (check the samples/sec) and independent from number of photon traced or look up radius. The pre-processing is also a lot faster.

P.S. this starts to looks exactly like a V-Ray output...
Oh, yes.. That looks really nice!

Post Reply