Search Unity

Terrain Brush Max size limited to 0.94 max terrain size?

Discussion in 'World Building' started by Jesus, Feb 6, 2019.

  1. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Trying out the new terrain system, and I came across a strange limitation.

    If i have the terrain size as 200mx200m, the largest stamp size I can slide to or even enter, is 188m. So if I want a stamp to be corretly aligned at 200x200m, I have to use a terrain of size 212x212m.

    So the stamp max size = terrain size x 0.94.

    Why?


    Is this a hard limitation, or is there some design/development reason the stamp size isn't the same as the max size of the terrain?
     
  2. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    I'm assuming we limit it because you can only ever paint on at most 4 neighboring Terrain tiles. Increasing the brush size beyond that would mean that any tile that is above the 4 won't be affected by the paint operation. I'll admit, not the best workflow especially if you have small terrain tiles.
     
  3. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Ah right, but in theory that would limit the maximum stamp size to the same size as the terrain though?

    Unless that's a limit based on some sort of lower mip / smoothing algorithm for compatibility between terrains, but I can't figure out what math lead to that. By that reasoning, it would be 1 - (1/512) or 1 - (1/256) or something.

    EDIT:

    0.94 ~= 1 - (1/16) but 16x16 resolution for height or basemap or normal map, maybe the lowest LOD stage for the terrain (does it go as low as 16x16 quads?).
     
  4. wyattt_

    wyattt_

    Unity Technologies

    Joined:
    May 9, 2018
    Posts:
    424
    That is correct. It'll limit it to about .94f of the minimum terrain dimension, so:

    maxBrushSize = min(terrainData.size.x, terrainData.size.z) * .94f
     
    Jesus likes this.