BiDir: not evaluation volume correctly during light-eye connection
The issue was observed using LuxCore v2.10 alpha (likely happening before already) in Blender 4.3 (likely irrelevant)
Steps to reproduce:
- Open the attached .blend-file bidir_volumecoonnection.zip
- Activate viewport or final render
The scene shows a cube illuminated by a laser. No other light source. Camera set to fixed brightness. The cube has a matte translucent material at default settings (50/50 transmission/reflection) and a homogeneous scattering internal volume. the world volume is a clear volume.
The homogeneous volume is set up with a short absorption depth, so that no light should reach the side and back faces of the cube, because it is completely absorbed along the distance.
When opacity of the matte translucent material to 0, this can be observed directly, from the default view, a short scattering beam appears.
When viewing the cube from behind, the beam is not visible due to absorption.
However, with the matte material opacity at one, the side and back faces of the cube appear illuminated. Further reducing the absorption depth of the volume makes no difference, even though the absorption should be even stronger.
There is no alternative path outside the cube that could lead to illumination.
My initial theory is that the volume evaluation is somehow not performed correctly during the Connection step of the BiDir rendering.
I will attempt to investigate further.
Some progress:
I could indeed identify an issue with volume evaluation.
In BiDirCPURenderThread::ConnectVertices(), the volumeInfo was taken directly from eyeVertex. However, this was evaluated based on the ray that last intersected that surface. However, the shadow ray that is traced during the connection may go to the other side from the surface in case of a translucent material. Adding a corresponding additional evaluation leads to a better result.
During this, I have noticed a further effect, seemingly also only with translucency and/or volumes: Zooming the camera changes the brightness of these paths, even with the camera brightness fixed. The scattering between two matte-translucent surfaces on the outside does not scale this way. TBD: for which rays exactly does this happen?
Closing this issue as completed, the original volume bug will be included in the next PR.
The second issue mentioned in the previous comment is still covered by this Issue: https://github.com/LuxCoreRender/LuxCore/issues/678