Unity takes more than 45 hrs to bake a simple scene

It’s so weird. It never took me more than 2 hours to bake a scene but i’m having troubles on baking this one.

Baking process is “stuck” at step 7/10 “Transport Light”, barely progressing a 1% per 8 hours. After leaving it baking for 5 days at least 8 hrs/day it is still at 68%.

CPU: i9 8gen
GPU: 1080 GTX
Unity version: 2020.3.17f1
Graphics API: WebGL 2.0 [OpenGL ES 3.2 in editor]
Build focus: HTML5
Lighting Settings:


I’m quite sure it’s not actually using the GPU because CPU is 100% and GPU at 5%.

I also got the following error:

About the scene:
I just bought POLYGON City - Low Poly 3D Art by Synty | 3D Urban | Unity Asset Store and clicked on “Static” checkbox over all items in the demo scene. I believe i’ve rendered way more harder scenes before :S

¿What’s going on?¿Why is taking days to bake that scene?
(I will also appreciate any notes on Lighting settings for WebGL build)

Hi. Did you enable Generate Lightmap UVs toggle in the import settings of the models?
Also, there are a lot of objects in this scene, so making everything Static is not a good idea. For small objects you should use Light Probes

TY very much for replying!

I’ve checked and yes, all assets (that i clicked) seem to have Generated Lightmap toggled:

Damn it!
I set them to static because i wanted to use occlusion culling.
So you don’t recommend setting them to static?
Will oclussion culling do something if no objects are set to static?

Increase Max lightmap size to something normal (1024?)

Greatly reduce lightmap resolution to something like 1.

Disable Realtime Global illumination unless you really want it for some reason.

Disable Progressive updates.

Then it should be bake-able even with CPU.

I have no clue why GPU baking isn’t working properly.

if models are complex or lots of overlapping uvs a bake can take longer also
however your scene does not look high poly and Synty is a good developer

if you have a NVidia card and working with lots of baked projects i strongly recommend you look at an asset called Bakery as save your self a lot of pain

Okey!

  • Res lowered to 1
  • Disabled realtime GI
  • Disabled progressive updates
  • Switched to 1024 lightmap
  • Manually removed the “nvidia” package from manifest.json
    Aaaaaaaaaaaaaand something changed because now it went to the GPU!

It has finished in just 23 seconds now!

Ty for the info! I didn’t want to add extra assets to do something that i (stupidly?) expected Unity to do in a proper manner.

Cool! You could bump up the lightmap resolution a bit now if you wanted, so things look better. Say a value of 4 or so and it should bake in a couple of minutes.

I’m actually happy with the result :slight_smile:
What bothers me now is that after going static+occlusion culling+no real time GI the fps dropped from 70fps to 30fps and lower hmm.
I will have to check on profiler what’s going on.

Static toggle is just a quick way to enable all the features of the Static drop down menu. To enable only the oclusion culing, click on the triangle next to the Static toggle and enable Occludee Static for small objects and Occluder Static and Occludee Static for large objects**.**
7551709--933661--upload_2021-10-6_19-25-35.png

(you probably don’t care but) i remembered that i had those lines set somewhere:

QualitySettings.vSyncCount = 0;
Application.targetFrameRate = 30;

So it seems that until now there were somewhow being ignored. I’ve changed it to 60 and framerate went up to 60 :slight_smile:

welcome to lightmap baking.

If (NVIDIA)
{
buy(Bakery);
}

60$

Test unity latest beta. Looks like a big leap in usability…

Just buy it. It’s so far beyond the built-in lightmappers that it’s not worthwhile trying to save money unless you just make games for fun in which case use realtime only. There’s an add-on that you can get for it to be able to preview everything in realtime which is very valuable too. It’s another $35 on top of the $55. Still very worth it though.

I have a similar problem. I set the Lightmap resolution to 1. I turned off progressive updates. I activated the Generate Lightmap UVs toggles. But it still takes a long time. Does anyone know what else I should do?

These are my settings.