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. Dismiss Notice

[Delaunay Triangulator] for a cool game :)

Discussion in 'Works In Progress - Archive' started by XcentY, Oct 28, 2014.

  1. XcentY

    XcentY

    Joined:
    Oct 2, 2014
    Posts:
    3
    I'm actually programming a game in Unity Free.
    It's very hard as I don't have any money to buy ready to use assets, scripts, ...

    So I decided to program my own delaunay triangulator.

    It was a very hard work but I managed to get it work.

    I'm still busy cause I will add a ruppert refinement to it.

    But here I show you the results on 2 countries I made from Lat/Lon coordinates. (I didn't made any transformation to Lat/Lon so it's not yet the best result)



     
  2. monsieur_alpha123121

    monsieur_alpha123121

    Joined:
    Sep 1, 2013
    Posts:
    82
    Looks good except from that mesh looks like a total mess.
     
  3. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    Honest question,
    why does it matter what the mesh looks like.
     
  4. XcentY

    XcentY

    Joined:
    Oct 2, 2014
    Posts:
    3
    that's why I'm still busy programming a ruppert refinement to add more points so I can have triangles with good angles.
    But i'm already happy it works with a random set of points :) (not so random as they are country borders lol )

    And the running time is good too because every triangle has the index of the 3 childs so I can propagate the delaunay check very easily.
     
    Last edited: Oct 28, 2014
  5. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    I googled 'Rupert refinement' since you mentioned it, and the wikipedia article did mention 'mesh quality': "A triangle is considered poor-quality if it has a circumradius to shortest edge ratio larger than some prescribed threshold."

    The reason I ask is because I will need to do something similar to this for my project soon. But I don't see why I should care about 'quality' since I will only be using the mesh to texture. What am I missing?
     
  6. XcentY

    XcentY

    Joined:
    Oct 2, 2014
    Posts:
    3
    the mesh quality is only important for some purpose. By example, I need to have good triangles to have my mesh correctly set around a sphere.
    If you only need a static mesh for texturing, you might try with poor quality triangles.

    Take a look at this picture and you will understand why mesh quality might be important in some cases



    Sentence from a site about quality mesh : Good mesh is the mesh that serves your project objectives. So, as long as your results are: 1) physical; and 2) accurate enough for your project, your mesh is sufficiently good.
     
    Last edited: Oct 28, 2014
    R-Lindsay likes this.