This sample illustrates the use of curvature. The project consists in creating a mountain range and then applying a smoothing effect locally to places where the slope does not vary, i.e. where the curvature is zero. The result is a mountain range that seems more eroded without having to use a more realistic, but costly in performance, erosion simulation.

Select Help > Samples to access the sample project.

Several groups of nodes are used in this project to help you understand better the different effects of the procedural process. See Grouping nodes for details on how to create groups of nodes.

• Mountain: The first block of nodes creates a chain of mountains with a homogeneous relief.
• Two terrain generators, Profile curve, creates a terrain from a curve, and Ridged noise, which creates crests and ridges are summed using the Add node. This node sums two terrains: at each vertex, the value of the output terrain is the sum of the values of both input terrains.
• The heights of the summed terrains are constrained using the Scale and offset transformer.
• The result is composed with a Perlin noise generator using a Blend node, which creates a composition between two terrains.
• Procedural erosion: We can produce a pseudo-eroded version of our terrain, but the effect is completely uniform on the terrain.
• The Mountain group output terrain is smoothed. This terrain transformation node smooths a terrain by replacing the height of a vertex by the average of the height of its neighbors. This average value and the initial value are blended.
• The Max node takes the maximum value of the Mountain group output terrain and the smoothed Mountain group output terrain.
• Curvature (small): We select areas of small sizes with zero curvature.
• For this, we apply a Smooth terrain transformation node with a 10-pixel filter several times. This extracts a terrain with the high frequencies removed.
• We can then extract the curvature using a Mask from curvature node.
• To limit erosion at the center of our terrain, we use an Apply curve node to modify the mask profile by changing the values of the vertices on a curve that define the mask values.
• Curvature (large): We now extract larger areas of zero curvature by doing the same series of Smooth operations, but with a filter four times larger.
• Avoid on borders (top): Masks are used to mix our terrain and its smoothed versions. We start with a painted mask that is inverted and smoothed to create a blur.
• Erode on small and Erode on large: Using Alpha blend terrain composition nodes to create an alpha composition between two terrains at locations defined by a mask, we obtain a locally eroded terrain where its curvature is almost zero.