Introduction / Home

Process (short)
More Process Details

Notes on JOSM Files

PicLayer Files

Territory Examples
AN149
PE007

Ridges & Settings
Spread & Cliffs
Granularity & Roughness
Ridge Rounding

Other Objects
LakesFlats
Custom Objects

Post Render
Ditches
Erosion

Miscellaneous
Current Issues
Possible Projects

Fractal Noise

 

Welcome to my Height-map Obsession

What I thought would be a quick and easy way to generate land-cover ways for my former territory has morphed into a multi-year project to procedurally generate territory-sized digital height-maps. My hope has been that a realistic or plausible topography would help me map more realistically, and that eventually the height data could be used in the topo layer.

Information about the process, setting examples, and two small territory sized renders can be found below.

Feedback or suggestions from those with fresh eyes would be appreciated and very helpful in improving the results. I'm happy to answer any questions you may have.

Egen


Basic Process (Short Version)

JOSM is used to set and store settings for topographic objects that are rendered using fractal noise to add detail. Additional detail is added to the entire height-map with simulated hydraulic erosion. Low points are filled, resulting in each point having a path to sea-level or to low points at the edge of the map. The results can be exported to a color topographic map that can be used in a JOSM PicLayer.

A slightly more detailed explanation can be found here.


Notes on OSM files and setting inconsistencies (if you look at any of the OSM files)

While trying to find easier ways to enter object settings, some settings formats have become somewhat inconsistent. For example: Node elevations can be entered in meters, or as a percentage of a way elevation. In some places a percent (%) sign is used and in other places a 'p' is used to indicate a percent. For example 75% or 75p. Both methods work, but the 'p' negates the need to use the shift key during data entry.

Rather than setting each node individually with a meter elevation, most of the elevations in the render files are set as a percentage of the ridge elevation. This makes it possible to copy ridges and only change ridge elevation value to create a different ridge.

Highway types have been added to most ways to make them more visible while editing in JOSM. The different highway types also provide a method for identifying specific ways, or groups of ways. Marking area ways with settings such as Military can also be helpful to keep track of settings. Highway types and most standard OSM keys have no effect on the render.

Do NOT upload OSM render files to OGF!


PicLayer Files

Several of the examples below include images and corresponding PicLayer calibration files. To use them you'll need to have the PicLayer plugin installed. The image file and the calibration file need to be saved to the same directory on your computer. In JOSM go to the Imagery menu and select New picture layer from file... Then navigate to the directory with the image and calibration file and click on the image file. That should open the image in JOSM. Also opening the corresponding OSM file will allow you to see how OSM settings are used for the render.


Render and Setting Examples

AN149 PE007 Ridges: Spreads and Cliffs
     
Ridges: Granularity & Roughness Ridges: Rounding Custom Objects
     
Lakes and Flats Drainage Channels

Hydraulic Erosion
     


Limitations and Issues

* The process does not account for poor placement of objects. Placing a lake on the side a mountain, or crossing two ridges will give odd looking results.

* Sharp angels on ways can create render artifacts.

* Render times can be slow depending on the size of the area and the scale being used.

* Low point flood fills can be slow and memory intensive.

* Currently, no less-than sea-level elevations can be used.

* Hydraulic erosion currently has one strength setting for the entire map. (Note: Adding an erosion-strength layer, could solve the issue).

* Currently no wind erosion. (Note:Add a blur layer?)

* No current method for blending two neighboring areas from different renders so that they appear natural.

* Creating a caldera results in a filled mound (no drainage) or a mound with an unrealistic channel cut in one side (with drainage). (Note: create a fill strength layer? Or add "drain" : an elevation with < ocean-level value in the middle.? )

• Large area renders may fail due to lack of memory. (Tile the process?)

* Flats can be too flat. (Add noise options?)

* Sink holes appear in some renders resulting in waterways vanishing rather than flowing to sea-level. This appears to be caused by either a base layer point with an elevation under sea-level or noise from a later object pushing the elevation under sea-level.

* Loss of detail on complicated lake and flat shapes.

* Lake and flat granularity is based on object size yielding inconsistent results.

* Rendering at different scales gives noticeably different results.


Tentative Updates

* Ridge-top shear. Position shear on nodes, set elevation, rotation and angular altitude.

*Add user settings to control Y-axis Noise.

* Add user spread jitter settings.

• Trim height-map to territory outline to remove any elevation data that extents beyond target territory.

• Automatic lakes. Mark naturally flat areas as lakes based on settings criteria.

* Dam objects. Should not erode. A lake would fill behind it. (Require hardness layer 100%?)

* Increase render speed by saving objects and loading them if their settings and positions have not changed.

* Hardness layer to allow variable erosion strength. Could be set at the same time as the initial base layer, or set based on object footprints.

* Boolean objects to shape topography?

* Break results in to tiled files to avoid memory issues allowing larger overall areas with more detail.

* Simulate faults. How?

• Set object render order based on a user-set priority queue. That would allow specified ridges to be rendered later in the process and be placed over flats and lakes. This would make islands in lakes possible.


Possible Side Projects

* Use height map data to generate OSM land-cover data. Latitude and elevation can be used to estimate temperatures, elevations, slopes. Temperature, topography and a prevailing wind direction can be used to estimate rainfall. All of the above can be used to predict a likely biome/ground-cover at each point of the map. A version of this was attempted several years ago, but with problematic results when exporting to OSM. I stopped working the updated version when I switched focus back to the underlying topography.

Ground-cover Estimates JOSM version
 
  Link to pictured partial JOSM File

* Lake outlines could be traced and exported to JOSM files.

* Convert water paths to OSM data for export to the map. If water volume can be calculated, waterway widths could also be estimated based on adjacent topography, and exported to a OSM file.

* Watershed map: Starting at sea-level and tracing water paths upstream along all tributaries would create a watershed map.

• River long profile: Use water flow paths and elevations to generate chart showing a river's elevation along its entire length.


General information on fractal noise

A modified diamond-square algorithm is used to generate the noise used in the process. The results aren't perfect and a lot of code is devoted to minimizing artifacts that result from using the algorithm.

https://en.wikipedia.org/wiki/Diamond-square_algorithm

https://www.playfuljs.com/realistic-terrain-in-130-lines/ (The code at the heart of this one got me started)