An Image Synthesizer- Perlin Noise

1 / 26

# An Image Synthesizer- Perlin Noise - PowerPoint PPT Presentation

An Image Synthesizer- Perlin Noise. Outline. Noise Introduction Noise Algorithm Noise Texture Example. Why noise?. Use it to create " natural " looking textures. What Noise?. Noise Algorithm . Given an input point For each of its neighboring grid points:

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## An Image Synthesizer- Perlin Noise

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### An Image Synthesizer-Perlin Noise

Outline
• Noise Introduction
• Noise Algorithm
• Noise Texture Example
Why noise?
• Use it to create "natural" looking textures
Noise Algorithm
• Given an input point
• For each of its neighboring grid points:

* Pick a "pseudo-random" gradient vector

* Compute linear function (dot product)

• Take weighted sum, using ease curves
Constructing 2D noise
• Given an input point P, look at each of the surrounding grid points.
• In two dimensions there will be four surrounding grid points; in three dimensions there will be eight. In n dimensions, a point will have 2n surrounding grid points.
Constructing 2D noise
• For each surrounding grid point Q, choose a pseudo-random gradient vector G.
• Compute the inner product G . (P-Q). This will give the value at P of the linear function with gradient G which is zero at grid point Q.
Constructing 2D noise
• drop-off filter centered at that grid point. This filter, which makes the influence of this grid point gradually drop to zero at a unit distance, is a product of two cubic drop-off curves, one in x and the other in y. The shape of each cubic is computed by 3t2-2t3.
Constructing 2D noise

linear gradient multiplied by the weighting filter. This will be the contribution from that grid point to the final result.

Constructing 2D noise

the contributions from each of the other three surrounding grid points.

Constructing 2D noise

the contributions from each of the other three surrounding grid points.

Constructing 2D noise

the contributions from each of the other three surrounding grid points.

Constructing 2D noise

the sum of the contributions from the four surrounding grid points.

• Precompute table of permutations P[n]
• Precompute table of gradients G[n]
• G = G[ ( i + P[ (j + P[k]) mod n ] ) mod n ]
Turbulence function
• function turbulence(p)

t=0

scale = 1

while (scale > pixelsize)

t + = abs(Noise(p / scale) * scale)

scale/= 2

return t

sum 1/f(noise)
• noise(p) + ½ noise(2p) + ¼ noise(4p) ...
sum 1/f(|noise|)
• |noise(p)| + ½|noise(2p)| + ¼|noise(4p)| ...
sin(x + sum 1/f(|noise|))
• sin( x +|noise(p)| + ½|noise(2p)| + ...)
Water.Crystal
• if begin_frame

center = makewaves(20)

for c in center

normal + = wave(point- c)

• function wave(v)

return direction(v)*cycloid(norm(v))

• function makewaves(n)

for i in [1 .. n]

center[i] = direction(Dnoise(i * [100 0

0] ))

return center

Marble - An Example of • Solid Texture
• function boring_marble(point)

x = point[l]

return marble_color(sin(x))

• function marble(point)

x = point[1] + turbulence(point)

return marble_color(sin(x))

Flame

smooth_corona(point - center)

* function smooth_corona(v)

* function corona(v)