January 29, 2020

Elevation XV: From Square One

I wanted to take a break from prehistory stuff while I read up on hunter-gatherer sociology. I decided to revisit terrain generation.

My current terrain was created by drawing continents I liked, loosely matching them with tectonics, generating uplift values from that, then performing hydraulic erosion until I liked it. I'm still not ready to move into tectonic simulation, but I wanted some landforms that more closely mimicked the plates I'd drawn. I also took the opportunity to clean up the hydraulic erosion code.

It turns out, perhaps predictably, that the tectonic input map is perhaps the most important variable of all.
Fault map, showing convergent influence in red (with transform in green and divergent in blue)
I experimented with a variety of drop-off functions (Gaussians, other exponentials) to find a good way to find the closest fault (or most influential fault, by strength) to a given hex. This took a really long time, because I had to iterate over ~2000 fault hexes for each of the ~250000 world hexes. Some Poisson sampling helped, but even then, my uplift map ends up with circular ripples.
Uplift map: the Poisson disks are particularly obvious along the convergent equatorial fault
Where the uplift map is too patterned, the landforms tend to be also. So I tried adding in various kinds of warped and ridged noise to try and mix up those forms. One big problem with using noise of any kind is that it looks much too uniform at all scales. A quick look at Earth's coastline reveals a variety of types of "noisy" coastline, some smooth, some rough. So any kind of realistic noise function will need to approximate this variety. The hydraulic erosion discussed below can help with this. However, I still think more work is needed to obtain a better fault/uplift map from the input tectonics. One on-going issue is that the basic tectonic distribution persists from the time when I did most of my work by direct sketching. Maybe next week I'll work a bit on a generated (or at least computed) fault map to add more variety.

There are four basic processes which can alter the altitude of a hex: d$u$, the uplift of the plate; d$e$, the removal through erosion; d$s$, the deposition of transported sediment (from eroded material); d$c$, coastal erosion.

Although I had used a simplified version of this model before, I hadn't considered some practical limits:
  • A hex will stop eroding once it is completely "ground down," that is, its height is equal to the height of the hex to which it drains. At this point, water no longer flows. Hexes under sea-level do not erode with the same mechanism. For now, I've turned it off, but a possible alternative is a constant rate of erosion. As always, erosion rate is determined by how many hexes drain into the target.
  • On the other end, once a hex has been completely filled with sediment, it won't accept any more drainage. This one is a bit more complicated: I compare the height of the hex to the height of all other options that the source hex could use. Once the sediment makes the hex no longer the lowest of all the source's neighbors, drainage will instead flow into the new target. So it might not necessarily reach the height of the source.
  • Coastal erosion stops once the hex has been eroded under sea level. The erosion rate is faster the more sides are exposed to the ocean. I think it might be interesting to continue to transport and deposit that sediment elsewhere, but that would require the current model to run every iteration.
The coastlines look pretty good but the overall landforms indicate I need to do more work with tectonics and uplift

7 comments:

  1. Interesting stuff! Quick question -- is a hex's uplift determined based on the single closest fault, or is it a combination of all faults within a certain distance? If it's the former, how do you avoid sharp differences in height in places that are midways between two different types of fault?

    ReplyDelete
    Replies
    1. I have tried both. In this post, I'm using a distance-weighted nearest neighbor. So I use a Gaussian function to see which fault has the most "influence": a stronger fault reaches further. This yields a smooth interpolation at the midpoint whether I use a single neighbor or more than one.

      I am working on a new model now that will select influential borders more effectively, I hope. Originally I'd thought that sharp differences, as you say, were bad, but now I'm thinking that in some cases it might actually lead to realistic terrain - think a mountain range thrusting up suddenly.

      What I'm coming to realize is that the final terrain shape is almost entirely dependent on the method I use to assign uplift. Which is why I've been trying so many different things.

      Delete
    2. Ah, that makes sense, thanks for your response! I've been having some issues getting the midpoints looking realistic in my own plate tectonics simulator, but I'm starting to suspect it may be a problem with the erosion algorithm rather than the plates themselves.

      Delete
    3. Do you have a git or a blog?

      I've had bugs in my erosion code before that gave some pretty weird results. But sitting down and going through the algorithm line by line helped me figure out why weird stuff was happening. As I said above, figuring out the uplift based on the fault has much more effect on the final terrain than the erosion does. Erosion seems to affect smaller details.

      Delete
  2. You are right in that the plates have the biggest effect on the world stage, while erosion shapes landforms locally. Think of it more as patterns vs variations within those patterns.

    I don't know how detailed you want to get, but the movement of tectonic plates causes a lot more effects than just uplift. Sure there are examples of uplift such as mountain ranges, but then there are also other effects that occur. The results of tectonic movement depend on what types of plates are intersecting, oceanic or continental, and which direction they are moving in, and then the big picture of how those faults interact with each other has to be taken into account. When the same plate is moving in different directions
    At opposite end I don't know how detailed you want to get, but the movement of tectonic plates causes a lot more effects than just uplift. When the same plate is moving in different directions at opposite ends the whole plate can basically get stretched out;this is how the basin and range region in North America was formed. Also there is the interaction of erosion and deposition of sediment with the effects of tectonic movement. California was created when subduction uplifted the Sierras, deposited sediment formed what is now the floor of the Central valley, and more subduction uplifted the coastal range. I guess I just want to get the idea across that tectonic movement causes a lot more than just uplift of the land.

    And don't forget the effect of hotspots.

    ReplyDelete
    Replies
    1. All good reminders. A lot of good work has been done by others who actually move plates around and thereby get some pretty good landforms. I hadn't wanted to do that just because it's a big simulation load for the language I'm using but it may be worth it. Then you can incorporate some of those effects you mention.

      Delete
    2. Yeah, it all depends on the amount of detail/realism you're looking for

      Delete