Search Unity

GI (realtime or baked) on terrain... is anyone getting good results?

Discussion in 'Global Illumination' started by tryptic, Dec 4, 2015.

  1. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
    Hello, I'm really struggling to get light mapping on terrains since upgrading to Unity 5 (5.2.3p1). I've seen and read many threads on this, but honestly stuck trying to understand the actual problem.

    Steps:

    1) Create simple scene with a ground plane object and some rocks, light bakes very quickly.
    2) Create terrain object, small (500x500) with a base texture, light bakes a little more slowly but finishes
    3) Import a RAW heightfield (2048) to displace the terrain, light bake hits the brakes with 0.1 resolution set, bake time is now exponentially higher (60 min. + on i7).

    What is the exact issue here with Enlighten and terrains? 500m is tiny, Beast wouldn't even blink at this.

    I have a different scene with a 1km terrain, fully populated with trees, rocks, etc and baking never ever finishes, often has errors writing the cache files. I've tried resolutions as low as 0.001 and no difference.

    Does anyone have a workflow that would make this feasible? Am I dreaming to think we could have this kind of lighting in a real (populated) outdoor world?

    Thank you in advance for any advice. :)

    Heinz
     
  2. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Unfortunately static lightmapping in Unity is unusable on large scenes since 5.0. Try your luck with 5.3, the beta is available but it's out soon anyway.
     
    tryptic likes this.
  4. tryptic

    tryptic

    Joined:
    Nov 13, 2012
    Posts:
    55
    Just wanted to share some data from a number of tests I've run recently.

    I made the initial mistake (based on posts from devs) of setting my baking resolutions too low. This is apparently why I was getting console errors writing to the cache, as well as getting hangs during clustering. And practically speaking, on terrain you want at least 1 texel per square meter to get any sort of good visual results (for a 1st-person game).

    I have a 1km terrain world populated with trees, grass, etc that uses RTP 8 layer texturing. With the following settings it took about 2.5 hours to bake (realtime GI, i7-4910MQ) with these settings:

     
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    I'm taking a guess 5.3 finally fixes up most of the "big scene halts lightmapper" issue? ;)