View Full Version : Light Leak
12-07-2010, 04:34 PM
Hey guys, im having a problem in my environment with light leaks. I have 2 walls, both static mesh size 16 width, one wall is straight other is at a slight angel. Even when i weld it to a one object it still leaks. The main light is a dominant light if that matters>?
12-07-2010, 07:57 PM
Are you baking you lighting?
How do your lightmap UVs look?
Do you have enough padding between your lightmap UV shells?
You need at least 4 pixels between each shell to avoid lightmap bleeding.
Though I've heard that lightmaps are being mip mapped in the newer versions of UDK so it might happen even with a 4 pixel pad.
See this tutorial (http://stephenjameson.com/tutorials/lightmap-uvs-tutorial/) and this page (http://udn.epicgames.com/Three/LightMapUnwrapping.html) on UDN if you need more info on lightmap UVs.
Though it kind of looks like it's the screen space ambient occlusion causing that black border between your wall and floor, if that's what you are talking about.
I think you can turn it off in the World Properties of your level.
View -> World Properties -> WorldInfo -> Default Post Process Settings -> Allow Ambient Occlusion
Or possibly learn how to tweak the SSAO settings here (http://udn.epicgames.com/Three/PostProcessEditorUserGuide.html#AmbientOcclusionEf fect). I haven't done this ever though, so I'm not sure if I'm pointing you in the right direction.
12-08-2010, 12:12 AM
Yes im baking lighting i tried production as well. Where can i look at the lightmap UV? I know the floor is AO im talking about the ceiling. Ill try the tutorial you gave me, very good stuff im sure answer is in there. I did not know 4 pixels is needed. I literally just took my mesh into unreal, no uv's nothing to try and block out scale. Could that be the issue, if i actually unwrapped it, then the pixel we be in the correct place and fix the light leak?
12-08-2010, 01:07 AM
Yeah, for each unique static mesh you will typically need to make two sets of UVs.
The first set of UVs will be optimized for your texture maps by various means such as tiling, stacking, mirroring, etc... in order to maximize texture resolution which makes them unsuitable for lightmaps.
The second set of UVs will be made specifically for baking lightmaps, they usually give each part of the mesh some unique UV space, so very little to no overlapping.
Lightmaps are usually very low resolution to conserve memory so the UVs for them need to be made with a lot of padding to avoid light bleeding between shells (3-4 pixels between each shell).
I'd would guess that production lightmap sizes could be in the range of 16, 32, 64, or 128 pixels square for props (depending on their size and how close the player can get to them) and maybe 256 and larger for buildings and terrain might be appropriate depending on how large your scene is and how many objects there are.
For a portfolio piece it's probably OK (and maybe a good idea) to use larger lightmap sizes in order to make things look good, though you will suffer longer lightmap build times.
If you know how big you are planning to make your lightmap then you can layout your UVs very precisely to use what little space you have to it's fullest.
I hope that helps.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.