Search Unity

Light Leaking / Bleeding Dilemma

Discussion in 'Global Illumination' started by DazBailey, Jul 31, 2015.

  1. DazBailey

    DazBailey

    Joined:
    Jul 7, 2014
    Posts:
    14
    So I've been trying to find a decent solution for how to stop light from bleeding through walls, namely at the top and bottom where they meet the floor / ceiling respectively.

    Now I know that If I stitch the entire geometry up, I.E have the floor / ceiling / walls all as one large block, it works just fine, but the issue with this comes when its allowing for customization in real-time for these elements, such as textures, colours etc. I know that I can assign different material IDs to each of the elements and do it that way, but then I hit another issue, which is the reflection probes. Given its one large mesh, the reflections will be awful and unrealistic without exploding the mesh apart I feel.

    So here's an example:

    Stitched Geo:



    stiched.png

    Works just fine, but not so good for customization.

    Not Stitched but Overlapped Geo (Tried snapping it so no gaps and overlapping it)

    NoneSticks.png

    Awful bleeds, but would allow for better customization.

    Any advice guys on a best solution would be massive for me.

    Thanks

    Darren
     
  2. Pawige

    Pawige

    Joined:
    Nov 26, 2012
    Posts:
    40
    What's your baked resolution? How thick are those walls? It looks to me like maybe the light on the other side of the wall is just showing through on the lightmaps. I'd try either upping the baked resolution or you could put a lightmap seam (split it into two different UV islands) along the edge under the wall.
     
  3. DazBailey

    DazBailey

    Joined:
    Jul 7, 2014
    Posts:
    14
    Thanks for thr reply,

    The walls are 300mm thick, so .3 in unity. I tried upped the resolution, even tried making custom light map parameters and messing with the settings there. I believe the realtime resolution is set to 4.
     
  4. reset

    reset

    Joined:
    May 22, 2009
    Posts:
    393
    Have found a solution for this? I have the same issues.
     
  5. CarinaMclane

    CarinaMclane

    Joined:
    Mar 12, 2014
    Posts:
    23
    I am not 100% with how Enlighten handles the meshing, but it would seem to me that it may make a difference if you added a thin strip of polygons along the edge and allowed them to overlap ever so slightly. Have a scene where I'm giving this a bit of a try this evening so can report back after that. My reasoning would be, if you have a big polygon and one corner of it was subject to a slight error in the lighting calculations, that error would propagate significantly further into that surface than if it was smaller, and that it would handle a gap worse than an overlap.
     
    reset likes this.