Search Unity

Cutoff terrain vertices to create an island-shape mesh

Discussion in 'World Building' started by paweechinagarn, Jan 23, 2019.

  1. paweechinagarn

    paweechinagarn

    Joined:
    Jan 7, 2019
    Posts:
    7
    Hi, I'm trying to make a floating island with terrain. General idea is I want to cutoff some parts of the terrain which vertex height is below a constant (eg. y <= 0). I stucked at the point where I saw the limit of terrain system that the generated mesh is always square. Is there anyway I can achieve this?

    I also looked into customizing terrain shader to not render some of these vertices instead of cutting them off but I'm not a shader guy so I'm not sure how to approach this solution.

    Thanks
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Honestly, I would approach it by not using Terrain. Use a mesh instead (created in your favorite 3D modeling program, or possibly with the new built-in ProBuilder tools, though I haven't explored those much myself yet).
     
  3. paweechinagarn

    paweechinagarn

    Joined:
    Jan 7, 2019
    Posts:
    7
    Thanks for your reply.

    I'm trying to make procedural generated islands so I need to find a way in Unity. I know that I can create meshes at runtime but terrain editor has some useful built-in features eg. Alpha maps, LOD. So it would be great if it's possible to use terrain in this case.
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi- this is not possible with Terrain, however you could definitely use ProBuilder + Polybrush to achieve what you want. Or perhaps create a Unity Terrain for the "major" part of your island, then ProBuilder/Blender/etc to construct an edge around the island. :)
     
    no00ob likes this.
  5. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    1,255