i have a problem thats giving me a headache since 2 days and i don’t find a solution.
I googled like hell (maybe i just used the wrong keywords) but i only found one other guy with the same problem.
i only use one directional light as the sun in realtime mode. No baked lights.
The problem is, the lights and shadows are bleeding in the corners.
My Geometry is solid and has thickness. There are three pieces of geometry: the roof, the floor and the walls (all walls together are one mesh).
The meshes fit perfect together (no intersection and no gap.
All meshes have three UV-Layouts (i dont even know if they need them, but for testing i tried it).
So i thought it would be a problem with my light-properties or something. I made a new blank scene and put Unity-Cubes together to test it out. Still the same problem!
i already played with the resolution.
Does someone have an idea?
I am working in a similar setup. Are you still generating Lightmap UVs? If so try advanced settings of Hard Angle 60, Pack Margin 16, Angle Error 1, and Area Error 1. One thing I also did to combat the light leaking was to put a emission value of .25 on my interior walls/ceilings; this kind of makes everything a little white but evens out all the corners and seams. Try playing with that as well as your sun with bounce/Indirect GI.
hey, many thanks for the reply.
i generate lightmap uv’s in unity with your suggested settings. (hard angle of 60, pack margin… etc.)
i will try your workaround and test some more setups.
after some try-and-errors i think the problem is the automatic uv-generation with enlighten. it seems not to work properly with my model.
As you can see, the lightmap uv seems to be shitty (some polygons are not lit). Maybe there is something wrong with my model.
i reimported the same model with and without three uv-layouts. (the first model has three uvs, the second is the same model with only my texture-uv)
it seems that enlighten unwraps my model depending on the existing uv-layout in the third slot.
i tried precomputing with different resolutions but my problem still appears.
Please go to the Lighting window, Object tab and with the object in question selected, look at the preview of Realtime Intensity. The problem is likely caused by the UVs but it is very hard to see in the final image. Looking at the problem in lightmap space is often much more useful.
Hello KEngelstoft,
thanks for the reply. here is a screenshot of the realtime intensity on the floor. The ceiling looks similar.
no matter if i generate the lightmap-uvs inside blender or in unity (with different settings)… bleeding still occurs.
yup, i tried to increase the resolution but its still bleeding.
i cranked the resolution up to 15 what should be enough. it precomputes more than one hour but still looks horrible.
I found increasing the realtime resolution helped somewhat, but also making walls actually intersect, and also making the walls thicker. There are still a lot of problems though that I’m trying to figure out.
My next step to improve things further was to make everything one mesh (in a 3d modelling program). This yields the most accurate lightmap so far, but STILL there’s a little bit of bleed. will let you know if I come up with a solution.
[SOLVED] OK. I’m about to be everyone’s best friend in the whole world. No amount of tweaking the GI settings will get rid of the artifacts that you’re experiencing.
The solution is just to scale your whole world up (about 5 times from the standard scale) and set your realtime resolution back down to 1 if you’ve increased it. If that’s too heavy, play with the scale of your level, the larger it is, the more texels there are to compute. you can also set your realtime resolution to be less than 1. It’s something to do with the way that indirect lighting is calculated. You might also find that turning Indirect Intensity down to a very low number ie. 0.04 or less, and then turning every other light bounce setting to max (in the GI settings and on the light itself) could get rid of some artifacts.
You will obviously have to turn gravity up to compensate.
The next thing you want to do is make sure that where geometry is touching, that it IS intersecting. If two faces are perfectly touching, light will still get through and you will get artifacts.
It fixes these problems:
Experiencing bleed on a wall where your geometry is meeting
Light shining through solid walls
Light on walls adjacent to where you have a door or window or similar
Now I just have to figure out why blend probes aren’t working on my dynamic objects…
OK, also if you have light bleeding right through to a room where it should never reach, check the scale of your light is not too big. It’s as if light emanates from every part of the light’s bounding shape.
sorry, but nothing is [SOLVED]!!
if i get it right, the “precomputed resolution” slider just works as an multiplier. So, if i make the model five times bigger, its the same result as i pump up the resolution to 5.
one thing helped me: i didn’t import all meshes at once as an prefab (3ds max fbx export).
I imported every mesh for its own and reassembled them inside unity. nearly no bleeding.
now we went away from realtime-GI and try to bake the shadows.
The damn bleeding still occurs. I tested different setups on the model and the uvs.
My light- and importsettings (i tried calculated and imported normals and for the lightmap-uvlayout i didnt generate uvs):
It looks like the door is pretty thin, and the lighting changed dramatically ie it happens between indoors and outdoors. Assuming this is a directional light, it means there’s not enough padding in the lightmap uvs.
If using point lights, that’s a different problem (they don’t get occluded afaik). I would probably split the mesh on the floor so the inside floor does not share uv island with outside floor. That’s just off the top of my head, rather than based on testing.