Light leaks through cast shadow enabled parts if the parts are not thick enough

Reproduction Steps

Set the OutdoorAmbient property of Lighting to 255, 255, 255 for a clearer observation of the issue.

  1. Create a box with parts that have a thickness that is <6 studs with any material apart from neon (preferably grey in color)
  2. Travel inside the box
  3. Observe that the light leaks through the parts

Box diagram:

What happens:


Expected Behavior

No light leaks through the parts.

Note that this box is the same box as the previous example but with a large shadow part over it:

Box diagram:

Result:


Actual Behavior

This issue occurs within Future, ShadowMap, and Voxel lighting technologies.

Light will leak through the box:


Workaround

  1. Creating a shadow part that has the top surface at least 6 studs away from where you want the shadow to start (not applicable to many situations)
  2. Thickening the shadow part itself
  3. Setting the OutdoorAmbient property to 0, 0, 0 (note that this doesn’t solve the issue, it just hides it. This workaround is not applicable to many situations)

Issue Area: Engine
Issue Type: Display
Impact: High
Frequency: Constantly

7 Likes

That’s just the voxel lighting system. Voxel is always combined with shadowmap and future lighting and this happens due to the fact that the voxels are 4x4 if I remember correctly. This is not intentional, but it’s a common side effect.

3 Likes

It’s worth noting that because the voxel system is relative to the world (and not your parts) you will need a part to be at least 6 studs thick to avoid this issue iirc

2 Likes

Something interesting is that setting both EnvironmentDiffuseScale and EnvironmentSpecularScale to 0 will get rid of the problem:

EnvironmentDiffuseScale=1
EnvironmentSpecularScale=1

EnvironmentDiffuseScale=0
EnvironmentSpecularScale=1

EnvironmentDiffuseScale=0
EnvironmentSpecularScale=0

[ILLUMINATI CONFIRMED plays]

environmentscale_lightleaks.rbxl (40.5 KB)

This isn’t a completely free workaround, though. EnvironmentDiffuseScale tints your scene to the average skybox color, so you will need to compensate by raising the Ambient color (OutdoorAmbient uses the same voxel grid, so you will get the same blobby artifacts if you use that, unfortunately).

And, EnvironmentSpecularScale is basically a global PBR reflectiveness slider, so even if you have a material with textures that make it as reflective as possible (i.e. RoughnessMap=Black MetalnessMap=White probably), setting this one value to 0 will result in the complete loss of Roblox’s automatically-generated dynamic envmaps:

EnvironmentSpecularScale=0

EnvironmentSpecularScale=1

(Source)

Edit: Only now did I realise the OP mentions OutdoorAmbient. Whoops! Hopefully this reply is still useful or interesting to some people as to what the aforementioned properties actually do.

Thanks for the report. I filed a ticket to our internal database.

7 Likes

Is there an update on this? Light leaking still occurs on all technologies except for future.

When not on ShadowMap or Future, light-leaking is guaranteed to happen. The voxel Roblox uses when the high-quality shadows are disabled are 4x4x4 studs big in order to not completely melt devices, with the cost of light leaking through walls that are too thin.

Hi all!
Light leaks are an inherent result of our lighting technologies. We’re tracking this as a highly mentioned pain points and are keeping this is mind in our work to improve our lighting systems.

I will close this ticket as we are not treating it as a bug, but we have the issue on our radar!

5 Likes