[LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Announcement posts of new features and API changes
Forum rules
Note: Only Developers can open new threads in this forum, but users are encouraged to comment and provide Feedback on the presented features.
CodeHD
Developer
Developer
Posts: 504
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

[LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Post by CodeHD »

For the v2.11 release, I unified a different behavior between BiDir and Path+Light. Unless the settings are modified, this will lead to scenes rendering different (for Path+Light) when:
  • Shadow color is being used (i.e. it is not black)
  • Light-tracing is used
The BiDir engine is unchanged as its implementation was the reference.

The original problem, leading to the implementation in BiDir, was described in this forums post (with example images):
viewtopic.php?f=4&t=4219

The contrasting observation for Path+Light (with example images) was posted in this GitHub issue:
https://github.com/LuxCoreRender/LuxCore/issues/671

In the SDL, the syntax is as follows:

Code: Select all

scene.materials.MaterialName.transparency.shadowoverride = 1
Additional explanation:
The mechanism of shadow color is a biased technique, and using it leads to different behavior between path- and light-rays unless some explicit decision is made.
In case these paths are very similar, this just leads to double brightness. (See the linked original problem)
In case the paths are very different, there may be some merit for artistic applications. (See the linked GitHub Issue)

BlendLuxCore now features an "override" setting that allows light-tracing rays when the shadow color is not black.
With this setting, the present behavior of Path+Light can be restored, and likewise be achieved with BiDir.
shadowoverride.png
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: [LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Post by FarbigeWelt »

Thank you for your work. Maybe I will setup a test scene in the next days.
Maybe you remember the orange juice discussions a few years ago 😀
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
CodeHD
Developer
Developer
Posts: 504
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: [LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Post by CodeHD »

I don't specifically remember any discussions, but this scene was also on my mind as it had changed look since it was originally created. (It got brighter.)

However, during my test now, this new change had no impact on the look of the scene.

By the way, I reopened the Issue because I still noticed that there is one bug left:
GPU with OCL backend still leaks light and produces too bright results.
So probably it wouldn't fully work for you on GPU yet.

CUDA is working, which is why I missed this, doesn't show as obvious in all situations
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: [LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Post by FarbigeWelt »

e=1760390386 user_id=456]
So probably it wouldn't fully work for you on GPU yet.

CUDA is working, which is why I missed this, doesn't show as obvious in all situations
[/quote]

I have a PC with two graphics cards, one AMD and one nvidia. So, I can compare CUDA with openCL directly.
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
CodeHD
Developer
Developer
Posts: 504
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: [LuxCore + BlendLuxCore] [v2.11] Breaking Default Behavior - ShadowColor + Light Tracing

Post by CodeHD »

Ah yes, I forgot, thought you were mac only...
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

BLC 2.10.1 | Glass Cube, no Volumes

Post by FarbigeWelt »

I've tested different settings for a simple glass cube box filled with a yellow liquid.
First tests are material settings without volume.

I've encountered an issue with GPU rendering.
GeForce RTX 2080 Super renders only about 5% faster than Radeon RX 5700 XT (see LuxMark 3.1)
But here the combination CPU/Radeon renders much slower than CPU/GeForce.
If Light Tracing is enabled in combination with GPU RX 5700 XT the CPU AMD 5950X renders with the same speed as CPU only.
Compare AMD with aRX/AMD times for 0.5 HD renders in the lists below.

AMD: AMD Ryzen 9 5950X 16 cores, 32 threads
aRX: AMD Radeon RX 5700 XT
nRTX: NVIDIA RTX 2080 Super
CPU: Apple M1 16 GB
GPU: Apple M1 16 GB

Glass Cube, no Volumes
Glass, sharp edges
Liquid, cube, sharp edges
Path-, Light Traycing Sobol
CPU, 128 samples, 2:38
AMD, 134 samples, 00:33
GPU/CPU, 128 Samples, 1:42
aRX/AMD, 134 Samples, 00:25
nRTX/AMD, 135 Samples, 00:15
aRX,nRTX/AMD, 152 Samples, 00:11
BiDir Metropolis
CPU, 128 Samples, 1:33
AMD, 131 Samples, d12, 00:23

Glass Cube, no Volumes
CPU_BiDir MLT
CPU_BiDir MLT
CPU_Path, Light Tracing
CPU_Path, Light Tracing
CPU/GPU AMD, NVIDIA
CPU/GPU AMD, NVIDIA
CPU/GPU AMD
CPU/GPU AMD
CPU/GPU NVIDIA
CPU/GPU NVIDIA
Last edited by FarbigeWelt on Thu Oct 16, 2025 7:23 pm, edited 4 times in total.
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Glass Cube, Volumes clear

Post by FarbigeWelt »

Glass Cube, Volumes clear
Air, prio 0, clear
Glass, sharp edges, clear
Liquid, cube, sharp edges, clear
Path-, Light Traycing Sobol
CPU, 128 Samples, 2:38
AMD, 131 Samples, 00:29
GPU/CPU, 128 Samples, 2:08
aRX/AMD, 130 Samples, 00:31
nRTX/AMD, 138 Samples, 00:16
aRX,nRTX/AMD, 128 Samples, 00:11
BiDir Metropolis
CPU, 128 Samples, 1:41
AMD, 128 Samples, d12, 00:25

Glass Cube, Volumes clear
CPU_BiDir, MLT
CPU_BiDir, MLT
CPU_PLT, Sobol
CPU_PLT, Sobol
CPU/aRX_PLT, Sobol
CPU/aRX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
Last edited by FarbigeWelt on Thu Oct 16, 2025 7:22 pm, edited 1 time in total.
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Glass Cube, Volumes homo, Shadows 0

Post by FarbigeWelt »

Glass Cube, Volumes homo, Shadows 0
Air, prio 0, clear
Glass, sharp edges, clear
Liquid, cube, sharp edges, homo
Path-, Light Traycing Sobol
CPU, 128 Samples, 2:38
AMD, 134 Samples, 00:34
GPU/CPU, 128 Samples, 2:29
aRX/AMD, 131 Samples, 00:32
nRTX/AMD, 141 Samples, 00:17
aRX,nRTX/AMD, 144 Samples, 00:12
BiDir Metropolis
CPU, 128 Samples, 1:40
AMD, 129 Samples, d12, 00:24

Glass Cube, Volumes homo, Shadows 0
CPU_PLT, Sobol
CPU_PLT, Sobol
CPU_BiDir, MLT
CPU_BiDir, MLT
CPU/aRX_PLT, Sobol
CPU/aRX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
Last edited by FarbigeWelt on Thu Oct 16, 2025 7:22 pm, edited 1 time in total.
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Glass Cube, Volumes homo, Shadows 1

Post by FarbigeWelt »

Glass Cube, Volumes homo, Shadows 1
Air, prio 0, clear
Glass, sharp edges, clear, shadow 1
Liquid, cube, sharp edges, homo, shadow 1
Path-, Light Traycing Sobol
CPU, 128 Samples, 2:19
AMD, 128 Samples, 00:32
GPU/CPU, 128 Samples, 2:29
aRX/AMD, 130 Samples, 00:33
nRTX/AMD, 141 Samples, 00:17
aRX,nRTX/AMD, 141 Samples, 00:13
BiDir Metropolis
CPU, 128 Samples, 1:51
AMD, 129 Samples, d12, 00:26

Glass Cube, Volumes homo, Shadows 1
CPU_PLT, Sobol
CPU_PLT, Sobol
CPU_BiDir, MLT
CPU_BiDir, MLT
CPU/aRX_PLT, Sobol
CPU/aRX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
CPU/aRX,nRTX_PLT, Sobol
Last edited by FarbigeWelt on Thu Oct 16, 2025 7:24 pm, edited 1 time in total.
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
User avatar
FarbigeWelt
Donor
Donor
Posts: 1083
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Glass Cube, Volumes homo, Shadows 0.5

Post by FarbigeWelt »

Glass Cube, Volumes homo, Shadows 0.5
Air, prio 0, clear
Glass, sharp edges, clear, shadow 0.5
Liquid, cube, sharp edges, homo, shadow 0.5
Path-, Light Traycing Sobol
CPU, 128 Samples,
AMD, 133 Samples, 00:30 (no light T: 00:14)
GPU/CPU, 128 Samples,
aRX/AMD, 131 Samples, 00:32 (no light T: 00:12)
nRTX/AMD, 135 Samples, 00:16
aRX,nRTX/AMD, 135 Samples, 00:11
BiDir Metropolis
CPU, 128 Samples,
AMD, 131 Samples, d12, 00:26

Glass Cube, Volumes homo, Shadows 0.5
CPU_PLT, Sobol
CPU_PLT, Sobol
CPU_BiDir, MLT
CPU_BiDir, MLT
CPU/aRX_PLT, Sobol
CPU/aRX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/nRTX_PLT, Sobol
CPU/nRTX,aRX_PLT, Sobol
CPU/nRTX,aRX_PLT, Sobol
Light and Word designing Creator - aka quantenkristall || #luxcorerender
MacBook Air with M1 16 GB, macOS 26
Post Reply