L3DT documentation
Large 3D terrain generator

Smoothing the heightfield

If you find your terrain to be too rough or noisy, you may use the smoothing filters remove high-frequency (i.e. small-scale) noise without changing the overall shape of the terrain, such as demonstrated below:

:l3dt:userguide:ops:hf:smooth:smooth_before.jpg :l3dt:userguide:ops:hf:smooth:smooth_after.jpg
Before smoothing After smoothing

The smoothing filters operate by iterating through the heightfield and comparing each height pixel with its neighbours. If the gradient (i.e. slope) or curvature (i.e. change in slope, or roughness) is larger than a set threshold, the height of the pixel is set to the average of the four cardinal neighbours. This process may be iterated several times to achieve larger-scale smoothness.

The smoothing filters included with L3DT are discussed below:

Smoothing brush tool

To smooth only specific areas of the heightfield, you may use the smooth brush tool. This tool uses a version of the 'Smooth (curvature)' filter discussed below.

Smooth (curvature)

The smooth (curvature) filter is best for smoothing rough terrain.

The 'Operations→Heightfield→Smooth (curvature)' menu option opens the following settings window:

:l3dt:userguide:ops:hf:smooth:smooth_curv.png
Smooth (curvature) settings

The settings are:

Slope threshold The change in slope which, if exceeded, will cause the height pixel to be smoothed.
Threshold units The type of curvature threshold to be used (either degrees/metre or gradient/metre).
Max iterations The number of smoothing iterations to be performed. Larger values makes for smoother terrain.

To edit any of these settings, double-click on the setting.

The default settings are a threshold of 10 degrees/metre. This means the filter will look for any pixels where the slope of the terrain changes by more than 10 degrees over a metre distance, and if found, will smooth those pixels.

Smooth (gradient)

The smooth (curvature) filter is best for smoothing steep terrain.

The 'Operations→Heightfield→Smooth (gradient)' menu option opens the following settings window:

:l3dt:userguide:ops:hf:smooth:smooth_grad.png
Smooth (gradient) settings

The settings are:

Slope threshold The slope which, if exceeded, will cause the height pixel to be smoothed.
Threshold units The type of slope threshold to be used (either degrees or gradient ratio).
Max iterations The number of smoothing iterations to be performed. Larger values makes for smoother terrain.

To edit any of these settings, double-click on the setting.

The default settings are a threshold of 10 degrees. This means the filter will look for any pixels where the slope of the terrain is steeper than 10 degrees, and if found, will smooth those pixels.

 
l3dt/userguide/ops/hf/smooth.txt · Last modified: 2017/08/31 05:47 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki