Noises Jaanus Jaggo Noise Noise is a function: noise(coordinate) - - PowerPoint PPT Presentation

noises
SMART_READER_LITE
LIVE PREVIEW

Noises Jaanus Jaggo Noise Noise is a function: noise(coordinate) - - PowerPoint PPT Presentation

Noises Jaanus Jaggo Noise Noise is a function: noise(coordinate) -> value Pseudo-random: gives the appearance of randomness Determinism: same input gives the same result every time White noise ? Dimensions ? Dimensions Better noise


slide-1
SLIDE 1

Noises

Jaanus Jaggo

slide-2
SLIDE 2

Noise

Noise is a function: noise(coordinate) -> value

Pseudo-random: gives the appearance of randomness Determinism: same input gives the same result every time

slide-3
SLIDE 3

White noise

? Dimensions ? Dimensions

slide-4
SLIDE 4

Better noise

slide-5
SLIDE 5

Combination of noises

http://www.blendswap.com/blends/view/80871

slide-6
SLIDE 6

Value noise

slide-7
SLIDE 7

Perlin noise

  • Author: Ken Perlin
  • Idea: 1-st Tron movie
  • Complexity:
slide-8
SLIDE 8

Perlin Implementation

  • 1. Define n-dimensional grid
  • 2. Assign a gradient vector to each grid coordinate

○ Lookup table / texture

  • 3. Find dot product between the gradient vector and

distance vector (2D - 4 x dot, 3D - 8 x dot)

  • 4. Interpolate between the dot product values
slide-9
SLIDE 9

Perlin Implementation

yellow - positive blue - negative

slide-10
SLIDE 10

Pseudocode

// Compute Perlin noise at coordinates x, y function perlin(float x, float y) { // Determine grid cell coordinates int x0 = (x > 0.0 ? (int)x : (int)x - 1); int x1 = x0 + 1; int y0 = (y > 0.0 ? (int)y : (int)y - 1); int y1 = y0 + 1; // Determine interpolation weights // Could also use higher order polynomial/s-curve here float sx = x - (double)x0; float sy = y - (double)y0;

// Interpolate between grid point gradients

float n0, n1, ix0, ix1, value; n0 = dotGridGradient(x0, y0, x, y); n1 = dotGridGradient(x1, y0, x, y); ix0 = lerp(n0, n1, sx); n0 = dotGridGradient(x0, y1, x, y); n1 = dotGridGradient(x1, y1, x, y); ix1 = lerp(n0, n1, sx); value = lerp(ix0, ix1, sy); return value; }

slide-11
SLIDE 11

Simplex noise

  • Author: Ken Perlin
  • Complexity:

○ Scales well on high dimensions. Uses simplicial grid (triangles instead of squares, tetrahedron instead of cubes)

slide-12
SLIDE 12

Applications - textures

slide-13
SLIDE 13

Creating textures

simplex(p) abs(simplex(p)) 1 - (abs(simplex(p))) billow ridged

slide-14
SLIDE 14

Creating textures

+ =

slide-15
SLIDE 15

Creating textures

  • >

Another simplex noise for distortion Or use ridged noise instead

slide-16
SLIDE 16

Terrain

slide-17
SLIDE 17

Level

slide-18
SLIDE 18

Animations

3D animated noise: https://www.youtube.com/watch?v=4KOJiQ4jZhY 3D clouds: https://www.shadertoy.com/view/XslGRr