I’ve been working in Unity for about half a year. Working in baked Lighting for about a month.
So far I’ve baked different projects of different sizes around… 30 times with pretty good results, but these are the slowest rates I’ve ever gotten. I’ve had smaller projects with similar settings bake at around 270 mray/sec and larger projects stay at around 25-30. What on earth did I do wrong here? My lighting is set to Linear. This exact project baked previously at around 25 mray/sec last thursday
Your lighting settings are very low, and given the GPU you have, it should definitely bake faster. Perhaps your scene setup needs some optimization? Hard to tell without having a look at it first.
Have you watched tutorials on lightbaking on Unity’s YouTube channel? If you haven’t please do so, and watch them in full.
I have watched the first one! I found it kind of repetitive as it was the… maybe 10th video on baked lighting I had seen. I got better rates by turning off Ambient Occlusion, and I put my samples at 20/50/50 like I’d seen Jennifer do in the video “baking at the speed of light”. I don’t really know why it seems like direct samples need to be lower than the others but that seems to be something I learned today. This took me from a bake estimated at 15 days to 3 hours.
Hi. It depends on how big your objects are, but I think a Max Light Map Size of 32 is too small. Try to change is to 512 or 1024 and see if this makes a difference. Max Light Map Size is basically the max resolution of the generated lightmaps. It’s possible that some objects are too big and their lightmaps can’t be baked into a single texture with a resolution of 32x32.
Other things that could slow down your bake, are models with no Lightmaping UVs or bad UVs. Make sure that Generate Lightmaping UVs toggle is enabled in the model import settings.
I changed the indirect and environment samples to 256 each, and removed small objects from the light map, as well as the excessive amounts of terrain I had outside and it now bakes about 400 maps in around 10 minutes. The videos |“bake it til you make it” and “baking at the speed of light” were the big helpers.
In my experience, lightmap baking is very close to detective work. Something in the scene is irritating the baker…so disable everything and start with large structures, see if something is acting up and slowly work down to smaller objects. Usually its the UV or some weird thing that should be ok but not.
Also, try to flush light settings and cached textures
Then if all else fails, save the whole scene as a prefab.
Then start a new scene, paste in the prefab and unpack it. Then bake it.
This is the last trick in my bag and saved me many times. It seems like Lightmap baking can sometimes corrupt the scene or something related to the scene. I’ve never figured out what or how. But the prefab thing works, like 3/10 times. I’ve used this trick to fix some weird Reflection Probe bug in 2021LTS so give it a try if baking starts to ruin your day. It will only take 3 minutes.