How Can I Prevent Light from Bleeding Through?

I’m currently trying to create a scene, and I need particular lighting settings to accomplish this:
image

The EnvironmentDiffuseScale and EnvironmentSpecularScale properties seem to cause light to bleed into this building, which I don’t want:

Though if I disable it, shadows look like this:
image

Adjusting the ambient levels will mess up night scenes. What should I do?

1 Like

If your game allows, you could place a large platform above the structure in image 1 to eliminate the light bleeding you are talking about. Otherwise, I think changing EnvironmentDiffuseScale would be the only way possible to eliminate this behavior.

Scale the roof and floor outwards, it should help with it, if not, you can create a large box around it. Might not be practical depending on the usage however.

2 Likes

I would recommend using Ambient and/or OutdoorAmbient, though that’d mean the darkest a closed space can get is dictated by the Ambient value, and if you only use OutdoorAmbient you will get light bleeding.

Using both Ambient and OutdoorAmbient (You’ll get the same result if you only use Ambient and keep OutdoorAmbient as 0,0,0)

Using only OutdoorAmbient

1 Like

I have both set to 0, 0, 0 to keep the interior as dark as possible when no light is coming through.

you can change brightness, or u can do a forcefield part with negative infinity transparency, for example -1232930854120395801394850392485092348502345890934852930458029345 and then just place it above of a building/room

2 Likes

I don’t want to mess with the brightness because the scene depends on it.

Though the forcefield part does seem to work, it needs to be excessively large. When TimeOfDay changes, the sun is at a different angle and the shadow seems off.

1 Like

then, place forcefield thing in buiding, with disabled collision

The building is not large enough for this to take effect. The force field needs to be at least 32 studs to take effect.

As i see u have environment effects turned on because of your low ambient, is there reason why u need ambient set to 0,0,0 ? oh and also, you’re using future to get dynamic lighting effect in you scene?

These lighting settings are necessary to get realistic night/day scenes. At night, I want the whole scene to be pitch-black, so I sometimes experiment with Brightness.

Ambient and OutdoorAmbient mess up these night scenes and make it appear grey and not pitch-black. EnvironmentDiffuseScale and EnvironmentSpecularScale allow the diffusion of the skybox to be the light source, which is intended for night scenes.

why not to use a script that will chagne lighting properties depending on day time, u can make pitch black night scene by using colorcorrection, and also in real life nights are not pure black, they are more like very dark blue, but do it way you want

The night scene should apply to everything except for parts that emit light and the light emitted from the skybox. I was thinking about this but this won’t really fix the issue with the light bleeding as far as I’m aware.

This is true, that’s why EnvironmentDiffuseScale is being used to reflect light off of the skybox at night. It’s not completely black.

1 Like

so why not to make a script that will smoothly change game lighting properties?

I’ll try that right now and see if this solution works.

Why do you think that will not work? just make a script that will change lighting smoothly depending on a day time, it’s not that hard to make it

That’s not the hard part, the properties are the hard part.

I can’t get a non-pitch-black shadow without making the interior of the building overly bright.

make a script that will change lighting properties when you enter/leave house

I made a script, but the house has windows on it. When you look outside the window you can see that other shadows have issues and look completely different when outside the house.

make a half cirle mesh, that will be visible only when you’re inside of a building, and then put a outdoor texture on it, after that if your lighting properties will change outdoor will look the same, u can make diffrent variations depending on a day time