procedural texture synthesis

36
Procedural Texture Synthesis Patterns from Algorithms

Upload: tab

Post on 23-Feb-2016

71 views

Category:

Documents


0 download

DESCRIPTION

Procedural Texture Synthesis. Patterns from Algorithms. Procedural Synthesis. The basic problem: Worlds are big . To create models and textures for even fairly small worlds takes ages, if you do it by hand. Idea: write down the rules of the world, and a program can create the content. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Procedural Texture Synthesis

Procedural Texture Synthesis

Patterns from Algorithms

Page 2: Procedural Texture Synthesis

Procedural Synthesis

• The basic problem: Worlds are big.– To create models and textures for even fairly small

worlds takes ages, if you do it by hand.

• Idea: write down the rules of the world, and a program can create the content.

• Philosophy of algorithmic synthesis: proceduralism.

Page 3: Procedural Texture Synthesis

[World of Warcraft, 2004-2010]

Page 4: Procedural Texture Synthesis

[Oblivion, 2006]

Page 5: Procedural Texture Synthesis

Procedural Texture

• Simplest form: function evaluation– T(x,y) = ?

• Instead of accessing texture memory, directly compute the texture value

• Pro: saves memory, bus• Con: need the algorithm– and, need a shader, but normally would have that

anyway

Page 6: Procedural Texture Synthesis

Proceduralism vs Reuse

• Reuse: simple repetition of models, textures

• Proceduralism: new models, textures by rerunning algorithm with different inputs– trivially, different random seed

Page 7: Procedural Texture Synthesis

Sophisticated reuse

• Use small pieces – reuse not so obvious– "Lego blocks"

• Modular design: blocks are big (e.g., section of tunnel) – might be OK in industrial fiction

• "divine corpse" for monsters, architecture• Penrose tiles, Wang tiles for texture, terrain– Reuse with rotation, less apparent– city setting: regular layout

Page 8: Procedural Texture Synthesis
Page 9: Procedural Texture Synthesis
Page 10: Procedural Texture Synthesis
Page 11: Procedural Texture Synthesis

Texture Synthesis Primitives

• Building blocks for textures:– noise– Perlin noise– Voronoi cells– many others

• Rosalind Picard: "a society of models"

Page 12: Procedural Texture Synthesis

Texture Basis

• "basis functions" for texture• primitive functions used as foundation for specific

functions aimed at specific effects• Perlin noise: "the function that launched a thousand

textures"

Page 13: Procedural Texture Synthesis

Noise

• Simple and straightforward:– N(x,y) = random(range)

• Introduces much-needed randomness• But:– lacks coherence– cannot be sensibly subsampled, supersampled

Page 14: Procedural Texture Synthesis
Page 15: Procedural Texture Synthesis

Perlin Noise

• Ken Perlin, 1985

• random 4-vector at each node on an integer lattice:{a,b,c,d}[x][y][z]

Noise[x][y][z] = d[x][y][z] if x,y,z are integersotherwise, interpolate ax+d, by+d, cz+d using spline

2t^3 – 3t^2

Page 16: Procedural Texture Synthesis
Page 17: Procedural Texture Synthesis

DNoise

• Noise() is a scalar• Can get vector-valued function (for bump

mapping, say) by taking the gradient of Noise()

Page 18: Procedural Texture Synthesis

Multiresolution Noise

• Different signals at different scales• Fractals: clouds, mountains, coastlines

1/2 1/4 1/8 1/16 sum

Page 19: Procedural Texture Synthesis

Multiresolution Noise

• aka "turbulence"• FNoise(x,y,z) = Σ((2-i)*Noise(x*2i…))

• Extremely common formulation – so common that many mistake it for the basic noise primitive

Page 20: Procedural Texture Synthesis
Page 21: Procedural Texture Synthesis

Attributes of Perlin Noise

• Reproducible• Coherent• Continuous in first derivative• Arbitrary resolution

• Used as input to other functions

Page 22: Procedural Texture Synthesis
Page 23: Procedural Texture Synthesis

Perlin Marble

• texture = cos(x + a*Noise(x,y))– or, texture = cos(x + a*Turb(x,y))

• properly renormalized, of course!• purple/white color map• value of parameter a says how noisy the

marble is

Page 24: Procedural Texture Synthesis
Page 25: Procedural Texture Synthesis
Page 26: Procedural Texture Synthesis
Page 27: Procedural Texture Synthesis
Page 28: Procedural Texture Synthesis

Cellular Texture

• “Worley texture”, Worley 1996• Based on the Voronoi diagram: partition of

plane according to nearest point• Use nth-order distances (closest, second

closest…) as basis

Page 29: Procedural Texture Synthesis

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Page 30: Procedural Texture Synthesis

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Page 31: Procedural Texture Synthesis

v1

v3

v2

v4

Page 32: Procedural Texture Synthesis

v1

v2

v3

v4

Page 33: Procedural Texture Synthesis

Combining distances

• Having normalized distances, can combine– say D1, D2, D3, D4

• Take (say) 2*D1 – D3• Linear transformation given by 4 coefficients:– C1D1 + C2D2 + C3D3 + C4D4

• manipulate coefficients to obtain effects

Page 34: Procedural Texture Synthesis
Page 35: Procedural Texture Synthesis
Page 36: Procedural Texture Synthesis