Search Unity

Zero width assets and GI,PL

Discussion in 'Global Illumination' started by konsic, Jan 10, 2020.

  1. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Is it better to create zero width assets or with assets with thickness when using progressive lightmapper baked indirect and realtime GI in HDRP?

    Assest which have thickness would theoretically produce more lightmaps and longer build. Is that correct?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    Depends on the scene.
     
  3. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    How do you mean ?
     
  4. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    I always thought you NEEDED thickness to prevent light bleeding issues. That being said I don't intend to bake LMs anytime soon again lol .
     
    Last edited: Jan 10, 2020
  5. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    If I don't use faces which are infinitely close, then lightmaps should be smaller in size, right ?
    u2.JPG
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    That's mostly for real time lights. For completely baked stuff, it's better without thickness, but again depends on the setup.

    The best compromise is to model single sided face for the interiors and then enclose that whole environment with some dummy geometry that is there only to cast shadows and avoid bleeding and is set as static with a lightmap scaling of 0.
     
  7. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    In my tests it doesn't matter . . . planes without thickness cause light bleeding issues regardless if they are seemless.

    Well last time I tried enlighten. . .
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    I'm not talking about enlighten (and I'm assuming konsic isn't either)
     
    iamthwee likes this.
  9. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    hmm interesting, never knew that.
     
  10. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    PL = progressive lightmapper
     
  11. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    If you need a lightmap texture on both sides, then you'll need to use a thick mesh. Otherwise, you only have one set of UV coordinates and there's no way to store different lightmap information for either side.
    If you just need the geometry as a blocker that contributes to the GI calculations, but doesn't need a lightmap, you can use thin geometry, in most cases with a double sided material to avoid invalid ray queries.
    You can also setup thin geometry and only light it via probes now, but you'll need a current version of the editor for this feature.
     
  12. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    In order to use it, I need to set geometry to static and in every mesh panel switch from lightmaps to light probes?
     
  13. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    There's a blog post about how this feature works.