13
The massive world of noise (with a little bit of procedural textures) Real-Time Rendering Cody Tankersley

Real-Time Rendering Cody Tankersley. Term Project Overview ◦ Desired Shaders What is noise? A Little History…. Noise Functions ◦ Some Implementation

Embed Size (px)

Citation preview

Page 1: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

The massive world of noise (with a little bit

of procedural textures)Real-Time Rendering

Cody Tankersley

Page 2: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Term Project Overview◦ Desired Shaders

What is noise? A Little History…. Noise Functions

◦ Some Implementation Details CPU vs GPU Noise Applications that love noise! References Demos! Administrative ‘Stuffz’

Overview

Some really cool noise [4]

Page 3: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Goal: Create an universe in real-time Techniques:

◦ Noise – Perlin, Simplex, Basic◦ Particle Systems

Effects Modeled:◦ Variety of planet types (rock, gas, water, etc)◦ Semi-realistic orbital paths◦ Various other elements (black holes, comets,

‘twinkling’ stars, and more)

Term Project Overview

Page 4: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Sun Shader◦ Animated sun spots

Rock Shader◦ Model rocky planets

Water Shader◦ Model water-based planets

Gas Shader◦ Model gas-based planets

Other Possible Shaders ◦ Sun flare shader, molten shader, black hole

shader, and more

Desired Shaders

Page 5: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Pseudo-Random Numbers

Way Too Many Definitions….◦ Wavelength (distance)◦ Amplitude (max to min)◦ Frequency ( 1 / wavelength)◦ Octaves (values per iteration)◦ Gradients◦ Simplex (funny ‘squashed’ shapes)

What is noise?

Noise [2]

Page 6: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Ken Perlin◦ http://cs.nyu.edu/~perlin/

Why he studied noise How and why noise has evolved

A Little History….

More noise [4]

Page 7: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Perlin Noise (1984)◦ O(2n)

Simplex (2001)◦ O(n2)

Noise Functions

3D Perlin Noise vs 3D Simplex Noise [1]

Page 8: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Perlin Noise◦ Generate random numbers (per iteration)◦ Sample by gradient◦ Smooth (or don’t)◦ Interpolate◦ Add value to total

Simplex Noise◦ Generate random numbers (per iteration)◦ Sample by gradient (or bits)◦ Sum◦ Add value to total

Some Implementation Details

Page 9: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

CPU Generation

GPU Generation◦ Textures for storage

CPU vs GPU Noise

Different interpolation Techniques [4]

Page 10: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Texturing◦ e.g. Clouds / Wood / Marble / Etc

Particle Systems◦ Who doesn’t love fire and smoke?

Object Placement◦ Random map generation

There’s always more…◦ ….I’m just not familiar with them

Applications that Love Noise!

clouds [4]

Page 11: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

[1] S. Gustavson, “Simplex Noise Demystified,” http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf (accessed Oct. 5, 2011).

[2] H. Tulleken, “How to Use Perlin Noise in Your Games,” http://devmag.org.za/2009/04/25/perlin-noise/ (accessed Oct. 5, 2011).

[3] K. Perlin, “Implementing Improved Perlin Noise,” GPU Gems, Pearson Education, Inc, Upper Saddle River, New Jersey, 2005, ch. 5.

[4] K. Perlin, “Making Noise,” http://www.noisemachine.com/talk1/9.html (accessed Oct. 5, 2011).

[5] H. Elias, “Perlin Noise,” http://freespace.virgin.net/hugo.elias/models/m_perlin.htm (accessed Oct. 5, 2011).

References

Page 12: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Demo Time!

Ahh, fire! [4]

Page 13: Real-Time Rendering Cody Tankersley.  Term Project Overview ◦ Desired Shaders  What is noise?  A Little History….  Noise Functions ◦ Some Implementation

Required Shaders◦ Sun Shader◦ Water/Ice Planet Shader◦ Rock Planet Shader◦ Gas Planet Shader

Desired◦ Sun Flare Particle Shader◦ Molten Planet Shader◦ Black Hole Shader◦ Comet Shader◦ Simplex / Perlin / Basic Noise implementations of all

planets

Administrative Stuffz