Search Unity

Strange lighting error in baked lightmap

Discussion in 'Global Illumination' started by AndersMalmgren, May 16, 2018.

  1. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    So, hmm, the systems color missmatch bug seems fixed in 2017.4.5

    upload_2018-6-14_0-8-43.png

    But now I instead get massive edge bleed between meshes which I did not get as many in 2017.4.4 :p
     
    JamesArndt likes this.
  2. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    It's funny how a lot of the Beast lightmap bakes looked better than this and that was much older tech. Shoot I've seen PS2 era games with nicer looking light baking. How can one of the biggest game engines in the world still not get light baking right? This might work for a lesser known, small scale engine, but Unity has always prided itself on it's ease of use and that it's features "just work" right out of the box. The lightmapping in Unity does not just work right out of the box with clean results. I'm over bitching about it, but I wish I knew how I could affect change and help get this lightmapper working the way it should. Especially for us mobile development guys...lightmapping is pivotal for a good amount of 3D games.
     
    AndersMalmgren likes this.
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah, VR dev here, so in the same boat, until a new Renderer surface that can output solid real time GI at 90 fps at all times
     
    JamesArndt likes this.
  4. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Unity have responded on my Bug report I created for this and they can reproduce the lightmap problem and have sent it to the devs, so lets see what they have to say.
     
  5. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Isnt this really strange, I have mesh baked together these meshes with Meshbaker and I still get a seam

    upload_2018-6-21_19-31-24.png

    How should I fix seams like this?
     
  6. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Meshbaker probably just merged the meshes into one mesh, not actually welded the vertices and fixes seams.

    Select mesh asset and go to Generate Lightmap UVs > Pack Margin and make it 10 or higher and rebake.
     
  7. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I tried higher values (not 10 but 0,1 instead of the default 0.005), but it gave really wierd result, will try again and post a screen shot. Strange thing is this exakt door post mesh works on some places without bleed (and without mesh baking) and at other places gives bleed like this. baking is really messy

    edit: ah, not the mehs baker settings but the UNity UVs settings, got it
     
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Other strange things with enlighten, this red light has soft shadows set

    upload_2018-6-22_11-28-18.png

    Still bleeds through solid meshes
    upload_2018-6-22_11-29-43.png
     
    JamesArndt likes this.
  10. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    I mean on the mesh that is joined together. The mesh that contains the door and the window.
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    I believe that's because indirect shadowing doesn't work with enlighten. Means the direct light does cast shadows, but it produces indirect light as if it doesn't. It's a limitation of enlighten.
     
  12. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Realtime GI is off, this if baked only, but you maybe ment baked indirect ?
    All meshes has 32 margin, I can try I creasing more but I doubt it help, what's funny is that at other places it work better with almost no visible joint. At most places I can use a pillar to hide the seam, but not always :/
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    I could be wrong, or it may have changed recently, but if you're using enlighten, a lot of the weaknesses of realtime GI do transfer to the Enlighten's baked GI as well.
     
  14. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah it feels like lighting is Unitys big achilles heel right now, 2018 is fixing much of the other problems but lighting still is a big mess, specially if you are in VR like us and need baked lighting
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    Out of curiosity, why aren't you using the progressive lightmapper?
     
  16. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    It's too slow for larger scenes. Our biggest scene is 512x512 meters and it just doesn't work with the PLM
     
  17. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    Fair enough. I use PLM almost exclusively these days, but my scenes are small-ish.
     
  18. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah , our biggest scene take a few hours on a 8 core 2700x Ryzen with enlighten. For fun I tried PLM and after 12 hours I gave up it wasn't even near done
     
  19. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    @AnderMalmgren

    Did you ever fix the issues with the seams? I'm currently using enlighten, use Meshbaker and have the same exact issue in SOME places with the same mesh and some places its fine.


    By the way, small world..LOL...just noticing that we were chatting on another thread. I ended up installing Oculus Audio and writing my own occlusion code.
     
  20. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Nope haven't worked more on these matters.