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
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)
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.
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.
@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.