Please, fix your lighting Roblox!

Reproduction Steps

Use surface lights on a part and this starts to happen:


Expected Behavior

The light to emit without making the texture look horrible

Actual Behavior

The texture looks horrible and yeah

Workaround

Using PointLight, but this one has its own issue too! When in enclosed spaces, it’ll appear dark… as if the light is INSIDE the part instead of OUTSIDE the part.

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

14 Likes

Can you provide your Lighting properties? Is this happening on a fresh Baseplate? I am unable to reproduce it.

3 Likes

You should provide a reproduction file to make things easier for the engineers. Otherwise, this just looks like a poorly lit block lol

4 Likes

How big is this Textured Part? Roblox Lighting is limited by distance, so if this Part is 300 studs across that might be a cause of the issue.

In regards to your Workaround, PointLights emit from inside the Part, so I’m guessing this would be an expected behaviour.
Have you tried a SurfaceLight instead?
For a workaround maybe have 2 Parts with SurfaceLights pointed diagonally at 2 opposing corners (so each one points at 3 sides of the Textured Part) with their Ranges set to only illuminate the Textured Part.

2 Likes

No, it’s a 4x4x4 block

Also, I’m literally using SurfaceLights for the picture too

1 Like

Did you try my workaround suggestion?

2 Likes

Are your SurfaceLights inside the Texture Part, or are they separate Parts that have their SurfaceLight pointing at the 4x4x4 block?

1 Like

I tried re-creating the issue and was somewhat successful. It seems like the lighting freaks out if the light source skims the surface of a part. I was only able to get this behavior on SurfaceLights while using the “Future” lighting mode.

A reproduction of the issue using the Metal rendering engine.


I also found that not all graphics engines, like OpenGL had this problem.

Testing for the issue with OpenGL.

I tested this on MacOS 12.6.2. To my understanding, MacOS apps usually use Metal. Some apps may use OpenGL but that is unlikely due to it being deprecated by Apple some time ago. Anything other then Metal and OpenGL is not supported. I tried testing all of Roblox Studio’s supported rendering engines just to see what would happen.
Below are the results of that.


Engine Type Issue Found Default Engine
Metal

Yes

Invalid

OpenGL

No

Invalid

Vulkan

Invalid

Metal
Direct3D11

Invalid

Metal
No Graphics

Invalid

No


I have left reproduction steps if anyone would like to try reproducing this with other platforms or rendering engines.

Reproduction Steps

  • Use a Mac and make sure Roblox is using the Metal rendering engine.

  • Open the following place file.

    Classic Baseplate.rbxl (30.6 KB)


  • Select the cube shown in both videos above.

  • Run the code below in the command bar.
    local a = game:GetService("TweenService"):Create(game:GetService("Selection"):Get()[1], TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, -1, false, 0), {Orientation = Vector3.new(360, 0, 0)}); a.Parent = workspace; a:Play()
    
6 Likes

Those two look substantially different, are your graphics on max for the OpenGL test? Are they both using Future? It looks like Voxel, which could be caused by a low graphics setting.

With the OpenGL graphics mode,

In the image, it looks like some form of shadow acne, which isn’t there on OpenGL graphics mode since Roblox forces OpenGL mode to run only Voxel shadows on objects that aren’t the player’s character, for some incomprehensible reason.

Also, I have tested on my Windows 10 and can confirm the issue occurs on D3D11 and Vulkan.

3 Likes

OpenGL doesn’t support any modern lighting technologies in the first place.

3 Likes

That is incorrect, if they really implemented OpenGL support properly, it would look the same, atleast in the image.

But, it looks like there are, unfortunately, a few issues;

  • Shadowmaps are only on the player’s character (even on Future) (but it works on everything on mobile?)
  • Phong shading (lighting looks uniform from other light sources, no specular highlight) only on player’s character and objects in sunlight

This is pretty weird, and I feel like it’s a bug or something.

No. It is truly just an OpenGL moment. This API is 30 years old and was last updated 5 years ago. It is enabled in the client only if your device doesn’t support anything newer and in studio if you manually select it in rendering settings. Since use cases for this API are so niche there is no reason to make it support cool graphics, it always defaults to Voxel.
About the player’s character having better shadows and shading - it’s a Voxel thing, it will render humanoids in more detail because you’ll probably be looking at your character’s shadow for a lot longer than background shadows.

2 Likes

That doesn’t mean OpenGL doesn’t even support these lighting effects, which was your original comment that I was replying to.

Edit: Also, if the character shadows are voxels, then what’s Roblox reporting as “shadow” drawcalls in the “Render” debug menu?

image

I hope they improve SurfaceLights in general; they’ve been quite buggy and odd with Future lighting with a weird specular effect that moves around with the camera’s position in a very bizarre manner.

1 Like

This is intended behavior. This allows us to make lights like this with the FIB lighting technology:
light.rbxm (3.7 KB)

There is very clearly some form of shadow acne in the image provided by OP, even if they used future it really shouldn’t look like that.

But your model does look pretty cool, I must say;

4 Likes

Thanks for the report! If you have some improvements you want to share, we would appreciate if you could file a feature request!