BlackBox and Light Leaking

Use this forum for general user support and related questions.
marcatore
Posts: 213
Joined: Wed Jan 10, 2018 8:04 am

BlackBox and Light Leaking

Post by marcatore » Fri Mar 01, 2019 4:25 pm

Since I started to use Luxcore (I really don't remember with Luxrender, in any case it's gone) I often saw light leaking in the corner of the rooms I used as environment.
I built a "blackbox", a room without windows with a camera inside. I've put a sun lamp outside.
The walls has no thickness.

And trying rendering this extreme scene the result is a black image (this is expected) with some bright spot, many of them gathered in the corner.
blackbox.jpg
I've tried the same scene in vray and the result is a black image without any bright pixels.

Is it a correct behaviour according to how Luxcore is programmed or not?
Could be the same "problem" that generate light leaks with PGI?

I've attached a simple scene.
Attachments
test_BlackBox.zip
(76.31 KiB) Downloaded 15 times

marcatore
Posts: 213
Joined: Wed Jan 10, 2018 8:04 am

Re: BlackBox and Light Leaking

Post by marcatore » Fri Mar 01, 2019 4:31 pm

Playing with Eplison values trying to go lower, the gathering in the corner disappear but there are more bright pixels on the vertical walls.

CodeHD
Posts: 152
Joined: Tue Dec 11, 2018 12:38 pm

Re: BlackBox and Light Leaking

Post by CodeHD » Fri Mar 01, 2019 4:32 pm

Just today Dade has commented on this in the GI-cahce thread.

here is the post:
viewtopic.php?f=5&t=840&start=650#p10735

According to that, it is to be expected.

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

Re: BlackBox and Light Leaking

Post by Dade » Fri Mar 01, 2019 5:25 pm

CodeHD wrote:
Fri Mar 01, 2019 4:32 pm
Just today Dade has commented on this in the GI-cahce thread.

here is the post:
viewtopic.php?f=5&t=840&start=650#p10735

According to that, it is to be expected.
Yup, wall must have thickness otherwise, first or later, you can have a light leak.
Support LuxCoreRender project with salts and bounties

marcatore
Posts: 213
Joined: Wed Jan 10, 2018 8:04 am

Re: BlackBox and Light Leaking

Post by marcatore » Fri Mar 01, 2019 9:57 pm

ok. But it's a standard behaviour for a path tracer?
Cycles, for example, renders a full black image.

Using thickness and overlapping geometries means more work when you have a "not cube" scene and it has less flexibility with modelling cause you have, for example, to rest a wall to the floor, so it's not just adding thickness.

marcatore
Posts: 213
Joined: Wed Jan 10, 2018 8:04 am

Re: BlackBox and Light Leaking

Post by marcatore » Fri Mar 01, 2019 10:06 pm

I've tried to add thickness and it works.

But I've tried to use PGI (I know it's quite useless in this scene but I'd like to test anyway) and if you use a Lookup Radius lower o equal to the thickness I've added to the walls (ceiling and floor) Blender crashes.

As attached the scene modified.
Attachments
test_BlackBox.zip
(76.03 KiB) Downloaded 20 times

CodeHD
Posts: 152
Joined: Tue Dec 11, 2018 12:38 pm

Re: BlackBox and Light Leaking

Post by CodeHD » Sat Mar 02, 2019 12:23 am

marcatore wrote:
Fri Mar 01, 2019 9:57 pm
ok. But it's a standard behaviour for a path tracer?
Cycles, for example, renders a full black image.
I will leave the discussion of "standard" to someone else, but I would say "yes" anyways ;) The reason, as so often, are rounding errors.
What I imagine happens here is the following: A ray is launched from the camera, in some random direction within each pixel according to the sampler. Some of these hit one surface extremely close to the corner. A ray would then launched onwards from this point, in another random direction or towards the light source (shadow ray). The reason you get a leak is that the CPU has internally computed the intersection point with the plane at high precision, and then rounded it in such a way that the new starting point is outside your cube. With a 0-thickness wall, it then depends on coincidence if you get a leak.
Maybe there are other mechanisms as well, but rounding errors are always a possible problem in computer science.

Example in your scene: The rotation of the sun lamp. Set the y- and z-rotation to 0, then you do not get leaks for x-rotations between 94 and 266 degrees ;)

It is surely possible to program your intersection calculation in such a way that it includes sufficient margin for this situation. If that is something you want in terms of performance costs vs. how often this is really a problem in practise I can not judge.

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

Re: BlackBox and Light Leaking

Post by Dade » Sat Mar 02, 2019 3:02 pm

marcatore wrote:
Fri Mar 01, 2019 10:06 pm
But I've tried to use PGI (I know it's quite useless in this scene but I'd like to test anyway) and if you use a Lookup Radius lower o equal to the thickness I've added to the walls (ceiling and floor) Blender crashes.
It exits writing a message error about the inability of Metropolis to find a useful light path. Indeed, there isn't one in a black room. I modified the code so it now renders black rooms too :mrgreen:
Support LuxCoreRender project with salts and bounties

marcatore
Posts: 213
Joined: Wed Jan 10, 2018 8:04 am

Re: BlackBox and Light Leaking

Post by marcatore » Sat Mar 02, 2019 4:31 pm

Did you already uploaded it?
I've downloaded the last build now and it crashes again.

CodeHD
Posts: 152
Joined: Tue Dec 11, 2018 12:38 pm

Re: BlackBox and Light Leaking

Post by CodeHD » Sat Mar 02, 2019 5:53 pm

Dade wrote:
Fri Mar 01, 2019 5:25 pm
Yup, wall must have thickness otherwise, first or later, you can have a light leak.
This is something that could be added to the FAQ

Post Reply