Jump to content
CaptCanada

Light shining through walls

Recommended Posts

Hi all

I have a basic PB building and in each end of the room, the directional light seems to be shining through the walls, even though I have Shadows set to Two Sided.

I am using GAIA for the terrain and have the lighting set to Afternoon Light, for those familiar with the program.

This problem doesn't happen with non PB buildings/objects.

Any ideas as to what is going on?

Thanks

Unity 3D 2017.09.12 - 21.58.57.02.png

Unity 3D 2017.09.12 - 21.59.06.03.png

Share this post


Link to post
Share on other sites

Hmm, seems odd that your building just a bit further away (middle of image) is not casting a shadow onto the ground, and the building on the left is casting a very "blobby" shadow. Maybe Gaia is changing the Shadow Distance and other quality settings? You've probably already checked this...but if you move in closer to that wall (first post image), does the shadow effect change?

Maybe a simpler test- can you create a new scene, recreate that building, and see how it looks with a standard Directional Light? I've built up a few different versions here and can't get that issue to show up, guessing it must be something to do with Gaia settings.

 

Share this post


Link to post
Share on other sites

Thanks for the reply.

The building in the distance doesn't suffer from the "light leak" that the foreground building does, though I constructed both similarly.

I was looking at the settings for the directional light when I change the lighting presets in GAIA. It seems that each preset just changes the position, rotation and light intensity.

I might just try and setup the scene that I currently have to use a directional light without any GAIA presets and see what happens.

I will also recreate the scene in Unity using the default settings and directional light and see if I get the same problem.

Yes, as I move closer to either wall in the new building, the shadow effect changes and the visible light/shadow slowly disappears.

 

Share this post


Link to post
Share on other sites

Glad my confused pointing has helped, a bit :)

Sounds like this is probably a lighting quality issue, mixed with "lighting mode"...there's a lot that can go on there.

However- there definitely shouldn't be a lighting difference between ProBuilder objects and Unity objects (cubes), if they are configured the same. This might be important- ProBuilder objects are, by default, marked as "Static" while Unity cubes are not. If you change that Static checkbox to match on either, what happens?

Share this post


Link to post
Share on other sites

When I change the buildings walls to Static nothing changes.

I have found that when I disable the Directional light and use the GAIA light presets, the bleed through issue goes away.

I'm not sure if you are familiar with GAIA, but you create a new scene, which adds a default directional light and default terrain. When you then create your GAIA terrain, you can choose a lighting preset, which it seems just relocates the directional light and alters the intensity.

 

Share this post


Link to post
Share on other sites

I tried a new default scene using the default directional light and I still get the "bleed through" effect.

You mentioned that you had tried a couple of different versions and didn't get the same issues as I am, so maybe it is something that I am doing or not doing?

Could you show me a screenshot of one of your versions so that I can compare and see what setting or parameter I have that may be causing the issue?

 

Thanks!

 

Share this post


Link to post
Share on other sites
On 9/14/2017 at 12:44 AM, CaptCanada said:

When I change the buildings walls to Static nothing changes.

I have found that when I disable the Directional light and use the GAIA light presets, the bleed through issue goes away.

I'm not sure if you are familiar with GAIA, but you create a new scene, which adds a default directional light and default terrain. When you then create your GAIA terrain, you can choose a lighting preset, which it seems just relocates the directional light and alters the intensity.

 

I'm confused- in your screenshot, the wall is already Static?
Also, if you disable the Directional Light, I don't think there would be any lighting left, unless your scene has two Directional Lights?
I haven't used GAIA, sorry.

On 9/14/2017 at 1:04 AM, CaptCanada said:

I tried a new default scene using the default directional light and I still get the "bleed through" effect.

You mentioned that you had tried a couple of different versions and didn't get the same issues as I am, so maybe it is something that I am doing or not doing?

Could you show me a screenshot of one of your versions so that I can compare and see what setting or parameter I have that may be causing the issue?

 

Thanks!

 

Hmm, I didn't try versions, just different lighting options (Realtime, Mixed Baked) on the Directional Light. Or is that what you mean there?

On 9/14/2017 at 3:38 AM, CaptCanada said:

I tried a new scene in Unity 2017.1 using GAIA and a small PB object.

Using the defaults, there seems to be no "bleed through".  Unfortunately, I don't really want to port my current project to 2017.1.

 

Yep, this and the previous qoute make me suspicious of general lighting and quality settings for the project. Perhaps altered by GAIA, but perhaps not. What happens if you try the same thing, a new project, in your older version of Unity?

18 hours ago, CaptCanada said:

I've read online that using baked lighting instead of realtime lighting, which I am using, may fix my issue?

 

Well, it could solve it, but it's not so much a "solve" as a different route. Baked lighting vs Realtime lighting is a super important decision for your game, it'd be much better to find the source of the issue, solve that, and then choose a lighting mode based on your game's needs :)

Share this post


Link to post
Share on other sites
On 9/15/2017 at 7:07 AM, GabrielW said:

I'm confused- in your screenshot, the wall is already Static?
Also, if you disable the Directional Light, I don't think there would be any lighting left, unless your scene has two Directional Lights?
I haven't used GAIA, sorry.

Hmm, I didn't try versions, just different lighting options (Realtime, Mixed Baked) on the Directional Light. Or is that what you mean there?

Yep, this and the previous qoute make me suspicious of general lighting and quality settings for the project. Perhaps altered by GAIA, but perhaps not. What happens if you try the same thing, a new project, in your older version of Unity?

Well, it could solve it, but it's not so much a "solve" as a different route. Baked lighting vs Realtime lighting is a super important decision for your game, it'd be much better to find the source of the issue, solve that, and then choose a lighting mode based on your game's needs :)

All of my PB objects I was using were set to Static.

As for versions, confusion was on my part!

I basically created a new scene as I wasn't sure what settings I may have messed up/remessed up and I no longer have the bleed through issue.

I guess the lesson here is on change one setting at a time and see what happens as opposed to changing a bunch of settings at once and wonder what went wrong when it doesn't work out.

 

Thanks for the help

 

Share this post


Link to post
Share on other sites

Hi! Yep, changing a lot at once can be dangerous, especially with lighting and quality items. Sorry I'm not able to help more specifically on that! Perhaps you can do a simple "reset" to your settings, in the main project? You'd lose any special GAIA settings, but it might work out for the better.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×