CMSC 425 Lecture Notes - Lecture 9: Perlin Noise, Ken Perlin, Pseudorandom Number Generator

38 views6 pages
CMSC 425 Dave Mount & Roger Eastman
CMSC 425: Lecture 12
Procedural Generation: 1D Perlin Noise
Reading: The material on Perlin Noise based in part by the notes Perlin Noise, by Hugo Elias.
(The link to his materials seems to have been lost.) This is not exactly the same as Perlin noise,
but the principles are the same.
Procedural Generation: Complex AAA games hire armies of designers to create the immense
content that make up the game’s virtual world. If you are designing a game without such
extensive resources, an attractive alternative for certain natural phenomena (such as terrains,
trees, and atmospheric effects) is through the use of procedural generation. With the aid
of a random number generator, a high quality procedural generation system can produce
remarkably realistic models. Examples of such systems include terragen (see Fig. 1(a)) and
speedtree (see Fig. 1(b)).
(a)
(b)
terragen
speedtree
Fig. 1: (a) A terrain generated by terragen and (b) a scene with trees generated by speedtree.
Procedural model generation is a useful tool in developing open-world games. For example,
the game No Man’s Sky uses procedural generation to generate a universe with a vast num-
ber of different planets, all with distinct pseudo-randomly-generated ecosystems, including
terrains, flora, fauna, and climates (see Fig. 2). The structure of each planet is not stored on
a server. Instead, each is generated deterministically by a 64-bit seed.
Fig. 2: No Man’s Sky.
Before discussing methods for generating such interesting structures, we need to begin with
a background, which is interesting in its own right. The question is how to construct random
Lecture 12 1 Spring 2018
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
CMSC 425 Dave Mount & Roger Eastman
noise that has nice structural properties. In the 1980’s, Ken Perlin came up with a powerful
and general method for doing this (for which he won an Academy Award!). The technique is
now widely referred to as Perlin Noise.
Perlin Noise: Natural phenomena derive their richness from random variations. In computer
science, pseudo-random number generators are used to produce number sequences that appear
to be random. These sequences are designed to behave in a totally random manner, so that
it is virtually impossible to predict the next value based on the sequence of preceding values.
Nature, however, does not work this way. While there are variations, for example, in the
elevations of a mountain or the curves in a river, there is also a great deal of structure present
as well.
One of the key elements to the variations we see in natural phenomena is that the magnitude
of random variations depends on the scale (or size) at which we perceive these phenomena.
Consider, for example, the textures shown in Fig. 3. By varying the frequency of the noise
we can obtain significantly different textures.
Fig. 3: Perlin noise used to generate a variety of displacement textures.
The tendency to see repeating patterns arising at different scales is called self similarity and
it is fundamental to many phenomena in science and nature. Such structures are studied
in mathematics under the name of fractals. Perlin noise can be viewed as a type of random
noise that is self similar at different scales, and hence it is one way of modeling random fractal
objects.
Noise Functions: Let us begin by considering how to take the output of a pseudo-random number
generator and convert it into a smooth (but random looking) function. To start, let us consider
a sequence of random numbers in the interval [0,1] produced by a random number generator
(see Fig. 4(a)). Let Y=hy0, . . . , ynidenote the sequence of random values, and let us plot
them at the uniformly places points X=h0, . . . , ni.
Next, let us map these points to a continuous function, we could apply linear interpolation
between pairs of points (also called piecewise linear interpolation. As we have seen earlier
this semester, in order to interpolate linearly between two values yiand yi+1, we define a
parameter αthat varies between 0 and 1, the interpolated value is
lerp(yi, yi+1, α) = (1 α)yi+αyi+1.
To make this work in a piecewise setting we need to set αto the fractional part of the x-value
that lies between iand i+1. In particular, if we define xmod 1 = x bxcto be the fractional
Lecture 12 2 Spring 2018
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Reading: the material on perlin noise based in part by the notes perlin noise, by hugo elias. (the link to his materials seems to have been lost. ) This is not exactly the same as perlin noise, but the principles are the same. Procedural generation: complex aaa games hire armies of designers to create the immense content that make up the game"s virtual world. If you are designing a game without such extensive resources, an attractive alternative for certain natural phenomena (such as terrains, trees, and atmospheric e ects) is through the use of procedural generation. With the aid of a random number generator, a high quality procedural generation system can produce remarkably realistic models. Examples of such systems include terragen (see fig. 1: (a) a terrain generated by terragen and (b) a scene with trees generated by speedtree. Procedural model generation is a useful tool in developing open-world games.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents