Search Unity

Recommended starting point for light mapper settings for medium to high end desktop

Discussion in 'Global Illumination' started by corb555, Mar 7, 2021.

  1. corb555

    corb555

    Joined:
    Apr 27, 2013
    Posts:
    13
    Lightmapping has a large number of settings with many of them having a huge range of possible values. I'm trying to find a reasonable balance between quality and lightmapping time. My system is a 6 Core Core I7 with an AMD Radeon RX 5700 XT GPU. It currently takes 12 hours to do lightmapping on a scene with 170M texels and the results are significantly worse than realtime lighting. Almost all the time is CPU. When the GPU is used it quickly finishes. What I'm looking for is a reasonable starting point for all the settings for a game on a high end desktop. I've looked thru tutorials and manuals and all the descriptions I've found are very vague. If there's a tutorial with actual recommended starting points for a high-end system, I'd love to see it. The only setting I've really been able to settle on is Lightmap Resolution, which seems like it has to be 40-50 for decent results. I'm using URP with 2020.2.5f1. These are my settings:

    === Scene ===
    Baked Gbl Illumination: ON
    Lighgting Mode: Shadowmask

    Lightmapper: Progress GPU
    Progressive Updates: OFF
    Mulitple Importance Sampling: ON
    Direct Samples: 40
    Indirect Samples: 280
    Env Samples: 120
    Light Probe Multiplier: 2
    Max bounce: 2
    Min bounce: 1
    Filtering: auto
    Lightmap Resolution: 45
    Padding: 4
    Lightmap size: 2048
    Compress: ON
    Ambient Occlusion: OFF
    Directional Mode: Directional
    Albedo: 1
    Indirect Intensity: 3.31
    Lightmap Parameters: Default-HighResolution
    GPU Baking Device: AMD Radeon RX 5700XT

    === Environment ===
    Env lighting
    Source: Color
    Env Reflections:
    skybox
    resolution 128
    COmpression Auto
    intensity multiplier: 0.63
    bounces: 1
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Settings are very scene dependant so there can not be "good starting point" settings.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Lightmap Resolution range: 0.5 to 100, depending on scene size. For my scenes I generally stick to something like 10.
    Direct Samples: 64 to 4096 (you may need to go above that if you do something crazy with area lights or something, but 4096 should generally be more than plenty). For my scenes 1024 is usually enough.
    Indirect Samples: 512 to Infinity. For my scenes, I typically have indirect samples of 64000 and upwards.

    Filtering : Off (unless you want faster iteration and getting something decent to look at fast,, then use one of the denoising algorithms)
     
    corb555 likes this.
  4. corb555

    corb555

    Joined:
    Apr 27, 2013
    Posts:
    13
    Thanks - that is very helpful! What is the visible effect of increasing or decreasing Indirect Samples? I've tried a small scene and changing those values but it doesn't seem to have the same effect with a larger scene and I really can't tell what it's doing.
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Low indirect samples will add noise to your lighting. Filtering is supposed to hide the noise, so make sure the filtering is off.

    The best setup to see what it does is have an interior scene (it can be just an inside out box with a small window / hole, that has some light coming from the outside) and then look at the results with really low indirect rays and filtering off.
     
    corb555 likes this.
  6. akobitooy

    akobitooy

    Joined:
    Jul 27, 2022
    Posts:
    2
    hi, any idea why when i try to generate lightmap UV from my sketchup model in unity, i takes forever to finish to generate?
     
  7. db-eopus

    db-eopus

    Joined:
    Mar 9, 2021
    Posts:
    2
    @akobitooy I suppose you have only one UV-Channel in your Models and have Unity take care of generating the UV-Layout for the Lighmapper. Making the second UV-Channel yourself for your models will decrease time for rendering Lightmaps substantially.
    If its not possible in sketchup you can use Blender.
     
  8. godfucker3000

    godfucker3000

    Joined:
    Nov 6, 2020
    Posts:
    8
    AcidArrow i wanted to personally thank you for making lost echo, it's perhaps the best game ive played on a mobile device
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Uhhh. :oops: Cheers!

    Next time feel free to PM me instead (or use e-mail / social media?), which is probably more appropriate than a public forum about Unity.

    But thank you :)
     
    Immersive-Matthew likes this.
  10. unity_FQWydj6CQtx6bg

    unity_FQWydj6CQtx6bg

    Joined:
    Aug 24, 2023
    Posts:
    1
    bro its right in your signature haha

    also thanks for the answer here I was just about to bake all the lighting in blender out of pure frustration.
    mvp