Can't build lighting for terrain with 4097 heightmap resolution

It’s stuck at 0/11 Create Geometry and no matter what I try, it always fails with the following error messages after roughly 2 minutes.

Failed writing to: 'C:/Users/se/AppData/LocalLow/Unity/Caches/GiCache/14/149f4293f29876f1c6659c2192e49603.ppg.tmp'.
Error: 'Failed writing Precomp Packed Geometry file.' - Mesh: 'New Terrain'

The GI Cache is at 1.77 GB after that.

I tried:

  • Increasing GI Cache to the max

  • Lowering all lighting settings (like Realtime Resolution and Baked Resolution to 0.0001)

  • Increasing virtual memory to 132 GB across 2 SSD

  • Lowering quality settings like Shadow Resolution and Shadow Cascades

  • Importing with Terrain Importer

My test scene is a default new project with the imported terrain, nothing else.

It’s a completely fresh Windows 7 (64-bit) install with Unity 5.5.0f3 (64-bit). I have 16 GB memory and Unity is installed on a 500 GB SSD.

A heightmap resolution of 4097 doesn’t seem unreasonably large to me, especially when lowering some settings by orders of magnitude. 2049 builds just fine.

I would really appreciate any help here. I finally convinced myself to buy World Machine Standard to have larger terrains and now this. :roll_eyes:

Four 2049 terrains build just fine, which I think is the same number of polygons as one 4097 terrain. So I guess some terrain slicing asset might help, but I’d prefer Unity to just work.

I played around with Lightmap Parameters, but no luck either. I guess since it’s stuck at Create Geometry, it’s not a lighting issue per se?

Okay, I asked a friend with a more powerful PC to give it a shot and it built without a hitch. But I forgot to tell him to reduce Realtime Resolution for the Precomputed Realtime GI to 0.1 as outlined in the docs. After I told him that, he got the same error described above. So I tried the default value of 2 or even just 0.2 instead of 0.1 and it worked for me as well (I thought I tried higher values, but apparently not).

I’ve tested with 2048 resolution and works fine.
Always bake with very-low lightmap preset for fastest baking.

Try Terrain To Mesh asset and slice terrain to more pieces.

I made a bug report and QA was able to reproduce it, so it might get a fix in the future.