Search Unity

Bake GI with multiple scenes loaded containing seemless terrains

Discussion in 'Global Illumination' started by rjakob13, Nov 8, 2017.

  1. rjakob13

    rjakob13

    Joined:
    Apr 13, 2016
    Posts:
    45
    I used a big terrain of 4096x4096 units and split it up into 16 smaller terrains after I experienced out of memory problems in baking even with lower settings. Each of the terrain tile now is in its own scene and loaded additively and the bake process of one scene is working with my current setup of 16GB RAM which was not the case with the big single terrain.
    Now the problem is when I bake GI for each loaded scene separately (i.e. others are unloaded) there will be visible seems and if I bake with all scenes loaded there will be out of memory problems. I tried to load two scenes, mark one of them as active and bake. This creates seemless lightmaps for both of the scenes effectively overwriting previous ones. The idea was to load a scene with all adjacent ones and bake lighting so that it considers the neighbours. This would work if I could restrict the baking to the active scene only while still taking the lights at the seems into account. That way I could bake lights for all the scenes/terrains in turn without constantly hitting the memory limit. Ideally I would like to load all scenes and then bake each of them in turn, creating a lightmap for only one considering the neighbours and then go on to the next.
    Is there a way to do that?

    Almost forgot: I'm using Unity3D 2017.2.0f3 (Linux editor) currently.