This sample illustrates the use of the curvature node. 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.

The first block of nodes creates a chain of mountains with a homogeneous relief.

Using a Max node and a Smooth node, we can produce a pseudo-eroded version of our terrain, but the effect is completely uniform on the terrain.

We select areas of small sizes with zero curvature. For this, we apply a smooth node with a 10-pixel filter several times. This extracts a terrain with the high frequencies removed. We can then extract the curvature. To limit erosion at the center of our terrain, we use a Painted Mask to eliminate the edges.

We now extract larger areas of zero curvature by doing the same series of Smooth operations, but with a filter four times larger.

We still have to use masks to mix our terrain and its smoothed versions. We then obtain a locally eroded terrain where its curvature is almost zero.


Copyright © 2018 · All Rights Reserved · Wysilab