Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

2049x2049 Terrain -> 7 hours light calculation + 20 GiB data?

Discussion in 'Unity 5 Pre-order Beta' started by Cygon4, Oct 27, 2014.

  1. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Hi!

    I've been playing with the new lighting system a bit and thought that the new indirect light would be ideal for realistic lighting on big terrains. So I created a 2049x2049 terrain and scaled it by a factor of 2.

    Now Unity has been bouncing light for 7 hours and my poor gamedev partition ran out of space (the GICache is about 20 GiB) :D

    Can I somehow exclude certain game objects (like the terrain) from GI?
    Or will this still result in a sane deployment size if I give it enough hard drive space and let it finish its calculations, however long it may take?
     
  2. Deleted User

    Deleted User

    Guest

  3. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Ah, thank you.

    So its the lightmaps that take endlessly to calculate? I tried disabled static lightmaps for the terrain, but now Unity is running out of memory during the "clustering..." step and Windows either reboots or kills the process with a "Your computer ran out of memory" message :)

    Mind you, there's RAM and swap space aplenty...

    unity-5-beta-terrain-memory.png

    I'll watch your other thread. Hopefully I can find a workaround and/or terrains will become usable in a later beta.
     
  4. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Are you running the 64-bit version of the editor?
     
  5. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Hi,

    If you find terrain is baking slowly, you can try create a new LightmapParameter for terrain and use lower Resolution and Cluster Resolution (for start try 0.1 for both, approximately means GI is evaluated per 10 units on terrain). This helps to reduce the baking time especially in Clustering stage.

    In a future release we will probably use this lower resolution baking parameter for terrain by default.
     
    p87 and chrismarch like this.
  6. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    FYI: A large custom mesh (used for terrain, but not a Unity Terrain object) seems to stall in (or take a very long time in) the Clustering stage, until I reduce the quality by setting Lighting/Object/Advanced Parameters to Default-VeryLowResolution. My test mesh has about 50k triangles.

    Does this mean the artists will need to break their Terrain, or ground meshes, into smaller chunks, to play nice with Enlighten?
     
    Last edited: Nov 21, 2014
  7. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    Terrain is automatically split into chunks for you. Currently you can set the terrain chunk size (default is 500x500) in Lighting/Object tab, but we are considering to hide this option and figure out an optimal value.

    For large ground mesh, my suggestion would be first try a real low resolution to see if the resulting lightmap is good enough for your needs.
     
    Roni92, twobob and chrismarch like this.