Noise Based Texture Noise Based Texture CMPS260 Presentation Guoping Xu [email protected] Mar. 05,...
-
Upload
sandra-griffith -
Category
Documents
-
view
215 -
download
3
Transcript of Noise Based Texture Noise Based Texture CMPS260 Presentation Guoping Xu [email protected] Mar. 05,...
Noise Based TextureNoise Based Texture
CMPS260 PresentationGuoping Xu
Mar. 05, 2003
ContentContent
• Introduction
• Procedural texture
• Solid texture
• Noise
• Animation
Procedural TechniquesProcedural Techniques
• Used to produce realistic textures
—marble, wood, stone, bricks, etc
• Used to produce realistic objects
—water, smoke, steam, fire, etc
• Offer flexibility to create objects
—the designer is not constrained by the complex laws of physics
Solid textureSolid texture
• We can use space function to represent a solid material.
• Solid texture
We will obtain the surface texture if we evaluate this space function at the visible surface points of an object
• Shape and texture are independent
NoiseNoise
• Why noise?
Noise is a texturing primitive, we can use it to create a large variety of natural looking textures.
Many things in nature are fractal, they have various levels of detail. So, combining noise into various space functions will produce natural looking procedural textures.
Generating Noise• Value Noise
Given a pseudorandom number between -1 and 1 at each lattice point, a noise function is computed from these random values
• Gradient NoiseFirst generate a pseudorandom gradient vector at each lattice point and then use the gradients to generate the stochastic function
• Value-Gradient Noise
A combination of value noise and gradient noise. e.g. weighted sum of two, or cubic Hermite interpolation.
Perlin Noise(1)Perlin Noise(1)-Value Noise-Value Noise
• Perlin Noise function recreates the fractal property by simply adding up noisy functions at a range of different scales
• Perlin noise is a popular noise• To create a Perlin noise function, you
will need two things, a Noise Function, and an Interpolation Function[1]
Requirements IRequirements I–Noise funciton–Noise funciton
• A seeded random number generator• Generate the same number( 0 ~ 1 ) for the
same seed Sum of noise functions= Perlin Noise• Those noises are of different frequency and
amplitude frequency = 2i
amplitude = persistencei i is ith noise function being added
Gradient Noise
• Precompute array of n pseudorandom vectors at lattice points
• Calculate the noise from the nearest corner gradient vectors according to its location
• For example, in 3D, find the cube associated to the point, then according to the difference vector to each corner and the gradient there, calculate the noise interested.
Requirements IIRequirements II–Interpolation function(1)–Interpolation function(1)
We can use different order of interpolation• Linear interpolation linearly interpolate between two end point x(t)=a*(1-t)+b*t 0<=t<=1
–not smooth
Interpolation function(2)Interpolation function(2)• Cosine interpolation f(t)=(1-cos(t))/2
x(t)=a*(1-f(t))+b*f(t) 0<=t<=1
much smoother, but need to speedup the cos(t)calculation
Interpolation function(3)Interpolation function(3)
• Cubic interpolation
very smooth
Smooth the noise
• Smooth the noise at by taking account of the influence of neighbors
Application Application
• You can use 2D Perlin Noise to landscapes and clouds
• You can use 3D Perlin Noise to produce volumetric clouds, or animate 2D clouds
• You can use 4D Perlin Noise to create animated 3D clouds, except that it would be really slow
Sample picturesSample pictures
1. Marble texture texture=cosine( x + perlin(x,y,z) )
2. Wood texture
G=perlin(x,y,x)*20, grain=g-int(g)
3. Standard 3 dimensional perlin noise.
4 octaves, persistence 0.25 and 0.5
4. Cloudusing 2D Perlin Noise
AnimationAnimation
Consider 2 ways of animating solid spaces
• Changing the solid space over time
Has time as a parameter that changes the definition of the space over time
• Moving the point being rendered through the solid space
References1. http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
2. Perlin, K., An Image Synthesizer. Proceedings of SIGGRAPH '85 (San Francisco,July 22-26 1985). In Computer Graphics 19, 3 (July 1985), 287-296.
3. http://mrl.nyu.edu/~perlin/paper445.pdf
4. Perlin, K and Hoffert, E., Hypertexture, Computer Graphics, Vol. 23, No. 3, July 1989, 253-262.
5. Ebert, D., Musgrave, F., etc.,Texturing and Modeling, a Procedural Approach, AP Professional, 1994.
Thank You!