Classic Erosion - quick parameters reference guide

Started by Daniil, November 05, 2017, 12:15:14 PM

Previous topic - Next topic

Daniil

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:
[attachimg=1 width=800]

Added erosion with duration = 0.15:
[attachimg=2 width=800]

"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:
[attach=3]
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):
[attachimg=4 width=800]

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.

Daniil.


Daniil

#1
How to use maps.

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

[attachimg=1 width=800]

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:

[attachimg=2 width=800]

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:

[attachimg=3 width=800]

Daniil.

Daniil

#2
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:
[attach=1]

We can add a distribution shader and set it to select mainly high-altitude areas:
[attach=2]

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):
[attachimg=3 width=800]

Edit: pic with fixed green: [attach=5]

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.

SILENCER

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.

bigben

Looking very interesting  8).  Do you have any recommendations of settings for real world DEMs relative to pixel size?  Having a play anyway.

Daniil

Quote from: bigben on November 12, 2017, 07: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.
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.

archonforest

Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd


bobbystahr

Quote from: bigben on November 12, 2017, 07: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.

Can't wait t see what you get man!
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

D.A. Bentley (SuddenPlanet)

The link in post 1 is missing the .com

https://daniilkamperov.com

Also, I wonder if the two Classic Erosion threads can be made sticky (This one and the main thread).  Oshyan?

https://www.planetside.co.uk/forums/index.php?topic=23759.0

WAS

Is this tool limited to an area or is it seamless to terrain?

D.A. Bentley (SuddenPlanet)

Can someone explain how the HDD Tab works?  I just spent a lot of time eroding a 8192x8192 Terrain (Heightfield), and then wanted to save that data so I went to the HDD Tab and enter a file name and path, and it saved a huge amount of data (1.18GB file), but then when I went to render the erode process started over.  I want to erode once, and then just have it read the file when I render for obvious time saving reasons.  What order do I need to do things in for this to work most efficiently?

D.A. Bentley (SuddenPlanet)

Is there a way to not have Classic Erosion flatten the terrain beyond the erosion area?  Or am I going to have to do some creative merging?

Thanks,

Derek

luvsmuzik

In the Render tab in the plugin select....Render surrounding terrain.... :)

jackblack

Quote from: blinkfrog on November 10, 2017, 09:15:19 AM
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:
[attach=1]

We can add a distribution shader and set it to select mainly high-altitude areas:
[attach=2]

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):
[attachimg=3 width=800]

Edit: pic with fixed green: [attach=5]

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.

When I try to use this method, it's either completely covered or completely uncovered, no in between.