Search Unity

Procedural Terrain Generation

Discussion in 'Entity Component System' started by xman7c7, Mar 21, 2019.

  1. xman7c7

    xman7c7

    Joined:
    Oct 28, 2016
    Posts:
    28
    Hi,

    If anyone is interesting about procedural terrain generation base on height map with noise, see this:
    https://github.com/ErikMoczi/Unity.ProceduralContentGeneration-Terrain

    I think it is great sample project for learning DOTS with slightly advanced elements or maybe some can get it usefull.

    All optimizations were targeted for CPU. Maybe in future i will combine it with visual effects (Voxelized Terrain).
    Any suggestion or improvements are welcome. In near time i will upgrade it to latest version of entities, but right now i have different work to do.

    Problems to be fixed:
    • chunk normals - wrong calculation of edges, its because vertices of single mesh are separated, they need additional layer

    For comparing to classic approach with sequential or .net threads, see this:
    https://github.com/ErikMoczi/Unity.TerrainConstructionTests

    You can see how .net threads are slow compared to Unity's jobs system

    Anyway i would like to thanks to @tertle. He inspired me for his few ideas about Mesh manipulation.
     
    Last edited: Mar 21, 2019
    learc83, ilih, Sibz9000 and 2 others like this.
  2. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    Is this using custom meshes as terrains or unity terrain meshes?