LuxCore icon indicating copy to clipboard operation
LuxCore copied to clipboard

[Bug Report] Odd Artifact suppresses Beam intersection within a Glass Prism

Open FarbigeWelt opened this issue 10 months ago • 4 comments

Please describe the differences between the expected and observed results: All Prisms show an intersecting beam on a plane intersecting with prisms and light beams.

Steps to reproduce: Open the attached Blender Scene set View port shading to render. Activate Camera view and move the camera on the Y-Axis. The missing beam intersection keeps on the same spot whereas correctly rendered Prisms "move" along the camera path. It looks like there is a hidden or deleted object in the scene ..

Please provide a simple test scene as a .blend-file:

Test_Prism_Odd Artifact.blend.zip

Screenshots or rendered images: Image Overview

Image Orthogonal Camera View Image Camera moved on X-Axis Image View port shading Solid Image Detailed View of the Artifact

Error message from Blender console: none

Operating System: macOS 15.5 Blender version: 4.2.9 BlendLuxCore version: 2.10.10 Pyluxcore version:2.10.10 CPU and GPU model: Apple M1, 16 GB

FarbigeWelt avatar Jun 03 '25 13:06 FarbigeWelt

Your description is the wrong way round: It is not the black prisms at the center of the view that are the problem, but the other ones.

Your scene shows light on a diffuse surface. The diffuse surface is intersected by (non-rough!) glass prisms. Hence, any path inside the prisms will be a perfect SDS path and should be impossible to render. The prisms should all appear black.

Using the perspective camera does show all prisms black. So it seems to be limited to the ortho camera type. The issue is identical for BiDir and Light Tracing.

When moving the camera upwards, the correctly rendered region grows. It also appears to be sharply delimited (E.g. at camera z=1000, there is a clear circle visible outide the prisms)

My first assumption is therefore that there is something going on in the shadow-ray tests when connecting to the camera.

Transferring this Issue to LuxCore.

CodeFHD avatar Jun 04 '25 09:06 CodeFHD

"Your description is the wrong way round: It is not the black prisms at the center of the view that are the problem, but the other ones.

Your scene shows light on a diffuse surface. The diffuse surface is intersected by (non-rough!) glass prisms. Hence, any path inside the prisms will be a perfect SDS path and should be impossible to render. The prisms should all appear black.", CodeFHD

Okay I agree with you. I wondered first, that Rays inside get visible. It also depends on Z-Height of the prisms but I didn't find a logical pattern, means sometimes Rays are visible and sometimes not.

FarbigeWelt avatar Jun 04 '25 09:06 FarbigeWelt

The effect is not limited to Orthographic Camera. If Camera position is outside Clipping Distance the rays within the Glass Prisms get also visible.

Perspective Camera Image Outside Clipping Distance

Image Within Clipping Distance Image Without Clipping

FarbigeWelt avatar Jun 04 '25 12:06 FarbigeWelt

Ok that sounds like another side to it. Essentially the same as what I meant with the shadow ray test. The crucial part being that the prism surfaces are ignored when connecting the ray from the diffuse surface to the camera. Clipping is just doing this explicitly, though it should inhibit the conenction entirely. I suspect this somehow fails for light rays.

I looked into the code but did not find this specific issue so far. Still searching.

I did come across another aspect specific to light rays and the orthographic camera: sampling the lens happens at the wrong stage for this combination. I will have to create the documentation and ToDo-list for that in a separate issue.

CodeFHD avatar Jun 05 '25 14:06 CodeFHD