MisterGravity Posted January 15, 2014 Share Posted January 15, 2014 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!? Quote 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 More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 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 Quote Link to comment Share on other sites More sharing options...
MisterGravity Posted January 15, 2014 Author Share Posted January 15, 2014 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. Quote 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 More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 Yeah, I don't get that. Make sure you are using the 2D views to make sure you have no gaps between walls/ceiling. Quote Link to comment Share on other sites More sharing options...
MisterGravity Posted January 15, 2014 Author Share Posted January 15, 2014 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. Quote 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 More sharing options...
cassius Posted January 15, 2014 Share Posted January 15, 2014 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 Quote 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 More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
Mycekralid Posted January 15, 2014 Share Posted January 15, 2014 Checked it, have the same problem.... Edit: It's not about the ambient light its about creating a box and light leaks through the corners... thats pretty ugly :/ Quote Link to comment Share on other sites More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 I don't undestand how you guys are getting this. I can try again tonight but I'm not getting leaks like that. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 15, 2014 Share Posted January 15, 2014 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. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rastar Posted January 15, 2014 Share Posted January 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
Mycekralid Posted January 15, 2014 Share Posted January 15, 2014 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 Quote Link to comment Share on other sites More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
Shirk Posted January 15, 2014 Share Posted January 15, 2014 This is a problem with deferred lighting, its hard to solve. Personally Id love to see baked lighting to calculate radiosity. Quote Link to comment Share on other sites More sharing options...
Rastar Posted January 15, 2014 Share Posted January 15, 2014 @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. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 15, 2014 Share Posted January 15, 2014 Could we sort of fake this with point lights by chance? Might be tedious but seems like it could work. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 15, 2014 Share Posted January 15, 2014 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) Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
MisterGravity Posted January 15, 2014 Author Share Posted January 15, 2014 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. Quote 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 More sharing options...
cassius Posted January 15, 2014 Share Posted January 15, 2014 I notice in my game that the roblem is worse with brush made models. (in 3dws)The models I purchased from arteria or dexsoft are no letting much light in. Quote 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 More sharing options...
MisterGravity Posted January 16, 2014 Author Share Posted January 16, 2014 Once I got the room sealed, this is what I did with it. Quote 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 More sharing options...
cassius Posted January 16, 2014 Share Posted January 16, 2014 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. Quote 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 More sharing options...
Road Kill Kenny Posted January 16, 2014 Share Posted January 16, 2014 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. Quote 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 More sharing options...
Rick Posted January 16, 2014 Share Posted January 16, 2014 When rendering you almost never try to copy the real world Long time no see Ken, I get that, but he said he wanted it completely dark, so I showed him how to do that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.