Neutral landscape models based on fractal algorithms are used widely by landscape ecologists. Perlin noise is a spectral synthesis algorithm that has not been widely adopted by landscape ecologists, even though the hierarchical properties of Perlin noise are particularly relevant to landscape ecology. To encourage the use of Perlin noise, I provide an explanation of the algorithm in the context of neutral landscape models to demonstrate that the hierarchical nature of the algorithm not only allows for a wide range of possible spatial patterns to be produced, but also usefully parallels theories about the hierarchical structure of landscapes.
Neutral landscape models are a key concept and technique in landscape ecology that allow researchers to explore the influence of landscape pattern and structure on ecological processes and methods. Conducting landscape-scale experiments in the real world is logistically challenging or even impossible, and the uniqueness of any landscape limits the value of experimental replication (Turner and Gardner, 2015; Wang and Malanson, 2008). In contrast to real-world experimentation, by using a computer to simulate many landscapes with varying but highly controlled spatial patterns, landscape ecologists can create an experimental baseline with which to evaluate the effect of ecological processes on landscape pattern and conversely the effect of landscape pattern on ecological processes (With and King, 1997). For example, neutral landscape models have been used to explore how changes in the abundance and distribution of habitat within a landscape may affect a species' distribution, abundance, dispersal, and ultimately survival within a landscape with applications to the conservation of threatened species and the control of invasive species (for an extended list of neutral landscape model applications, see Wang and Malanson, 2008).
The simplest neutral landscape model is a grid within which each cell has a
specified probability of being habitat, and even these simple models provide
interesting insights into critical thresholds associated with landscape
connectivity (Gardner et al., 1987). However, more realistic neutral landscape models that mimic the spatial patterns of real landscapes have been developed using methods originating from fractal geometry (Mandelbrot, 1983). A hierarchal fractal neutral landscape model can be created via random curds and implements a process of spatial subdivision where the landscape is repeatedly subdivided by probabilities specific to each hierarchical level to create a landscape in which habitat is more clustered (O'Neill et al., 1992). Another fractal neutral landscape model is based on two-dimensional Brownian motion that uses a parameter that controls the randomness of the motion to produce neutral landscape models with a gradient that can range from highly clustered to highly fragmented (Palmer, 1992). These simple and fractal neutral landscape models are the methods most commonly used by landscape ecologists (Wang and Malanson, 2008). An alternative approach to neutral landscape models is one based on spectral (or sound, noise) synthesis in which
Although spectral synthesis methods have much potential for neutral landscape models (Keitt, 2000), they have not been widely adopted by landscape ecologists (Wang and Malanson, 2008). This is in notable contrast to the field of computer graphics, where the creation of neutral landscape models, or virtual worlds, has an even longer history. In computer graphics fractal algorithms such as the mid-point displacement method (Fournier et al., 1982) that was later adopted by landscape ecologists (Palmer, 1992) was actually developed to produce science fiction classics such as “Star Trek II: The Wrath of Khan” (Falconer, 2013). The successful application of fractals in computer graphics has resulted in a large range of procedural modelling algorithms (Smelik et al., 2014) that are ubiquitous in the production of movies and computer games, but perhaps because of differences in terminology these procedural modelling algorithms have not been exploited by landscape ecologists. A prime example of this situation is that of Perlin noise that was originally developed to mimic the appearance of things such as water, marble, and fire (Perlin, 1985) but that was later used to mimic the terrain of a landscape (Musgrave et al., 1989) and is now a primary method used in computer graphics for creating virtual worlds (Smelik et al., 2014). Perlin noise is a form of spectral synthesis that sits within the
Perlin noise, as the name indicates, uses terminology from the physics of
sound to define its four parameters: periods, lacunarity, persistence, and octaves. As this terminology may be unfamiliar to landscape ecologists, and
as some of the terms can have different meanings in other fields of study, I
will begin by introducing the terminology of Perlin noise using a simple
example of generating a sound wave from a set of sine waves. A sine wave in its basic form without any vertical shifts consists of a series of wave
periods that each cycle between a start and end value of zero. For Perlin noise the
Example construction of one-dimensional sound and noise waves from
sine waves and one- and two-dimensional Perlin noise. A series of sine waves
with
Having shown how a sound wave can be generated from a series of sine waves, other terms of importance specific to Perlin noise can be defined. Lacunarity is a measure of how fractal patterns fill space (Falconer, 2013), and in the context of Perlin noise the
The link between sound waves and neutral landscape models may not be immediately evident. However, the series of sine waves are a hierarchical set of patterns, and such hierarchical patterns can be useful when creating neutral landscape models (Wang and Malanson, 2008). Therefore, if the frequency of each sine wave represents the spatial scale of each landscape feature in terms of how often it occurs and the amplitude of each sine wave represents the magnitude of each landscape feature in terms of the size of the effect, then the summation of the sine waves into a sound wave can produce a pattern that can be used as the basis of a neutral landscape model (Keitt, 2000). For example, mountain ranges would be a low-frequency, high-amplitude landscape feature as the low frequency means there are few mountain ranges per landscape and the high amplitude that the effect of each mountain range on landscape pattern is large. Conversely, the occurrence of a particular tree species could be a high-frequency, low-amplitude landscape feature as the occurrence of the species could be highly variable across a landscape and the presence of the species may have a small effect on the overall landscape pattern. The cyclical nature of sine waves produces a sound wave that has a repetitive pattern unlikely to be found in real landscapes (Fig. 1d), so to produce realistic neutral landscape models, a method to produce irregular or noisy sound waves is required. For spectral synthesis methods such as wavelets and Fourier transforms, in essence these noisy waves are achieved by the summation of sine or cosine waves that are out of phase, meaning that the locations of the ends of wave periods do not intersect and that they have randomised rather than systematic changes in frequency and amplitude (Keitt, 2000; Chipperfield et al., 2011). This process will usually involve many sine or cosine waves, but a very simple example of three out-of-phase sine waves of increasing frequency and deceasing amplitude (Fig. 1e to g) is sufficient to demonstrate the principle that the summation of regular sine waves can produce a noisy wave with an irregular pattern that is more likely to be found in real landscapes (Fig. 1h).
An alternative approach to combining regular sine or cosine waves to produce
irregular noise is to create a gradient (or coherent) noise that is smooth
like a sine wave but in contrast is immediately irregular and is stochastic so that an unlimited number of different possible noises can be produced from the same input parameters. A widely used example of gradient noise is Perlin noise (Perlin, 1985) that, very briefly, is not created from the summation of sine or cosine waves but instead is created by generating random gradient values at the locations at the ends of wave periods and then interpolating the gradient values between these locations to immediately create a smooth noise wave (Parberry, 2014; Lagae et al., 2010). Perlin noise waves are like sine waves in that they also have a regular period with the wave starting and ending each period at zero – though unlike a sine wave a Perlin noise wave is not guaranteed to cross zero during the period cycle (Fig. 1i). As with the sine waves, by specifying a lacunarity and persistence, a series of Perlin noise waves can be produced that have an ever-increasing number of periods and ever-decreasing amplitude (Fig. 1i to k). In Perlin noise terminology each of these noise waves is called an octave, as the standard value of lacunarity
The Perlin noise parameters of number of periods (horizontal and vertical), number of octaves, lacunarity, and persistence can be changed to produce a wide range of spatial patterns. Rescaling the resulting Perlin noise to range from zero to one to be consistent with neutral landscape modelling software (Etherington et al., 2015) produces a wide array of different neutral landscape models (Fig. 2). The possibilities are essentially endless, so Perlin noise should be able to generate neutral landscape models that have spatial patterns that are relevant to a very wide range of landscape contexts.
Example neutral landscape models demonstrating the wide range of possibilities that can be produced by varying the Perlin noise parameters of number of periods (top to bottom, left to right), number of octaves, lacunarity, and persistence.
The main advantage of Perlin noise over other fractal methods such as the mid-point displacement method comes from the hierarchical structure of Perlin noise. The hierarchical structure allows for a very wide range of spatial patterns (Fig. 2), but the hierarchical structure also links nicely to hierarchical perspectives of landscape patterns. Landscape patterns can be very usefully viewed in a hierarchical sense, with processes operating at different spatial scales combining to produce an overall landscape pattern. For example, geological processes acting at the macroscale may provide an initial dominant restriction to forest patterns; these forest patterns are then affected by disturbance events operating at a mesoscale before individual tree mortality affecting patterns at the microscale (Turner and Gardner, 2015; Urban et al., 1987). This hierarchy of landscape processes combining to produce landscape patterns has obvious parallels to the octaves of Perlin noise with increasing frequency and decreasing amplitude combining to produce a neutral landscape model (Fig. 1m to p).
A possible disadvantage of Perlin noise is that, like all procedural generation methods, specifying the appropriate set of parameters can be bewildering, especially when the parameters can interact in non-intuitive ways, so that successful application of procedural generation methods such as Perlin noise can require a lot of experimentation (Smelik et al., 2014). Another possible disadvantage is software availability, as the only dedicated neutral landscape modelling software package that includes Perlin noise is the Python NLMpy package (Etherington et al., 2015) that was used to generate the examples provided here. However, as Perlin noise has a long and successful history, code for Perlin noise will likely exist in a variety of programming languages, and hopefully this introduction to Perlin noise from an ecological perspective will facilitate the use and development of such code in a landscape ecological application.
Of course, Perlin noise is not the only form of spectral synthesis that could be used for neutral landscape modelling, and although the flexible nature of the technique means that a wide variety of neutral landscape models can be produced that could have wide application potential (Fig. 2), Perlin noise is by no means perfect. For example, a limitation of Perlin noise when used to simulate terrain is that it often produces isolated valleys (Parberry, 2014). This problem with Perlin noise can be addressed via further processing of the simulated terrain via erosion modelling (Musgrave et al., 1989) or basin filling (Lavorel et al., 2022), or other procedural modelling algorithms such as value noise could be used instead in combination with real-world elevation data to produce more realistic terrain (Parberry, 2014). Other forms of spectral synthesis that also sit within the general family of
It has been suggested that existing procedural models are a useful starting point for developing new models (Smelik et al., 2014). Therefore, the Python code to generate the Perlin noise used in the figures in this paper is openly available under an MIT licence as a Supplement.
No data sets were used in this article.
The supplement related to this article is available online at:
The contact author has declared that there are no competing interests.
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work was supported by the Strategic Science Investment Funding for Crown Research Institutes from the New Zealand Ministry of Business, Innovation and Employment's Science and Innovation Group.
This paper was edited by John M. Halley and reviewed by two anonymous referees.