1 / 26

An Image Synthesizer- Perlin Noise

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:

oksana
Télécharger la présentation

An Image Synthesizer- Perlin Noise

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Image Synthesizer-Perlin Noise

  2. Outline • Noise Introduction • Noise Algorithm • Noise Texture Example

  3. Why noise? • Use it to create "natural" looking textures

  4. What Noise?

  5. 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

  6. 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.

  7. 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.

  8. 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.

  9. Constructing 2D noise linear gradient multiplied by the weighting filter. This will be the contribution from that grid point to the final result.

  10. Constructing 2D noise the contributions from each of the other three surrounding grid points.

  11. Constructing 2D noise the contributions from each of the other three surrounding grid points.

  12. Constructing 2D noise the contributions from each of the other three surrounding grid points.

  13. Constructing 2D noise the sum of the contributions from the four surrounding grid points.

  14. Computing the pseudo-random gradient: • Precompute table of permutations P[n] • Precompute table of gradients G[n] • G = G[ ( i + P[ (j + P[k]) mod n ] ) mod n ]

  15. Turbulence function • function turbulence(p) t=0 scale = 1 while (scale > pixelsize) t + = abs(Noise(p / scale) * scale) scale/= 2 return t

  16. noise

  17. normal + = Dnoise(point)

  18. normal + = Dnoise(point)

  19. sum 1/f(noise) • noise(p) + ½ noise(2p) + ¼ noise(4p) ...

  20. sum 1/f(|noise|) • |noise(p)| + ½|noise(2p)| + ¼|noise(4p)| ...

  21. sin(x + sum 1/f(|noise|)) • sin( x +|noise(p)| + ½|noise(2p)| + ...)

  22. 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

  23. normal + = wave((point - c) * f) / f

  24. 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))

  25. Flame smooth_corona(point - center) * function smooth_corona(v) {radius = norm(v) return color.of_emission(radius)} * function corona(v) radius = norm(v) dr = turbulence(v) return color..of_corona(radius + dr) * function moving_corona(v) radius = norm(v) dr = turbulence(v - frame * direction(v)) return color_of_corona(radius + dr)

  26. Cloud

More Related