Author Topic: Classic Erosion - quick parameters reference guide  (Read 605 times)

Offline blinkfrog

  • Member
  • *
  • Posts: 78
Classic Erosion - quick parameters reference guide
« on: November 05, 2017, 04:15:14 PM »
Edit: See also the second message in this thread about maps usage.

I am working on User manual for Classic Erosion, but decided to post here a brief parameters reference guide first.

I tryed to design parameters in such a way that the higher value of parameter leads to a more dramatic effect on eroded terrain.

Global parameters

"Erosion scale" - defines the size of largest erosion features, for example, width of biggest gullies.

"Erosion duration" - defines the length of erosion process. You can set duration value higher than 1.0, but note that 1.0 is actually very large duration. Default 0.25 is enough for many cases, and often even lower values are successfull. For example, if you have already good-looking landscape and just want to add erosion signature for a natural appearance.
Example (based on Ulco Glimmerveen's setup):

Already good-looking mountain:

Added erosion with duration = 0.15:

"Auto calculate" - forces erosion shader to recalculate erosion upon the rendering if something has changed in the scene - erosion parameters or uneroded landscape. Erosion shader is clever enough to understand if changes in parameters or in the scene were critical and resapling or reeroding is needed. Still, in the some cases it can incorrectly reerode landscape even if nothing critical was changed, so if you faces such cases you can disable this parameter and be sure that erosion remains the same in any cases before you manually reerode the terrain by pressing the "Erode" button.

Heightmap tab

"Heightmap position" - sets the position of the center of heightmap.

"Heightmap size" - sets the size (in meters) of heightmap.

"Heightmap resolution" - resolution of heightmap.

Fluvial tab

"Fluvial erosion strength" - this is how strong fluvial erosion is. Can be set higher than 1, but this greatly degrates the erosion quality.

"Rock softness" - defines the speed of erosion process. The softer rock is - the faster is erosion.

"Downcutting" - controls the strength of vertical erosion. Downcutting forces erosion to form mountain ranges with complex drainage system.

"Base level" - defines when vertical erosion transforms to lateral erosion.

Parameters in "Special" section are quite exotic and are used in special cases.

Thermal tab

"Thermal erosion strength" - strength of thermal erosion

"Thermal effect size" - size of landscape features, affected by thermal erosion. See this illustration:
I advice to set thermal effect size to 25 meters or even less. Larger values can be useful in some cases though.

"Min angle affected" - thermal erosion affects only features that are sloped at this angle or higher.

"Talus angle" - debris created by thermal erosion slide down forming talus with specified angel.

Rivers tab

"Rivers mode" - tweaks erosion algorithm so it become able to carve rivers. Note that when it is active many other parameters are disabled because they are controlled internally by Rivers mode.

"Headwaters density" - the number of headwaters per square kilometer.

"Lakes" - this parameters encourages rivers algorithm to form lakes, but it doesn't work as intended, possibly I'll remove it in future. Better if set to 0.0.

"Max rivers depth" - defines maximum depth of river in meters.

"Rivers width" - controls behaviour of river, encouraging it to form wider streams if amount of water is big enough.

Render tab
"Border blending" - controls the smooth transition between erosion heightmap and outer area.

"Render outer area" - renders uneroded terrain that is outside of erosion heightmap. Allows, for example, to apply erosion shader to selectively erode some area, leaving other terrain untouched.

"Render original HF details" - HF stands for high frequency. Renders original terrain details that are too small to be represented by heightfield.

"Mask by flows", "Mask by deposition", Mask by banks (in rivers mode) - prevents small details from being rendered if there is enough of water/deposition.

"Render water surface" - renders surface of water in Rivers mode. Note that this surface is still opaque, to render transparent water surface you need to add additional layer of water and to use "Water depth" map to restore original river bed. I'll show later how to do it.

Maps tab

"Enable maps" - enables maps outout. Maps are output into color output of shader and can be separaed using "Red to scalar", "Green to scalar" and "Blue to scalar" Terragen functions.

"Red", "Green" and "Blue" parameters - assign map to corresponding color channel.

Available maps are: flow map, deposition map (banks map in rivers mode), wear map, streamline map and water depth map.

Streamline map is special map, displaying streamlines in flows. Can be used for texturing glaciers ("Laminar flow" can be useful for it):

Mask tab

"Mask by shader" - enables masking of erosion using selected shader, plugged into "Mask" input of Classic Erosion shader.

"Invert mask" - inverts mask input.

"Masking mode" - switch various masking modes. Available modes are:
- "Mask as blend" - classic blending mode,  blends uneroded and eroded terrain;
- "Mask as erosion strength" - allows mask input to control erosion process by treating mask input as erosion strength;
- "Mask as rock softness" - the same as above, but mask controls rock softness;
- "Mask as precipitation amount" - mask input controls amount of water rained to the terrain at various areas.

HDD tab

This tab allows to store erosion data into specified file and restore in in the future.

"Erosion data file" parameter with "Save" button. Saves the erosion data upon pressing the "Save" button and stores the data filename.

"Read erosion data on project loading" - loads the file specified in "Erosion data file" parameter when the scene project file is opened.

"Read now" - loads data file immediately.


« Last Edit: November 06, 2017, 09:22:13 AM by blinkfrog »

Offline blinkfrog

  • Member
  • *
  • Posts: 78
Re: Classic Erosion - quick parameters reference guide
« Reply #1 on: November 06, 2017, 08:50:09 AM »
How to use maps.

Example pic rendered using three maps and heightmap resolution = 1024:


You can download attached .tgd which is using the technique described here. Heightmap resolution is 1024 here, so it is fully compatible with free version of Classic Erosion.

First, you have to enable maps on "Maps" tab and to assign needed maps to RGB channels:

Second, you need to create 1...3 Convert shaders - "Red to scalar", "Blue to scalar" and "Green to scalar". Optionally you may add "Color adjust" shaders to tweak maps. That's all - you can feed any shaders (for example, "Surface layer" shaders) with derived maps:

« Last Edit: November 06, 2017, 11:02:09 AM by blinkfrog »

Offline blinkfrog

  • Member
  • *
  • Posts: 78
Re: Classic Erosion - quick parameters reference guide
« Reply #2 on: November 10, 2017, 01:15:19 PM »
I want to tell about one of my favorite features - "Mask as precipitation amount" masking mode. All masking modes allow to partly erode landscape, but "Mask as precipitation amount" does this in a special way - it sets the amount of water rained in particular region. Note that all other landscape can be eroded too, but fluvial erosion will start only in selected area. This is a great tool. In the simple case "Simple shape" shader is a very good for feeding Mask input of Classic Erosion shader: you could see a nice example on my website.

Using "Distribution shader" or "Surface layer" allows even more complex behaviour. For example, it is possible to create a simple model of orographic precipitation. In real world precipitation usually greatly varies for different areas. For simplified example, if there are mountains, water from the air will be condensed and fall mainly in these mountains (because of lower temperatures and some other factors), eroding them much more than lowlands. This scenario can be imitated using distribution shader.

Let we have uneroded landscape:

We can add a distribution shader and set it to select mainly high-altitude areas:

Now we can attach it's output to Classic Erosion mask input and erode landscape using mask in "Mask as precipitation amount" mode. Result is more interesting than just "Erosion everywhere" (picture made using 1024 resolution available in free version of Classic Erosion):

Edit: pic with fixed green: 77056-3

And .tgd-file is attached.

On a wider area with more expressed mountain ranges and lowlands result can be even more pronounced and interesting.

It can be a good idea to select mountains more aggressively, leaving all lowlands in black and then adding 0.05 scalar to these black areas to simulate relatively rare rains.
« Last Edit: November 10, 2017, 07:04:16 PM by blinkfrog »


  • Member
  • *
  • Posts: 56
Re: Classic Erosion - quick parameters reference guide
« Reply #3 on: November 10, 2017, 02:04:09 PM »
Very nice work.
I don't know how you code jockeys do it, but I'm glad you do.
You'll be seeing a lot of glaciers and such soon, I reckon.

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Classic Erosion - quick parameters reference guide
« Reply #4 on: November 12, 2017, 11:53:41 PM »
Looking very interesting  8).  Do you have any recommendations of settings for real world DEMs relative to pixel size?  Having a play anyway.

Offline blinkfrog

  • Member
  • *
  • Posts: 78
Re: Classic Erosion - quick parameters reference guide
« Reply #5 on: November 13, 2017, 03:42:58 PM »
Looking very interesting  8).  Do you have any recommendations of settings for real world DEMs relative to pixel size?  Having a play anyway.
This depends on what you want to get.
If you have low-resolution DEM and want to add details that cannot be represented by original DEM (muss less than DEM's pixel size), you need to set erosion heightmap resolution higher than DEM resolution. Erosion scale shold be twice as pixel size (this is minimum that can be represented by erosion heighmap) or less (you can set it to any small value, internally it will be set to minimum possible for the given heightmap. And add fractal details before erosion that have scale equal to DEM pixel size.
If you have DEM that have high resolution, but you want just to add more details to terrain, you can set erosion heightmap resolution being equal to DEM resolution, fractal details scale may be higher than pixel size, and erosion scale can be 2x or higher too, so new landscape details can now have size that is higher than DEM resolution.
But, in overall, many other scenarious can be useful in different cases, it is better to experiment.

Offline archonforest

  • Member
  • *
  • Posts: 3259
Re: Classic Erosion - quick parameters reference guide
« Reply #6 on: December 18, 2017, 07:04:35 PM »
Thx for this data. VERY useful! 8)
...many rooms to explore but the doors look the same...