Blocking light leaking through block terrain

I’ve been working on trying to get voxel lighting to work well with my block based terrain in Blox, and have run into numerous light leaking issues, like the one pictured below (for reference, these blocks are 4x4x4, and no, increasing the voxel size doesn’t fix the issue):

My current workaround is to spawn a layer of ‘light occluder’ blocks just behind the surface, which are 6x6x6, noncollidable and use an invalid material to prevent them from rendering. Here’s what it looks like when the material is set to something visible - look at this monstrosity:

This solves it in most cases, but there’s still plenty of issues with one-block-thick walls and with some corners which I can’t solve. Plus, it practically doubles the part count and adds an extra pass to chunk model generation, so it isn’t a viable solution for lower end devices.

Do you guys have any tips for dealing with this? Maybe someone with more knowledge about the lighting system can drop a few tips?

I’m using Compatibility lighting by the way. (I’d like to use a newer rendering mode, but the tonemapper is preventing me from upgrading as it makes a mess of the colour and contrast in a way that can’t be fixed via post processing effects)

6 Likes

Well, compatibility lighting is kind of old, so most of it won’t be as accurate as you think because it’s using the old ROBLOX lighting system. Maybe you could try switching lighting to voxel or shadow map. (Shadow map does take a bit of performance)

Another way you can try to hide it is using contrast from color correction instance.

I’m unable to do this, see the spoiler at the end of the post. More specifically, the colour correction post process can’t restore bright colours without oversaturating dark colours and can’t restore light tones without making black tones greyish. There is no setting which provided any acceptable compromise.

Then adjust the lighting with color correction you can always adjust it as much as you like to prevent that. If you’re unable to switch lighting then you should uninstall ROBLOX studio and re-download it sometimes it works.

It’s not a bug, it’s a limitation of ColourCorrectionPostEffects. I have already laid out the reasons why your approach didn’t work above, but if you have any other ideas separate from that wrt fixing light leaking, it would be appreciated :slightly_smiling_face:

(fwiw, switching technologies doesn’t solve the problem)

i’m using future lighting and have this same issue with top terrain not blocking light.
What does invalid material mean?

looking for a way to also solve this issue.

1 Like