Noise Course Overview Jim Whitehead. UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/spring14/01

Similar documents
CMSC 425: Lecture 12 Procedural Generation: 1D Perlin Noise

Advanced Rendering Techniques

Real-Time Procedural Effects. John Spitzer Director of European Developer Technology NVIDIA Corporation

1 Overview. EPFL 14 th Apr, /6. Michaël Defferrard Pierre Fechting Vu Hiep Doan

Interpolation and Basis Fns

Interpolation and Basis Fns

Perlin Noise Function

CS 4621 PPA3: Animation

CS 563 Advanced Topics in Computer Graphics Chapter 31 Noise Based Textures. by Scott Ingram

Gettin Procedural. Jeremy Shopf 3D Application Research Group

Information Coding / Computer Graphics, ISY, LiTH. Splines

Edge Detection (with a sidelight introduction to linear, associative operators). Images

THE RELATIONSHIP BETWEEN PROCEDURAL GENERATION TECHNIQUES: CELLULAR AUTOMATA AND NOISE JESSE HIGNITE. Advisor DANIEL PLANTE

Objects 2: Curves & Splines Christian Miller CS Fall 2011

More Texture Mapping. Texture Mapping 1/46

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Bump Mapping Which one of these two image has a better visual effect?

PRO_GEN. Procedural generation. Michael Gans Tylor Lilley Steve Moskal Bob Tishma

CPSC 425: Computer Vision

Coarse-to-fine image registration

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

White Paper. Perlin Fire. February 2007 WP _v01

Splines. Connecting the Dots

CGT 581 G Procedural Methods Fractals

Ms Nurazrin Jupri. Frequency Distributions

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Computer Graphics. - Texturing Methods -

Edges, interpolation, templates. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Image Registration Lecture 4: First Examples

Other Linear Filters CS 211A

Introduction to Geometry. Computer Graphics CMU /15-662

Wood Grain Image Textures

Rendering Smoke & Clouds

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Fractals and Multi-Layer Coloring Algorithms

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

Amortized Noise. Ian Parberry. Technical Report LARC

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Sampling Theory in 1D. Point Lattices in Sampling Theory Multidimensional Sampling Theory. Sampling in 1D. Reconstruction in 1D

Scalar Field Visualization. Some slices used by Prof. Mike Bailey

Ian Parberry. Technical Report LARC

Who has worked on a voxel engine before? Who wants to? My goal is to give the talk I wish I would have had before I started on our procedural engine.

Edge and local feature detection - 2. Importance of edge detection in computer vision

Deep Convolutional Neural Networks. Nov. 20th, 2015 Bruce Draper

Recap Randomized Algorithms Comparing SLS Algorithms. Local Search. CPSC 322 CSPs 5. Textbook 4.8. Local Search CPSC 322 CSPs 5, Slide 1

2D Spline Curves. CS 4620 Lecture 18

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Curves D.A. Forsyth, with slides from John Hart

Mosaics. Today s Readings

Soft Particles. Tristan Lorach

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

University of Florida CISE department Gator Engineering. Clustering Part 4

Tracking Computer Vision Spring 2018, Lecture 24

Spectroscopic Analysis: Peak Detector

Minecraft Due: Mar. 1, 2015

Michael Moody School of Pharmacy University of London 29/39 Brunswick Square London WC1N 1AX, U.K.

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

Edges and Lines Readings: Chapter 10: better edge detectors line finding circle finding

CS 231. Basics of Computer Animation

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

Subdivision Surfaces

Clustering Part 4 DBSCAN

Computer Experiments. Designs

HOUGH TRANSFORM CS 6350 C V

3 Nonlinear Regression

Zeyang Li Carnegie Mellon University

Shading 1: basics Christian Miller CS Fall 2011

Announcements. Edges. Last Lecture. Gradients: Numerical Derivatives f(x) Edge Detection, Lines. Intro Computer Vision. CSE 152 Lecture 10

u 0+u 2 new boundary vertex

Scaled representations

Möbius Transformations in Scientific Computing. David Eppstein

Image Processing. Filtering. Slide 1

I can solve simultaneous equations algebraically, where one is quadratic and one is linear.

Texture. Outline. Image representations: spatial and frequency Fourier transform Frequency filtering Oriented pyramids Texture representation

Lecture 15: Segmentation (Edge Based, Hough Transform)

Feature Extractors. CS 188: Artificial Intelligence Fall Some (Vague) Biology. The Binary Perceptron. Binary Decision Rule.

Marching Squares Algorithm. Can you summarize the marching squares algorithm based on what we just discussed?

Lecture 4: Image Processing

Introduction to Digital Modelling and Animation in Design week 4 Textures

3 Nonlinear Regression

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

A toolbox of smooths. Simon Wood Mathematical Sciences, University of Bath, U.K.

Central issues in modelling

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Algorithms for GIS csci3225

Data Representation in Visualisation

Area of Plane Shapes 1

Subdivision Surfaces

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

16 - Other Topics. The Stencil Buffer. Erosion. Fragment Discarding. Multi-Texturing + +

Development of a Maxwell Equation Solver for Application to Two Fluid Plasma Models. C. Aberle, A. Hakim, and U. Shumlak

Parametric curves. Brian Curless CSE 457 Spring 2016

Module 1 Lecture Notes 2. Optimization Problem and Model Formulation

CS248. Game Mechanics

Transcription:

Noise Course Overview Jim Whitehead UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/spring14/01 ejw@cs.ucsc.edu 31 Mar 2014

Computer generation Assume that there exists: One or more instances of some thing (level, music, robot, map, NPC, texture, etc.) That meets a desirability guideline Might be expressible as a fitness function Might be human-guided, I ll know it when I see it The things are comprised of sub-parts, and each sub-part typically has one or more ways it can vary Sometimes discrete choices Other times, a continuous range of possibilities Example: small shed: has four walls, can vary width & height, location of door, type of roof (flat, peaked, slanted, etc.)

Variation space Each type of variation can be viewed as an axis in an abstract N-dimensional variation (or search) space Shed example: shed length, shed width, shed height, shed door location, shed rooftype Creates a 5-dimensional space Algorithmic creation of things can be viewed as a process of finding desirable instances within the variation space

Generative approaches There are different ways of finding good instances in the variation space: Random (noise) Pick instance randomly Combine shapes and continuous functions (parametric design) Path-specified (grammars) Explore only along certain paths in variation space Hill climbing with semi-randomness (evolutionary techniques) Create population of instances, then select best ones, generate semirandom new ones from existing instances Constraint based (answer set programming) Explicitly state desired qualities of instances

Noise A noise function is a kind of random number generator. Random number generator (typical): i = random() No parameters, returns random number in a range With noise, return random number for a point I = noise(x) I = noise(x,y) I = noise(x,y,z) That is, a noise function maps from R n to R You input an n-dimensional point with real coordinates, it returns a real value

Why do we care about noise? Noise has many applications Texture generation for a wide range of materials World map generation Cloud generation Randomness in game systems Perlin noise examples Experiments with Perlin Noise (sphere, lights, explosion) http://www.clicktorelease.com/blog/experiments-with-perlin-noise Perlin Noise map generation http://www.playmycode.com/build/edit/4931 Shader demos of various materials https://github.com/ashima/webgl-noise/wiki

Problem with simple random noise A simple approach for procedurally creating a texture is: Map a random number to each (x,y) coordinate noise(x,y) = random() Random number generators often have a limited range (e.g., [0,1]) Control maximum value by multiplying by an amplitude value a * noise(x,y) Problem Results don t have any coherence to them. Just a jumble of values. Not appealing. Doesn t look like anything, really.

Desirable noise qualities Ideally, a noise function will (informally): Give the appearance of randomness Be controllable, hence capable of generating many materials Have random variations of roughly the same size, roughly isotropic Quick to execute More formally: Be a repeatable pseudorandom function of its inputs Have a known range, often -1 to 1 Not exhibit obvious periodicity or regular patterns. If pattern does repeat, do it on long time scales Be stationary should be translationally invariant Be isotropic should be rotationally invariant

Different families of noise functions Lattice noise Value noise Gradient noise Perlin noise Simplex noise Value-gradient noise Lattice convolution noise Cell noise (Worley noise) Sparse convolution / spot noise

Lattice noise Uniformly distributed random number at each point noise(x,y,z) = random() Interpolate for values in-between lattice points For value noise: Linear interpolation: looks boxy, has lattice cell artifacts Use cubic interpolation instead (2 nd derivative is continuous), such as cubic Catmull-Rom spline Can also use quadratic and cubic B-splines

Perlin Gradient noise Start with a lattice of random values (each point is P) For each lattice point, also create a 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 Or, the projection of the gradient vector along the direction vector to P In n dimensions, compute this product for all 2 n neighbors Now, interpolate between them

Noise Straight noise Make objects look dirty or worn Using gradient of noise to vary surface normal, can create bumpy appearance For more advanced effects, need to combine noise at multiple frequencies Source: Ken Perlin, http://www.noisemachine.com/talk1/20.html

Sum 1/f(noise) noise(p) + ½ noise(2p) + ¼ noise(4p)... Creates nice cloudy atmosphere effect Source: Ken Perlin, http://www.noisemachine.com/talk1/21.html

Amplitude/frequency view Amplitude: difference between min and max values Wavelength is distance from one red dot to next Frequency = 1/wavelength Source: Hugo Elias Noise page

Amplitude & frequency variation Amplitude is halved as frequency doubles

Sum together to create 1/f(noise) Source: Hugo Elias noise page: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

Sum1/f( noise ) Instead of a fractal sum of noise, use a fractal sum of the absolute value of noise: noise(p) + ½ noise(2p) + ¼ noise(4p)... Source: Ken Perlin, http://www.noisemachine.com/talk1/22.html

Sin(x + sum 1/f( noise )) Use turbulence texture from the previous slide Do a phase shift in a simple stripe pattern. Stripe pattern itself is created with a sine function of the x coordinate of surface location: sin( x + noise(p) + ½ noise(2p) +...) Source: Ken Perlin, http://www.noisemachine.com/talk1/22.html

Terrain generation Can map noise values to height map values Overlay a texture See: http://catlikecoding.com/unity/products/numberflow/terrain-demo/

Simplex noise Instead of interpolating among hypergrid neighbors, simplex noise divides space into simplices (n-dimensional triangles) Advantages: Simplex noise has a lower computational complexity and requires fewer multiplications. Simplex noise scales to higher dimensions (4D, 5D) with much less computational cost, the complexity is for dimensions instead of the of classic noise. Simplex noise has no noticeable directional artifacts (is isotropic). Simplex noise has a well-defined and continuous gradient everywhere that can be computed quite cheaply. Simplex noise is easy to implement in hardware. Source: http://en.wikipedia.org/wiki/simplex_noise

Noise pros/cons Noise is useful for generating a wide range of textures Via interesting mappings, can be used as a smooth source of randomness in a wide range of situations Most useful in content generation situations where a wide range of outputs are acceptable I.e., there are few constraints on the generated artifacts Those constraints that exist are baked into the noise algorithm Once there are many constraints, or many areas of unacceptability, or need wide variation, start needing more control