Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lightmapping questions

Discussion in 'Global Illumination' started by Artkovski, Feb 14, 2019.

  1. Artkovski

    Artkovski

    Joined:
    Feb 9, 2014
    Posts:
    11
    Hey, I have been baking a lot of lighting lately and I'm starting to understand the tools better, but also encounter some odd behaviors.

    Progressive Lightmapper
    When using Progressive Lightmapper, the UV charts are not optimized at all. It only uses a quarter of the available atlas space, and it spreads the UV charts on the left and bottom edge of it, regardless of the Lightmap size.
    Is that how it's supposed to work? I really like the speed of it but couldn't find a way around the UV charts issue.

    Later edit: I have found out this is a known issue and is work in progress.

    Enlighten Lightmapper
    Unity manual mentions that the Indirect Resolution setting is only available when Realtime Global Illumination is enabled.
    When using Enlighten Lightmapper, I found this not being the case. Indirect Resolution is available even if I have Realtime Global Illumination unchecked. Not only that, but it also affects my baking time (clustering stage) if I increase or decrease that number.
    If Clustering is used only for realtime global illumination, then that baking stage should be excluded if RGI is not checked?

    Here are the documentation links for reference:
    https://docs.unity3d.com/Manual/GI-Enlighten.html
    https://docs.unity3d.com/Manual/UsingPrecomputedLighting.html

    If anyone understand this stuff better, let me know what/if I'm missing something. For this particular project I'm on version 2018.2.12f1.

    Thanks!
     
    Last edited: Feb 14, 2019
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey! Indirect Resolution is shared by both Realtime GI and Baked GI, since both of those methods are using the same backend which is Enlighten. Cranking this setting up increases the number of clusters. This increases the quality of indirect GI quality and resolution, but also exponentially increases the bake times.

    You can visualize those clusters in the Clustering scene view mode after baking.
     
  3. Artkovski

    Artkovski

    Joined:
    Feb 9, 2014
    Posts:
    11
    Thanks for the reply!

    Just to make sure I understand this right:

    So even if I bake my lighting with the Realtime GI unchecked, the Indirect Resolution value will affect the quality of my baked maps and the time required to bake them?

    I still find the wording in the manual ambiguous:
    Indirect Resolution - "This property is only available when Realtime Global Illumination is enabled."
    I have it disabled and that property is still available and also having a big impact on my baking time, so maybe that should be more clear.
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey @Trpunu!

    You're rightfully confused by the docs, as they are incorrect. :) We'll fix them.

    The indirect resolution is used both for realtime GI and baked GI when using Enlighten. Baked GI with Enlighten needs to do a precompute first (calculate the data for realtime GI). Then it can use a different resolution for the final output as it can either extrapolate from the realtime GI data (with some additional visibility checks) or do a final gather step to increase the quality further.
     
    Artkovski likes this.