Search Unity

Mask for procedural terrain generation

Discussion in 'World Building' started by WebLab, Jun 9, 2018.

  1. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    Hello! I have a question about procedural terrain generation using mask. I mean for example upload a shape of some continent like South America and procedurally generate it using this mask and perlin noise.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    You can render the shape to a grayscale heightmap and then import that heightmap into your terrain object, if you're using Unity Terrain objects.

    PolyShapes in ProBuilder could be a solution to this but without terrains, but but you'd need to write a script to generate the coordinates if you want to go directly from your data.

    You could also put the shape into your scene as a texture on a quad, scale it up as big as you want, then make the Polyshape by hand in the editor. Depends how much time you wanna spend on it and how precise it must be.