Results 1 to 10 of 36

Thread: Working on a ambitious world generating tool...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Post

    Let me see if I get Nickadimos's algorithm right:
    1.- Find the highest, lowest and mid points
    2.- Let one highpoint be the actual pixel
    3.- Starting from an actual pixel, test the 8 non-used adjacent pixels looking for the lower color (or altitude) that is the closest to the starting center point. (Not the lowest one, but the color closest one, in other words look for the minimun nonnegative difference between the center and the 8 neighbors)
    4.- Mark this neighbor "used" and make it the actual one.
    5.- Repeat from 3 until we reach one nonmarked midpoint pixel, or we get out of the map. Mark this midpoint
    6.- Do the same, but in reverse order from a lowpoint until we reach a midpoint

    Is that correct?

    If so, I'm not getting the expected results... Look at the pic...
    Attached Images Attached Images

  2. #2
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,322
    Blog Entries
    9

    Post

    If your able to run this through then it would be great. I was expecting to have to write something to show what it might do later this evening so if you have the framework available that would save me some time. Are you able to show whats happening with zoomed up tiles so that the black line doesn't obscure the height map underneath. If not, are you able to show the height map before the line was drawn too so that we could clip out that section and follow it through ? What we need to do is pin down either why its not working or why what your doing is different to what we think we need to do to follow the algorithm.

    I agree with Wordman in that water would flow to lowest point and thats what most people have done but we also know that it tends to stall quickly by hitting locally low points with higher pixel values all around it. You can avoid this by accumulating water in that ditch, filling it up until it overflows and that's what Aaron of L3DT has called a continuum model instead of the drip model. This is the kind of model I think he has programmed and not released because its a lot slower as it means you have to iterate a lot before it starts to overflow. It is the basis of how I do it in GTS however which is why it takes hours for my app to run.

    Heres a link to Aarons posts on L3DT, its a bit old tho - maybe he has done more work in this area.
    http://www.bundysoft.com/phpBB2/viewtopic.php?t=404

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •