Search Unity

Changing Terrain lightmap size

Discussion in 'Editor & General Support' started by GetUpKidAK, Jan 16, 2014.

  1. GetUpKidAK

    GetUpKidAK

    Joined:
    Apr 9, 2013
    Posts:
    84
    Hi all,

    I'm at a bit of a loss at the moment with a terrain lightmapping. It's been a bit of an afterthought to a project we're working on, so I fully expected a few issues, but I've made pretty much no progress whatsoever in finding out why I'm having the issues I'm having.

    Basically, we have a 2560x2560 terrain with the following settings:

    $terrainSettings.PNG

    and I don't seem to be able to do anything to change the Lightmap Size setting in the Lightmapping Object tab, including lowering the resolution.

    I've tried increasing and decreasing texture sizes, adjusting the resolution settings on the terrain itself, and pretty much everything I can think of, but I can't change the value at all without it reverting back to the default once it's been exported to Beast, and it never appears to change in the Scene view.

    Strangely, I've tried packaging up the necessary assets to include in case anyone wanted it and tried to experiment with this and other, newly-created terrains in a different project/scenes and this exact same terrain shows with a default lightmap size of 512 and won't change again, the only difference being the bake resolution is 30 in one scene, 4 in the other (but again, changing this so they both match doesn't seem to do anything).

    I've been trying with a low quality Single lightmap bake with the following settings (mostly defaults) to keep things simple:

    $lightmapSettings.PNG

    Am I missing something really obvious here? Are there some requirements for adjusting terrain lightmap size that aren't documented anywhere?

    Any help, any help at all(!), really appreciated!
     
  2. GetUpKidAK

    GetUpKidAK

    Joined:
    Apr 9, 2013
    Posts:
    84
  3. Kevinsomn1a

    Kevinsomn1a

    Joined:
    Dec 23, 2012
    Posts:
    38
    Yeah, I found a solution to this problem. First, follow everything in the steps above, but stop when you change the lightmap size of the terrain. After you changed it to the desired value, save the scene and exit out of Unity. Relaunch Unity and the value should be saved even when you bake it. Tested with Unity 4.3.1f1
     
  4. GetUpKidAK

    GetUpKidAK

    Joined:
    Apr 9, 2013
    Posts:
    84
    Ah, brilliant. Works for me on 4.3.3, too.

    Thanks!