Planetside Software Forums

General => Terragen Discussion => Topic started by: Daniil on November 05, 2017, 12:15:14 PM

Title: Classic Erosion - quick parameters reference guide
Post by: Daniil on November 05, 2017, 12:15:14 PM
Edit: See also the second message in this thread about maps usage.

I am working on User manual for Classic Erosion (https://daniilkamperov/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.


Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil on November 06, 2017, 04:50:09 AM
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.

Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil 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 (https://daniilkamperov.com/wp-content/uploads/2017/10/volcano_simple_shape-1.jpg) 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.

Title: Re: Classic Erosion - quick parameters reference guide
Post by: SILENCER on November 10, 2017, 10:04:09 AM
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.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: 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.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil on November 13, 2017, 11:42:58 AM
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.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: archonforest on December 18, 2017, 03:04:35 PM
Thx for this data. VERY useful! 8)
Title: Re: Classic Erosion - quick parameters reference guide
Post by: luvsmuzik on February 01, 2018, 10:24:22 PM
Thank you for these files. I missed this post completely. :)
Title: Re: Classic Erosion - quick parameters reference guide
Post by: bobbystahr on February 01, 2018, 10:28:51 PM
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!
Title: Re: Classic Erosion - quick parameters reference guide
Post by: D.A. Bentley (SuddenPlanet) on March 08, 2018, 03:26:28 PM
The link in post 1 is missing the .com

https://daniilkamperov.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 (https://www.planetside.co.uk/forums/index.php?topic=23759.0)
Title: Re: Classic Erosion - quick parameters reference guide
Post by: WAS on March 08, 2018, 04:44:35 PM
Is this tool limited to an area or is it seamless to terrain?
Title: Re: Classic Erosion - quick parameters reference guide
Post by: D.A. Bentley (SuddenPlanet) on March 08, 2018, 04:49:53 PM
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?
Title: Re: Classic Erosion - quick parameters reference guide
Post by: D.A. Bentley (SuddenPlanet) on May 02, 2018, 01:23:24 PM
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
Title: Re: Classic Erosion - quick parameters reference guide
Post by: luvsmuzik on May 02, 2018, 02:26:52 PM
In the Render tab in the plugin select....Render surrounding terrain.... :)
Title: Re: Classic Erosion - quick parameters reference guide
Post by: jackblack on October 27, 2018, 01:42:45 AM
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 (https://daniilkamperov.com/wp-content/uploads/2017/10/volcano_simple_shape-1.jpg) 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.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil on November 12, 2018, 06:15:21 AM
I already mentioned a trick allowing to imitate orographic precipitation. Here is simpler version: you can literally focus precipitation to a certain spot using Simple Shape shader.

Here is a scene where this trick (Simple Shape shader as a precipitation mask) is used to get nice volcano. The real physics behind this is next: imagine high stratovolcano mountain near ocean. There is a big amount of wet air, that is constantly condensed on a cold top of this mountain (just like an air conditioner gathers water from the air) in a form of rain or snow (which is melted by sun). This results in a prominent erosion of mountain sides.

This is my old scene, just a bit modified to look better at 1024 resolution (so it is compatible with a free version of Classic Erosion). Sample pic is got using 1024 resolution too.
You can use higher Erosion scale to get more dramatic and "mountain" look. Parameters also can be modified to use erosion without mask trick.

Daniil
Title: Re: Classic Erosion - quick parameters reference guide
Post by: jackblack on December 04, 2018, 01:26:38 AM
""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."
How is this done?
Title: Re: Classic Erosion - quick parameters reference guide
Post by: gao_jian11 on December 04, 2018, 07:14:50 AM
When is the complete classic erosion user manual coming?
Title: Re: Classic Erosion - quick parameters reference guide
Post by: bobbystahr on December 04, 2018, 08:43:52 PM
Quote from: jackblack on December 04, 2018, 01:26:38 AM
""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."
How is this done?

Echo
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil on December 09, 2018, 04:17:00 PM
Quote from: jackblack on December 04, 2018, 01:26:38 AM
""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."
How is this done?

Quote from: bobbystahr on December 04, 2018, 08:43:52 PM
Echo

In short, you need to add additional spherical object having exactly the same position and size as main planet. Use Water depth map as opacity mask - this forces this sphere to be rendered only where real water is, this greatly improves render time. Use Surface layer with Water shader as child layer to render this sphere. You need to enable "Render water surface". To ged river bed you need to "restore" actual river bed by displacing flat water surface by "Water depth" map.

This should work. In fact, this works, but with problems. This is why I delayed explanation - I hoped to figure what's wrong in this scheme. Sometimes where are multiple bright green sparks in the scene. I remember I created simple scene with simple river to upload here, but it was all in green sparks. It seems this depends on camera position and direction.
Here I attached other scene, in the most cases it is rendered ok, but sometimes the sparks are still there.
If someone finds what's wrong here, I'll be very grateful.

This scene is designed for 2048 resolution (my favorite resolution for rivers; higher resolution isn't needed usually if "Render HF details" is enabled"; but this scene can be loaded to free version - resolution is reset to 1024 then.

Quote from: gao_jian11 on December 04, 2018, 07:14:50 AM
When is the complete classic erosion user manual coming?
I am still slowly working on it, please excuse me for long delay. For now please ask me without hesitation if something isn't clear - here in forum, via PM or email, I'll provide detail explanation, possibly with .tgd files.

Daniil
Title: Re: Classic Erosion - quick parameters reference guide
Post by: bobbystahr on December 09, 2018, 06:02:54 PM
Thanks very much for the explanation and the demo scene...
Title: Re: Classic Erosion - quick parameters reference guide
Post by: gao_jian11 on December 28, 2018, 08:11:15 AM
Thank you for your document. I saw the "bright green sparks" that you said. It seems to be related to reflection. I have not found a solution.

Title: Re: Classic Erosion - quick parameters reference guide
Post by: Njen on January 06, 2019, 01:22:17 AM
I just paid for the commercial version, and I'm having an issue where if I have generated an .and file, and set the node to automatically load it on Terragen file open, nothing automatically loads.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Njen on January 07, 2019, 02:05:03 AM
I think I know what the issue is, when I reopen the Terragen file, the 'Read now' path is blank. Maybe that node is not saving the string variable for that value?
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Njen on January 20, 2019, 02:40:07 PM
Any chance that this can be looked into? Because as it stands, the paid license I have is practically useless for rendering on a render farm.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: D.A. Bentley (SuddenPlanet) on January 20, 2019, 04:10:50 PM
Quote from: Njen on January 20, 2019, 02:40:07 PM
Any chance that this can be looked into? Because as it stands, the paid license I have is practically useless for rendering on a render farm.

Have you tried contacting Daniil by email?
support@daniilkamperov.com

I have observed what you say about the erosion data load path being blank when loading a Terragen scene too, but my erosion files seemed to still be loaded when I checked the various map outputs.  If your not using the maps feature I wonder if there is a loading bug.  Are you eroding with Maps turned on, and then saving out the resulting erosion data?  If not, I would try using maps, so you can more easily verify if the erosion data is being loaded.

[attachimg=1]

If you need to know how to hook up the resulting map data to verify if erosion data is loaded or not you can use this tgd setup:
https://planetside.co.uk/forums/index.php/topic,23764.msg240254.html#msg240254 (https://planetside.co.uk/forums/index.php/topic,23764.msg240254.html#msg240254)

Hope that helps,

Derek

Title: Re: Classic Erosion - quick parameters reference guide
Post by: Njen on January 22, 2019, 12:16:22 AM
I had 'Enable maps' turned on. I guess I will have to email him then, thanks for the address.
Title: Re: Classic Erosion - quick parameters reference guide
Post by: D.A. Bentley (SuddenPlanet) on March 11, 2019, 04:49:35 PM
Njen,

There is a new version that just was released that should fix the issues you were experiencing.

-Derek
Title: Re: Classic Erosion - quick parameters reference guide
Post by: surrealdan on March 13, 2019, 06:28:34 PM
Thought I would ask here. But does anyone have problems with the erosion when re-opening a file? I opened up a file with a DEM terrain I eroded, and saved the erosion file as well. Then it wasn't there the next day. Is the erosion baked? Or do I have to re-erode everytime? Thanks for any help!
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Daniil on March 14, 2019, 03:25:05 AM
Quote from: surrealdan on March 13, 2019, 06:28:34 PM
Thought I would ask here. But does anyone have problems with the erosion when re-opening a file? I opened up a file with a DEM terrain I eroded, and saved the erosion file as well. Then it wasn't there the next day. Is the erosion baked? Or do I have to re-erode everytime? Thanks for any help!

Hello,
this bug should be fixed in the last version (1.1.3). Please check if you have the latest version installed. If you are using the latest version and still can't load saved .erd, please email me (support@daniilkamperov.com).

Daniil
Title: Re: Classic Erosion - quick parameters reference guide
Post by: Agura Nata on May 26, 2020, 01:42:42 AM
Many thanks for the explanation and the demo scene :)