Page 103 of 109
Re: PhotonGI cache
Posted: Sun Aug 18, 2019 3:06 pm
by Dade
happyboy wrote: ↑Tue Aug 13, 2019 1:28 am
Dade wrote: ↑Mon Aug 12, 2019 1:09 pm
The sample size is very wrong, I guess I forgot to update the value, it should 4 (unable to check the code at the moment). It is the number of samples required for each path vertex and +3 suggests it uses 4 values at the moment.
Thank you, alpistinho & Dade!
I'll use my own fix for now and wait for Dade back from holiday
I should have fixed the problem.
Re: PhotonGI cache
Posted: Wed Aug 21, 2019 12:06 pm
by happyboy
Dade wrote: ↑Sun Aug 18, 2019 3:06 pm
I should have fixed the problem.
It still crashes...you increased sampleStepSize, so sampleSize and sampleOffset increased in the same way?
Re: PhotonGI cache
Posted: Wed Aug 21, 2019 1:41 pm
by Dade
happyboy wrote: ↑Wed Aug 21, 2019 12:06 pm
It still crashes...you increased sampleStepSize, so sampleSize and sampleOffset increased in the same way?
Yes, look at the code:
Code: Select all
// Request the samples
const u_int sampleBootSize = 5;
const u_int sampleStepSize = 4;
const u_int sampleSize =
sampleBootSize + // To generate eye ray
params.maxPathDepth * sampleStepSize; // For each path vertex
[...]
const u_int sampleOffset = sampleBootSize + depthInfo.depth * sampleStepSize;
I have also run the code with some additional assert() to check the requested sample indices.
So if it still crash it should be something different, just re-run the new code under a debugger and post where the crash is.
Re: PhotonGI cache
Posted: Thu Aug 22, 2019 6:11 am
by happyboy
Dade wrote: ↑Wed Aug 21, 2019 1:41 pm
So if it still crash it should be something different, just re-run the new code under a debugger and post where the crash is.
My bad! for some reason the old version sits in the PATH before the new version so I was testing the old version ...
Now it doesn't crash anymore. Tried to render 10+ times. Thanks!!!
And looking closer at the code, I understood your fix: since depth starts from 0 instead of 1, sampleSize is always at least 4 larger than sampleOffset, so it will not crash at that point.
Re: PhotonGI cache
Posted: Tue Sep 10, 2019 9:21 am
by provisory
Is it a known issue or maybe intentional that PGI doesn't work on Mix Material, even if the mixed materials would work in themselves?
Re: PhotonGI cache
Posted: Tue Sep 10, 2019 12:02 pm
by epilectrolytics
provisory wrote: ↑Tue Sep 10, 2019 9:21 amPGI doesn't work on Mix Material
Noticed that too.
Re: PhotonGI cache
Posted: Wed Sep 11, 2019 2:03 pm
by Dade
provisory wrote: ↑Tue Sep 10, 2019 9:21 am
Is it a known issue or maybe intentional that PGI doesn't work on Mix Material, even if the mixed materials would work in themselves?
It should work but depends a lot on what you are mixing: there are parameters like glossiness or if a material is only DIFFUSE/GLOSSY/SPECULAR, etc. that may disable PhotonGI. For instance, if you mix "matte" with "mirror, PGI will disable indirect cache on that material because it can be "SPECULAR".
If you post a test scene, I can tell you what is going on.
Re: PhotonGI cache
Posted: Wed Sep 11, 2019 4:55 pm
by lacilaci
I have this idea that might be a bit stupid but maybe not:
Would it be possible to control after how many bounces is photongi used? Maybe this would help with some reflection artifacting or leaks?
So maybe have 1 or 2 bounces brute force and afterwards sample from cache(a control exposed to the user).
The reason is that sometimes luxcore performs well in interior even without photongi but some areas are a bit "too deep" in terms of gi so they could benefit from photongi. However enabling cache might bring some artifacting even to areas which were ok and fast before. So I have to pick between artifacts and speed...
In my head I think this could help protect areas exposed to few bounces but still give speedup for hard to reach areas.
Re: PhotonGI cache
Posted: Wed Sep 11, 2019 4:56 pm
by provisory
Dade wrote: ↑Wed Sep 11, 2019 2:03 pm
If you post a test scene, I can tell you what is going on.
Here you go and Thanks!
(I know, that there is no point in mixing Glossy with Matte. It came up in this topic:
viewtopic.php?f=4&t=1372)
Re: PhotonGI cache
Posted: Thu Sep 12, 2019 7:42 am
by Dade
provisory wrote: ↑Wed Sep 11, 2019 4:56 pm
Dade wrote: ↑Wed Sep 11, 2019 2:03 pm
If you post a test scene, I can tell you what is going on.
Here you go and Thanks!
(I know, that there is no point in mixing Glossy with Matte. It came up in this topic:
viewtopic.php?f=4&t=1372)
Ok, the problem was that mix (and glossycoatting) report their glossiness as Min() of the referenced materials and any not GLOSSY material report a glossiness of 0.0: so the result when mixing not glossy materials was always 0.0 (and PGI was disabled).
I should have fixed the problem: now only the glossiness of GLOSSY materials is taken in account and this should fix the problem for mix (and glossycoatting).