Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Assets Voronoi Based Map Generator

Discussion in 'Works In Progress - Archive' started by SteveSync, Mar 7, 2018.

  1. SteveSync

    SteveSync

    Joined:
    Sep 25, 2013
    Posts:
    27
    I've created a map generator that uses a list of Vector2 points to generate a voronoi diagram, and then uses that as an input to generate a map graph and terrain mesh. I've released the code onto GitHub.


    https://github.com/SteveJohnstone/VoronoiMapGen

    At the moment it takes 1,137ms to generate a map with 2764 nodes, so I'd quite like some feedback on how to improve the performance. Also I'd like to peturb the rivers when they're drawn onto the texture, but I'm not sure how to best proceed with that.
     
    Last edited: Mar 7, 2018