Upload
others
View
34
Download
0
Embed Size (px)
Citation preview
IntroductionFractal Terrain Generation Methods
Conclusion
Techniques for Fractal Terrain Generation
A. Krista Bird B. Thomas Dickerson C. Jessica George
HRUMC Presentation, 2013
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Outline
1 IntroductionWhat is Fractal Terrain Generation?
2 Fractal Terrain Generation MethodsMidpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
3 Conclusion
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
ConclusionWhat is Fractal Terrain Generation?
Connecting Fractal Geometry and Terrain
What is fractal geometry?Benoit Mandlebrot and the length of the British coastline.(Stanger)
Figure: The coastline of Britain has a fractal dimension
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
ConclusionWhat is Fractal Terrain Generation?
Why are Fractals useful in Generating Landscapes?
Figure: Fractals are self-similar, and have a non-integer dimension
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Midpoint Displacement Method
Relatively straightforwardRealistic featuresBegin with a line between two points.The midpoint of this line is then displaced by some randomamount in a vertical direction.The midpoints of these two new line segments are thendisplaced by a random amount in the vertical direction.Repeat until you have reached desired level of detail.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Midpoint Displacement (cont.)
Must be a square with sides of length 2N + 1, so that eachsub-square has an exact middle lying on a gridpoint.k , k ′ ∈
{1,3, · · · ,2N−n − 1
}m ∈
{0,2, · · · ,2N−n}
n < N and m ∈ Z.H is a smoothing parameterA is an amplitude parameterR is uniform random variable between -1 and 1.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Midpoint Displacement (cont.)
Given a heightfield, T =
T0,0 . . . T0,2N ,...
. . ....
T2N ,0 . . . T2N ,2N
Recurrence relations for midpoints:along columnsTk ·2n,j·2n =
T(k+1)·2n,j·2n +T(k−1)·2n,j·2n
2 + A · R · 2−H·n,along rowsTj·2n,k ·2n =
Tj·2n,(k+1)·2n +Tj·2n,(k−1)·2n
2 + A · R · 2−H·n,and between cornersTk ·2n,k ′·2n =
(14
)T(k−1)·2n,(k ′−1)·2n +
(14
)T(k−1)·2n,(k ′+1)·2n +(1
4
)T(k+1)·2n,(k ′−1)·2n +
(14
)T(k+1)·2n,(k ′+1)·2n + A · R · 2−H·n
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Terrain Generated Using Midpoint Displacement
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Diamond Square Algorthim
Variations of the Midpoint Displacement methodMidpoint Displacement sometimes leaves square-shapedartifacts in the terrain.The Diamonds and Squares method attempts to alleviatethis by alternating calculated values to square anddiamond patterned midpoints.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Benefits of using the Diamond Square Algorithm andMidpoint Displacement Algorithm
Both the Midpoint Displacement and the Diamond SquareAlgorithm run in linear time compared to the Fouriertransformation which runs in NlogN time.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
How the Fast Fourier Transform Works in GeneratingFractal Landscape
Not an iterative processBegin using a random Gaussian noiseThis is a two dimensional NxM grid of discrete randomvalues.Apply the fast Fourier transform (FFT)
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Fast Fourier Transform
The Fast Fourier Transform performs the discrete Fouriertransform (DFT).A two dimensional discrete Fourier transform for an NxMgrid in x and y is
F (u, v) = 1/NMN−1∑x=0
M−1∑y=0
f (x , y)e−2πi(xu/N+yu/M)
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
How the Fast Fourier Transform Works in GeneratingFractal Landscape (cont.)
The FFT decomposes the random noise into the sum ofthe sine and cosine functions and converts magnitudesinto frequency domain
We scale these frequencies using a frequency filter of theform 1/f r .
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
How the Fast Fourier Transform Works in GeneratingFractal Landscape (cont.)
Apply an inverse fast Fourier transform
f (x , y) =N−1∑u=0
M−1∑v=0
F (u, v)e2πi(xu/N+yv/M)
in order to generate a fractal landscape by summing thesine and cosine waves at different frequencies.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Benefits of Terrain Generation Using The Fast FourierTransform
Fractal landscape with smooth rolling features rather thanridges and peaks.Terrain can be tiled using this method.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
Multifractal Technique
Very new techniqueThe multi fractal technique uses four parameters to createa generated landscape:
αC1SH
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
How the Multifractal Technique Works in GeneratingFractal Landscape
There are four different stages in creating a multi-fractalgenerated terrain:
The first stage is to generate a Levy noise field with acertain α
Sn =x1 + x2 + ...+ xn
n 1α
The second stage is to filter the output of the first stage toget a multi-scaling behavior as defined by the characteristicfunction:
K (q) =C1
α− 1(qα − q)
which results inΓλ
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Midpoint Displacement MethodTerrain Generation Using The Fast Fourier TransformMultifractal Method
How the Multifractal Technique Works in GeneratingFractal Landscape (cont.)
The third stage is to exponentiate and normalize the outputof stage two
ελ = N1 ∗ eΓλ
The fourth and final stage is to fractal integrate themulti-fractal field
1f β
whereβ = 2H + 1
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Conclusion
The standard method seems to be Diamond Squarealgorithm, as it produces fairly realistic landscape with littleeffort.The fast Fourier transform allows for flatter terraingeneration and the ability to tileNewest method is the Multifractal Technique which usesimages of real terrain to generate terrain with very accuratefeatures
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Outlook
Multiplication TechniqueCreates a landscape that looks more realisticDone by multiplying two terrains created by the methodsaboveMultiplication will result in a new landscape with smoothervalleys and rougher peaks.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Applications
Video GamesMovies and Television Shows
http://planetside.co.uk/galleries/terragen2-gallery
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
Thank You
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation
IntroductionFractal Terrain Generation Methods
Conclusion
For Further ReadingBourke, Paul (1997). Frequency Synthesis of Landscapes (and clouds). Retrieved fromhttp://paulbourke.net/fractals/noise/.Ewe, H.T.; Tan,S.L.; Teng, H.T. (2010). Multifractal Dimension and Its Geometrical TerrainProperties for Classification of Multi-band Multi-polarized Sar Image. Progress inElectromagnetics Research 104, 221-237.Jense, Hans; van Pabst, Joost van Lawick. Dynamic Terrain Generation Based onMultifractal Techniques.Jilesen, Jonathan; Kuo, Jim; Lien, Fue-Sang (2012). Three-dimensional MidpointDisplacement Algorithm for the Generation of Fractal Porous Media. Computers andGeosciences 46 164-173.Macklem, Grant (2003). Computer Landscape Generation and Smoothing: MastersComprehensive Exam.Methods of Terrain Generation. Retrieved fromhttp://www.cescg.org/CESCG99/PLobaz/sec4.html.S. Pecknold, S. Lovejoy, D. Schertzer, C. Hooge, and J. F. Malouin, The simulation ofuniversal multifractals, Cellular Automata, World Scientific, 1993.Stanger, Keith (2006). Algorithms for Generating Fractal Landscape.
K. Bird, T. Dickerson, J. George Techniques for Fractal Terrain Generation