Direct Light Sampling Cache (aka Light cache part I)

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

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by lacilaci » Fri Oct 05, 2018 3:32 pm

Time to be annoying again...
So, when can we expect some first version of Light cache part II? :D

User avatar
Sharlybg
Supporting Users
Posts: 885
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by Sharlybg » Fri Oct 05, 2018 3:44 pm

lacilaci wrote:
Fri Oct 05, 2018 3:32 pm
Time to be annoying again...
So, when can we expect some first version of Light cache part II? :D
Also Probably after more serious test done under DLCS so we don't burn steps .Or if another Devs come start to work on it on a separate branch. :D
Support LuxCoreRender project with salts and bounties

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

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by FarbigeWelt » Fri Oct 12, 2018 8:09 pm

Dade wrote:
Sun Jun 10, 2018 4:28 pm
Introduction

The only parameter you have to adapt for the scene is the "lightstrategy.entry.radius", it is the cache entry area of validity ad it is expressed in real word unit. So 0.15 means a 15 cm radius if you are rendering with 1m units.

All other parameters should be useful only to handle very specific cases and the default value should work fine for most scenes.
Well, it seems Depth is a useful parameter in a usual scene like this scetch of a bathroom. (I required asimpler scene than the actual scene to get faster results, looking for appropriate parameters.)
Comparison non DLC with DLC different depth.jpg
Comparison non DLC with DLC different depth
But even with Depth=12 there are some DLC artifacts. Maybe I should check with default Radius if artefact disappears.

EDIT
DLC Test, GPU, CPU Path and CPU BiDr.jpg
DLC Test, GPU, CPU Path and CPU BiDr
This time with Radius=0.15 and Depth=4. All other possibly indentical setting are identical for the mentioned render devices and engines.
  • GPU Path shows DLC artefact but CPU Path and CPU BiDir does not show artefact with the same settings.
    With CPU BiDirED bar above the mirror is brighter than the two bars in the shower .
    Ceiling spot lamp's Glossy spot at the wall is not visible with CPU BiDir but is visible with Path render.
    Green light of LED bar (white point lamps, irregular data color input for glass' transparancy) is not visible with GPU path and only slightly visible with CPU Path but is overall visible with CPU BiDir.
  • Why is there no DLC artifact with CPU Path?
    Why is LED bar white for GPU path?
    And why is ceiling spot lamp's cone barely visible with CPU BiDir?
    Why does the scene not appear green with Path?
Test DLC.zip
Test DLC
(797.15 KiB) Downloaded 11 times
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

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

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by Dade » Sun Nov 11, 2018 10:11 am

DLSC will now use not less than 512 samples for all env. light sources (but sun): infinite, constant infinite and sky2 light source. Most env. light sources are hard to sample and can lead to wrong cache entries. So LuxCore will now use not less than 512 samples for them.
Support LuxCoreRender project with salts and bounties

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by FarbigeWelt » Tue Nov 13, 2018 8:57 am

Dade wrote:
Sun Nov 11, 2018 10:11 am
DLSC will now use not less than 512 samples for all env. light sources (but sun): infinite, constant infinite and sky2 light source. Most env. light sources are hard to sample and can lead to wrong cache entries. So LuxCore will now use not less than 512 samples for them.
Thank you, this should be a welcome improvement.

Meanwhile I made some adjustments to the scene above. After labeling and sorting objects and materials I will post an update. Most important change, LED Bars have as less as possible lights, means the new scene comes with less than 25 lights overall. Object instances and particle system are very usefull. I.e. to change LEDs properties one needs to change only one object resp. emitting material.
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

User avatar
Sharlybg
Supporting Users
Posts: 885
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by Sharlybg » Tue Nov 13, 2018 9:09 am

DLSC will now use not less than 512 samples for all env. light sources (but sun): infinite, constant infinite and sky2 light source. Most env. light sources are hard to sample and can lead to wrong cache entries. So LuxCore will now use not less than 512 samples for them.
Thanks smart decision !
Support LuxCoreRender project with salts and bounties

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

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by FarbigeWelt » Wed Nov 14, 2018 11:30 am

FarbigeWelt wrote:
Tue Nov 13, 2018 8:57 am

Object instances and particle system are very usefull. I.e. to change LEDs properties one needs to change only one object resp. emitting material.
Short note: During optimization I‘ve run into two issues:
Blender hangs if view render is on CPU BiDir when pressing F12.
Group instance of severeal emitting planes emits light only at 2nd position. Group instances with one emitting plane always emits light.
After finalization of scene I will post it and check for and if new report these issues in github.
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Test DLC scene file

Post by FarbigeWelt » Thu Nov 15, 2018 12:14 am

LuxCoreRender 2.1 beta 2, Blender 2.79b, Windows 10 Pro

There are different layers in the file, but I think the file is still quite easy to use.

On layer [11] or alt+key 2, there is the object and its instance. The instance is showed completely in wireframe and solid but not in view render or final render F12. (I will open the issue in the next days.)

On layer [9] or key 0, there is an overview of the view used layers.

DLSC
On layer [0] or key 1, there is the Test DLSC scene, the shower room. I did not find a proper setting for the scene yet with DLSC enabled (beta 1).
You may render a CPU BiDir file without DLSC for comparison with GPU path with or without DLSC.

Side note: Clamping or light colors can be adjusted fast in a very tiny view render. If you get a few too bright spots in the thumbnail view you get them too and more in larger views. It is much fun to have CPU BiDir in view render since beta1 release. You may need to switch to wireframe or solid view before starting a final render.

EDIT: image added.
LED.Stripe.001 and .002 are disabled to limit number of lights to 19 what decreases DLSC start time..
Irregular Spectrum, GPU Path, DLSC shadow spots, 1.0 HD, clamp 1e4, 500 Samples.png
Irregular Spectrum, GPU Path, DLSC shadow spots, 1.0 HD, clamp 1e4, 500 Samples
Attachments
Test DLSC.zip
Test DLSC scene file
(399.74 KiB) Downloaded 9 times
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by FarbigeWelt » Thu Nov 15, 2018 8:12 am

EDIT1: Replaced pictures because of former incorrect labels.

Rerendered pictures without box around LED stripe and with open semi-sphere. This time triangles light is truely direct.
Irregular Spectrum, CPU Path, DLSC, open LED, Arch. Glass, 1.5 HD, 300 Samples.jpg
Irregular Spectrum, CPU Path, DLSC, open LED, Arch. Glass, 1.5 HD, 300 Samples
openCL
Irregular Spectrum, GPU Path, DLSC, open LED, Arch. Glass, 1.5 HD, 300 Samples.jpg
Irregular Spectrum, GPU Path, DLSC, open LED, Arch. Glass, 1.5 HD, 300 Samples
Do you see the differences in the pictures if you look at the light sources over the mirror?

EDIT2:
DLSC Settings.png
DLSC Settings
Of above path renders.
Tried a lot of different settings, some to improve speed, others to get rid of dark or bright spots.The settings here are currently the best I found for this scene.

For comparison, CPU BiDir Log Power.
Irregular Spectrum, CPU BiDir, 1.5 HD, open LED, Arch. Glass, 1.5 HD, 300 Samples, 4h17m.jpg
Irregular Spectrum, CPU BiDir, 1.5 HD, open LED, Arch. Glass, 1.5 HD, 300 Samples, 4h17m
But render time is much longer too.
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

User avatar
FarbigeWelt
Posts: 362
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Direct Light Sampling Cache (aka Light cache part I)

Post by FarbigeWelt » Mon Nov 19, 2018 12:27 pm

Finally, I observed the dark circle areas are related somehow to use of area lights. With point lights I found DLSC settings, most important are, for this scene, search radius 0.1 and entry angle 0.1 degree. Rendering is ongoing, I will post the result this evening.
Microsoft Windows 10 Professional, intel i7 4770K, 32 GB, AMD R9 290x 4 GB, AMD R9 390x 8 GB
Instagrammer, please join #luxcorerender for your renderings.

Post Reply