Searchโ€ฆ
Lightmapping
A guide to light mapping in Unity
Some helpful reminders to lightmapping
1. Make sure that anything that is going to be lightmapped is set to static found in the top right of inspector on object. Can be done with multiple objects selected and if you do it to a parent object it will give you the option to apply it to all children.
2. Make absolutely sure that, unless you are importing custom lightmap UVs, to turn on Automatic Unwrap lightmap on each object you import into your scene. If you don't Unity will give that it's own lightmap adding significantly to the number of lightmaps and therefore size of package. This made my lightmap count go from 30-40 to 2.
3. Make sure that any lights that are used for lightmapping are set to baked (or mixed I guess). Anything that is set to realtime will not be included.
4. One of the main things that sets how many lightmaps is lightmap resolution in the Lightmapping Settings. Find the sweet spot between max lightmap size (1024/2048 etc.) and lightmap resolution.
5. If you are all in on optimization, if the polygon will not be seen by a user, get rid of it. Otherwise this will go towards the overall lightmap texture space which is a bit of a waste. Especially important for large polygons (floors/ceilings/walls) eg. if you have a ceiling and there are polygons on the other side that are never seen, get rid of the outside polygons. If you have a light source outside though and need the outside to caste the shadow (polygons are one sided, so light passes through single polygons from one side), then separate the top polygons and use that as a NON static model so it doesn't contribute to the lightmap.
Credit to TheMattEmpire42โ€‹
Last modified 1mo ago
Copy link