PhotonGI cache

Discussion related to the LuxCore functionality, implementations and API.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: PhotonGI cache

Post by lacilaci »

Another issue,

I started testing pgi on my office scene and I'm seeing a lot of reflections being cut short...
I've noticed this happening in every scene.
refl_cutoff.jpg
Only way to fix this seems to be using very high Usage threshold scale.
For example, lookup radius 10cm and usage threshold scale of 6 was used in the rendering.
To fix the reflection problem I had to use usage threshold scale of 16 (I only tried the fix on crop render so I don't know what's the performance penalty of using higher usage threshold)
Asticles
Donor
Donor
Posts: 171
Joined: Thu Jan 11, 2018 8:52 am
Location: Barcelona, Spain
Contact:

Re: PhotonGI cache

Post by Asticles »

What does this threshold do?

I feel we will need a good troubleshooting guide to use this feature.
Racleborg
Posts: 621
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: PhotonGI cache

Post by Racleborg »

The scene (attached) crashes every time with PGI on, and any scene I create with a MIX material like this, also crashes.


Thank you
Attachments
Mix Fail.blend
(489.09 KiB) Downloaded 152 times
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 22, 2019 5:34 pm
lacilaci wrote: Fri Feb 22, 2019 5:00 pm (reseted scale, shading, collapsed modifiers and turned ngons to triangles etc...) they just don't gather photons
It looks like another NaNs problem, I will check.
Surprisingly, it looks like the problem is in the geometry. First of all, it renders fine on the CPU while the problem is visible in OpenCL. This is because the (mysterious) reduced precision of the OpenCL code. If you check the geometry, you will see the object has 1 back face overlapped with the wall face (and there is a "Z fight" even inside Blender shaded view port). Than the front face is very near the back face. Deleting the back face and making an hole in wall face (so it is not near the front face) should fix the problem.
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 »

lacilaci wrote: Sat Feb 23, 2019 7:20 am So, why does the default normal angle kill so much of the light? 10° seems very low

90deg normal angle:
1min13_90deg.jpg
10deg normal angle:
1min13_10deg.jpg

10degree normal angle kills a lot of GI light and also seems to be darker than pathtracing only..
It may be exactly the opposite: floor will start to "borrow" light form perpendicular walls using a 90 deg angle so the image will start to gain too much light (instead of loosing them when using a 10deg angle).

This seems also suggested by the reference rendering with plain path tracing: https://github.com/LuxCoreRender/LuxCor ... erence.png

It is darker, not brighter.
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 »

lacilaci wrote: Sat Feb 23, 2019 8:58 am I started testing pgi on my office scene and I'm seeing a lot of reflections being cut short...
I've noticed this happening in every scene.

Only way to fix this seems to be using very high Usage threshold scale.
For example, lookup radius 10cm and usage threshold scale of 6 was used in the rendering.
To fix the reflection problem I had to use usage threshold scale of 16 (I only tried the fix on crop render so I don't know what's the performance penalty of using higher usage threshold)
Just leave the default parameters and mark the material of the floor as "not cached". It will fix the problem with a barely noticeable impact on rendering time.

Have you changed the default glossiness threshold ? I ask because looking at the floor, I'm quite sure it has a roughness lower than 0.2 (i.e. it is nearly a mirror).
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 »

Yes I did use glossines threshold at 0.0
Probably not a good idea.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: PhotonGI cache

Post by Dade »

Racleborg wrote: Sat Feb 23, 2019 10:52 am The scene (attached) crashes every time with PGI on, and any scene I create with a MIX material like this, also crashes.
This is somewhat expected, your scene includes a single cube and the material roughness is under 0.2 so it is marked as "cache disabled". So you entire scene doesn't include a single surface where cache is enabled and PhotonGI is useless.

I have modified the code so it will print a big "WARNING" for this case and will proceed rendering with normal path tracing.
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 »

epilectrolytics wrote: Thu Feb 21, 2019 6:30 pm Another visualisation of the problem the caustic cache has with infinite background light:
Took B.Y.O.B.'s dice file and replaced the area light with white background color:
(latest builds including photon merge, from Blender)
test.jpg
I'm getting exactly the same rendering (caustic aside) out of PathOCL+PhotonGI:

r1.jpg

and PathOCL:

r2.jpg

I'm using this light source:

Code: Select all

scene.lights.distl.type = distant
scene.lights.distl.color = 1.0 1.0 1.0
scene.lights.distl.gain = 10 10 10
scene.lights.distl.direction = 1 1 -1
Are you using a different type of light source ?
Support LuxCoreRender project with salts and bounties
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. »

I assume epilectrolytics is using a constantinfinite light.
Post Reply