Roblox / future-is-bright

Prototyping future Roblox lighting technology
https://roblox.github.io/future-is-bright/
60 stars 12 forks source link

SurfaceLights with Shadows Enabled - New Bugs #53

Closed AshCraft1337 closed 5 years ago

AshCraft1337 commented 7 years ago

though the weird light glitch has been fixed in v3, ive just encountered a few other within v3.

first, heres an actual bug: setting the range to 1 makes this weird render bug image

this second one is easily fixable with raising the ShadowCutOff to 1, but it seems like a weird shadow to come from this image

this third one may not be a bug and could be intentional, but when using surface lights with a window, i personally wouldnt expect it to act like this image

decreasing the range to 2 makes the range too small, as a developer who uses surface lights on windows, i'd expect surface lights under a part to emit like this image red = current blue = what i'd expect, the light coming specifically from the hole in the wall

(excuse the messy lines im using a laptop right now, haha)

like i said, it could've been intentional but in my opinion it seems weird to have the whole part layout show from behind the wall due to the surfacelight

heres the level if you need it: SurfaceLightStuff.zip

Rytimiscurisin commented 7 years ago

How much coffee did you drink before drawing those lines...?

AshCraft1337 commented 7 years ago

@Rytimiscurisin Wow Seriously ARe you BliND?!?

jk, i explained why the lines were messy in the post

(excuse the messy lines im using a laptop right now, haha)

zeux commented 7 years ago

Range=1 issue is a bug (manifests when Range = ShadowCutoff), it will be fixed in v5.

I'm afraid the other two issues you've mentioned are a current limitation of ShadowMaps driven by performance - we currently only have faces that face the light cast shadows, so when a light object is embedded into a part you don't get shadows from some faces.

For now you can work around this by either moving your surface light out of the frame:

image

Or just disabling shadows and placing the SurfaceLight on the geometry of the part that's located inside the window (which would be much smaller than your part).

zeux commented 5 years ago

I'll close this for now as newer builds haven't supported surface light shadows for a bit. We aren't sure yet whether we want to support them or not - if we do it'll have to be supported in Voxel technology as well. We may come back to this one.