Jump to content

Lighting: What can I do about light that bleeds through walls?


MisterGravity
 Share

Recommended Posts

 

I have a spotlight overhead and it's the only light in the area. It's actually way up in the air, not right over here. When I enter this room, in real life it would be pitch black because there is no light in there yet, but light bleeds through the walls. How can I prevent this?

 

Also: How do I make youtube videos embed!?

I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience.

Link to comment
Share on other sites

I see what you mean, but that little light in the corners isn't why it's not pitch black. Ambient light in the scene is why it's not pitch black. Turn that all the way down (make it black) and then it'll look more like what you want, but to me it looks like maybe there is a crack in the top corner as well?

 

Click on 'Root' and change your ambient light to 0 for all values

Link to comment
Share on other sites

I see what you mean, but that little light in the corners isn't why it's not pitch black. Ambient light in the scene is why it's not pitch black. Turn that all the way down (make it black) and then it'll look more like what you want, but to me it looks like maybe there is a crack in the top corner as well?

 

Click on 'Root' and change your ambient light to 0 for all values

 

Changing my Root ambient light certainly helped, but there must be a science to connecting ceilings and walls properly as to block out external light. There are no cracks, and yet I still see the bleed. It'll just take some playing with it I think. I'll refrain from saying "That's what she said" right there.

I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience.

Link to comment
Share on other sites

Yeah, I don't get that. Make sure you are using the 2D views to make sure you have no gaps between walls/ceiling.

 

Actually, I figured it out after playing with it. I'd move this wall down a bit, and see that there was bleed through from a brush on the other side. Once I either moved it back or covered it up, I was able to patch all the holes.

 

Reality in the universe says that it shouldn't have bled through anyway in a sealed room, but 3D brushes say nope, nope, there's still a side picking up light. Cover it up or do better mapping.

I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience.

Link to comment
Share on other sites

This problem has been present with all versions of le and has been reported more than once.I was told to make walls thicker and when I did it makes no difference.I tried darkening the textures inside a room and that helped but did not solve problem entirely. Reducing ambient light reduces the light everywhere which is not what you want maybe

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

The thing is, realistically, you wouldn't have any ambient light at all. There is no such thing in the real world. If you wanted to simulation the real world you'd turn ambient light all the way down and have directional light for the sun and other lights for human light sources. This seems to work well in LE 3.1 for me. I tested what Mister had in his video and it worked for me.

Link to comment
Share on other sites

I have to disagree on the ambient light... in the real world it's everywhere, light bouncing off walls, indirect lighting from the sky etc. Only that's impossible to calculate, so the ambient is a hack to somehow include that. Personally, I find scenes without ambient unrealistically dark. Would be nice, however, if you were able to define zones for different ambient light values - if you're outside the intensity and color certainly is different than when your're inside a room.

Link to comment
Share on other sites

It's easy, just make roof and walls 0.01-0.25 thick and they bleed in the corners/intersections, everything above 0.25 seems pretty sealed. 0.5 or higer would be recommended.

 

So basicly make thicker walls/roofs.

It depends on the light intensity, had to make one wall 1.25 to keep the light out....

I think thats a serious bug to be fixed :)

Link to comment
Share on other sites

I have to disagree on the ambient light... in the real world it's everywhere,

 

It's everywhere because there are literally lights everywhere. Just look how many lights are in an office building or a home. It's insane. Of course the bouncing effect we don't really get here, but when you have very little light, in a dark room it really does look really dark.

Link to comment
Share on other sites

@Rick: If you have no (direct) light, then you have no light bouncing around, that's true. But take for example light shining through a window as in the screenshots here in the middle of the page

 

http://en.wikipedia.org/wiki/Radiosity_(computer_graphics)

 

On the left side they even use ambient light, without it the shadows would hard and black, but that's simply unrealistic. The image on the right uses a radiosity method and is much more appealing, at least to my eyes.

 

But again, having zones of different ambient lighting would be an improvement.

Link to comment
Share on other sites

In theory we could do something like this :

 

self.shader=Shader:Load("Shaders/Lighting/directionallight.shader")
self.shader:SetVec4("ambientlight",0.1,0.1,0.1,1)

 

But I think I hit a bug.

 

But then again why not use this from any script :

App.world:SetAmbientLight(0.08,0.08,0.18)

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

This is how I ended up fixing it. Say my wall went up 9 "blocks" and the ceiling was the 10th block. I simply made the ceiling not extend as far, and the wall went up to the ceilings height instead. This blocked that bad section where light was getting in.

 

If that was clear as mud, imagine you're looking at a room from a top down view. The 4 walls surround the ceiling brush, rather than the ceiling brush overlapping the 4 walls. That's how I fixed it.

I'm sure I'll have a million questions in my quest to master the Leadwerks Engine. Thank you for your patience.

Link to comment
Share on other sites

That looks good. Have you got terrain as well?

I find that reducing the diffuse brightness of directional ligh helps a lot. You can also rotate it to check different angles and their lighting effects.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

Turn that all the way down (make it black) and then it'll look more like what you want, but to me it looks like maybe there is a crack in the top corner as well?

 

When rendering you almost never try to copy the real world you rather try to simulate it (fake it).. Copying real world as it is is called physically based rendering and it doesn't have the best performance. Ambient light is a simulation of light bouncing of surfaces. It's too much to calculate all of those bounces and therefore it is faked with ambient light If you wanted to get worried about how stuff works in real world compared to rendering you might want to also worry about the fact that lights are rendered from object to the light and not the other way around. Or the fact that the world moves around the camera and not vice versa... all of these are details the end user never see's but doesn't realize either.

 

Regarding the light going through walls you need to make the walls thicker. This is a very common rendering problem when it comes to lighting so I wouldn't call it a bug since I've seen it in just about any engine I've used. Also read herer: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/

If the CSG was actual CSG and not fake CSG then the gap would be closed when the CSG was merged and it would be ok even with thin walls but since its fake CSG it doesn't make one complete model.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...