Partial passing through of light for transparent BaseParts

As a Roblox developer, it is often painstaking to make visually impressive creations on the platform, requiring cleverly baked lighting onto detailed meshes and consideration of numerous elements found in nature that aren’t inherently present in the Roblox engine such as reflections, volumetrics, etc. This causes a great deal of manual labor on the part of the developer, which could be relieved partially with some more graphical features.

Graphics are an important part of experiences for older audiences because they are usually a good indicator of the level of quality and effort put into a game. Additionally, they are a fantastic contributor to immersion.

Every additional feature added to the current lighting technology on Roblox brings us closer in competition with the graphics of leading industry titles off the platform.

For this reason, I am suggesting changes to how lights with shadows enabled interact with transparent parts.

Right now from Transparency 0 to 0.74 on BaseParts there is a full shadow and no light passes through. However at Transparency 0.75 and greater, all of the light passes through.

This is shown in the following two images:


Instead of this sudden drop-off at a certain threshold, it would be neat if there was a gradual dropoff in light brightness as transparency decreases. The following figure shows a linear dropoff of brightness as transparency increases.

Another aspect of this would be how the color of the transparent part would affect the result of light passing through. Since it is complicated to come up with values for how much light should pass through colored glass, I provided some heuristic visual examples below:

(Note that the brightness is much lower since only one frequency of light is being let through.)


Right now, to create these examples I’m using two lights: one with shadows on, and the other with shadows off. This works fine when everything is the same transparency, but if I had some opaque walls beside the glass walls, the effect would be ruined.

The use cases for this feature would be game that wishes to have more realistic visuals.

Some specific builds that would benefit from this greatly would be:

Churches with stained glass windows.
Indoor and outdoor storefronts that display goods through glass.
Crystal caves.
Ice caves.
Museums for gem-like artifacts and decoration.
Light sources.
Windows, gems, ice, and translucent objects in general.

Some more creative use cases of this would be:

Allows for light-filtering capabilities for vfx. (Ex. a ball of light that emits rings of differently colored lights)
Combining this feature with a texture could allow for light to be projected through a texture to create projection effects like a film camera or better fake caustics for underwater environments.

34 Likes

I like this idea a lot but for different reasons. I think it’s super important if Roblox wants to keep up with other development platforms such as Godot, Unreal, or Unity. And have other developers be able to come onto the platform to make something, it would be helpful to make some of the graphical abilities that other engines now come with. I like the idea proposed here and with the mindset of Roblox being a platform where more realistic games could be made, these simple requests are much needed to further a collection of improvements.

Though with this, I think there should be more options surrounding lighting on individual instance types and potentially a rework/more diversity of lighting options so that people who want to make specific lighting scenarios at a base level could still operate without needing engine changes forced upon them. Other platforms get around this by simply letting you choose the version of the engine you’d like to develop in, but with Roblox being a live-service engine for live-service games that’s not possible. A lot of games go for very specific lighting technology setups that this change might affect negatively.
(e.g. you’re a developer working on a cartoony game and suddenly you have realistic shadows instead of black shading and white highlights.)
Overall love the idea, it would make a huge difference in how things are perceived.

8 Likes

I agree this is desirable in vacuo, though I can’t really say I’ve ever been desperate for it to such a degree where I felt it wasn’t “competitive” with comparable modern engines like Source 2. Maybe I’m biased, but I have worked a lot with lighting and PBR when trying to do high-fi showcase builds and this is pretty niche on the list of things I was thinking about. It’d make some of my wine bottles prettier, I guess? This is pretty emulatable right now using surface lights with a low angle for the one or two times per year I ever think about it, like if you need stained glass or something.

So instead, when I think about this proposal, here’s what I think of:

  • What is the performance cost on low end devices (more than “just phones”)?

  • If its too slow that it has to be disabled automatically, would it start altering gameplay if light can spill through parts when it’s on but not when it’s off?

  • How will this affect old content? What if I assumed that a part will block all light while still being transparent? Will it step on artists’ toes?

  • What if I don’t like the effect, and just want to block all light anyway?

  • Is this going to make the performance of my lighting even worse than it already tends to be in complex scenes like the ones I build?

So I’m not entirely sold on the idea personally. I’d rather see other things first, like true bounce lighting (so I can actually light interiors sensibly) or volumetrics (so I can enhance the sense of space and convey the quality of the air in a place)

8 Likes

Not a big fan of this pessimistic view point.

Big fan of this concept, and I think it’ll have many impacts to the immersion of many projects, especially projects focused on building. To combat each point listed here with a better perspective on things:

  • The performance shouldn’t take an incredible hit as the same algorithm for determining shadows cast from point lights can be used to designate the area by which the lighting effect would take place. Meaning this could be integrated into all lighting systems with minimal impact if executed well.

  • I agree that there should be an option to provide control over how strong this effect is and if you want it at all, but I don’t find that to be grounds to negate a feature request in its entirety.

  • Given this be added as a property of a part, it could be implemented by defaulting all previous parts that do not already contain the property to false

  • I agree providing an option to disable this effect would be favorable.

  • Given the way this was implemented in the demo, (using two lights) as I stated previously the calculations that are used to make the shadow effect from point lights can be repurposed which should negliably impact performance.

6 Likes

Oh no, I totally agree that this would be easy to implement for non-stacked shadow casters. That’s why shadow maps work at all.

But how do you propose it handle stacked shadow casters, where you end up with an arbitrary number of coloured “layers” between them?

Your idea only supports single casters, which will cause light leaks:

Shadow maps are just rasterised depth buffers using a light’s projection. What you’re asking for is analogous to OIT - you’d need some kind of depth peeling system or per pixel linked list.

It isn’t pessimism to point any of this out.

3 Likes

Since this effect can be approximated decently well with multiple lights with shadows on and off, a system for filtering what lights cast shadows on what objects similar to collision groups could be used by developers to recreate this effect in simple cases.

Also, I’d think if the effect were implemented, it would be best as a “translucency” slider or something so you aren’t forced to use it and you have a bit more control over the strength of the effect.

5 Likes

What you’re suggesting is pretty much just hacky depth peeling, and it isn’t clearly performant. The translucency slider is an interesting way of preserving backcompat though, that could work.

So to be clear here, I like the idea. I just don’t know how much I like it relative to other ideas I want to see, speaking as a builder, knowing that it’s graphically complex.

3 Likes

To sum all of this up, future lighting is not good enough and lacks a number of CRITICAL features. I believe it needs a complete overhaul. It’s as if Future lighting never left the testing phase back in 2017. We need an actual realistic lighting solution for Roblox as players are tired of making workarounds for basic lighting features that are included in literally every other major game engine.

Here are some of the issues I run into when using future lighting:

Glass material still doesn’t render transparent objects.
Lighting has horrible bleed and artifacts, also is very unoptimized in the engine itself.
No control over the draw distance of lighting effects including shadows.
Shadows either on or off with nothing in-between.
No proper ambient lighting.
Maximum shadow resolution is very low.
No real-time reflections.
Lighting effects missing on a number of object classes.
Multiple light sources in an area cause light to stack and become EXTREMELY bright.
Distance limit of light sources is limited to 60 studs.

Why does Roblox try to mimic other game engines instead of actually becoming like them? It’s like they do the bare minimum to look competitive without actually being it.

6 Likes