Title: Student Name: Kae Thong Chew
1Introduction
- Student Name Kae Thong Chew
- Presentation topic title Procedural Generation
Terrains for Games using Fractals and L-systems. - Supervisor Dr. Penny De Byl
2Why is this research important
- Computer games today are incredibly complex ?
believable game object elements, intelligent,
challenging and addictive game play to its
players. - As game universes become more complex more
worlds, more buildings, more rooms, with more
polygons, textures, characters and so on the
man-hours required to design and model them grow
exponentially. - Hiring game artists becomes a very expensive
exercise.
3Why is this research important
- As game worlds grow larger, so do the data files
storing the game information game map designs,
character models etc.. The amount of game data to
store the game information has expanded in game
file sizes throughout computer game history - Example Castle Wolfenstein install file(1983)
69kb but Return to Castle Wolfenstein (2001) demo
install file 114.1 MB - How to solve this problem
- Procedural terrain generation
4Procedural Terrain Generation
- Procedural terrain generation is about making
optimal use of system bandwidth and main memory
by dynamically generating lower-level geometry
data from statically stored higher-level scene
data.
5Different Approaches to Procedural Generated
Terrain
- Some of the procedural methods used in
contemporary games include - Fractal landscape
- Perlin Noise
- Pseudo Random Number Generator (PRNG)
- L-systems
6Fractal Landscape
- A fractal landscape is essentially a
two-dimensional form of the fractal coastline,
with shape that is recursively constructed or
self-similar, that is, a shape that appears
similar at all scales of magnification and is
therefore often referred to as "infinitely
complex".
7Fractal Landscape
- A way to create this fractal landscape is to
employ random midpoint displacement algorithm, in
which a square is subdivided into four smaller
equal squares and the center point is vertically
offset by some random amount. The process is
repeated on the four new squares, and so on,
until the desired level of detail is reached.
8Fractal Landscape
- Another method is to divide and purturb.
9Fractal Landscapes
10Fractal Landscapes
11Perlin Noise
- Developed by Ken Perlin to create textures
Perlin 84,85, 89. - This is a function which uses interpolation
between a large number of pre-calculated gradient
vectors to construct a value that varies
pseudo-randomly over space and/or time to create
textures - linear interpolation cosine
interpolation
12Perlin Noise
- Two-dimensional Perlin noise.
- Salt and pepper noise, band-limited, and then
up-sampled.
- Procedural marble texture
13Pseudo Random Number Generator (PRNG)
- A pseudorandom number generator (PRNG) is an
algorithm that generates a sequence of numbers
which are not truly random. The outputs of
pseudorandom number generators only approximate
some of the properties of random numbers - It is given a seed and produces a very large set
of semi-random numbers. If the seed is changed,
the set of numbers produced will change
drastically - This is used together with Perlin Noise to
achieve nice-looking textures.
14L-systems
- L-systems are a special kind of string rewriting
grammars introduced by A.Lindenmayer in 1968 for
modeling plants. They rewrite a given string (a
sequence of symbols) according to a grammar, i.e.
a set of rules. To give an example, the single
rule - a ? b a b
- transforms the string
- a b a c
- into
- b a b b b a b c
15Examples of L-systems
- Used for modelling tree plant branches
- Example using
- Axiom Xwhere rules F --gt FFrules X --gt
F-XXFFX-Xangle 22.5 - (push) means saving a turtle cursor position
and (pop) means return to that same saved
position - will produce the image
16Examples of L-systems
- Using turtle graphics, to draw images
- The Sierpinski triangle drawn using an L-system.
- variables A B
- constants -
- start A
- rules (A ? B-A-B),(B ? ABA)
- angle 60º
- Here, A and B mean both "draw forward", means
"turn left by angle", and - means "turn right by
angle" .
- Evolution for n 2, n 4, n 6, n 9
17L-systems used for creating cities
- Related research work on L-systems application
which involved modelling building and cities are
done by Parish and Müller (2001) procedurally
using extended L-systems to build street maps and
city buildings.
18L-systems used for creating cities
- This is useful for urban modelling and planning
environment but this work lacks support for real
time interactively to generate flyby those city
buildings scenery. - However, this problem has been approached and
refined by G. Stefan, P. Jeremy, S. Nigel and
L.Geoff (2003). They proposed methods using view
frustum filling, pseudo random number generator
and cached display lists to display a pseudo
infinite virtual cities in real-time to the
user.
19L-systems used for creating cities
- Framework architecture for this research work.
20L-systems used for creating cities
- Real time procedural cities screenshots
21Research Interest
- Both these research work focus on modelling
exterior look of buildings only but so far no
attempt has been made on creating the interior
design of the buildings - How do we determine the interior of buildings for
game maps ?
22Research Interest
- Using L-systems as modelling structure, we
defined an interior area by giving a different
sets of rules to distinguish the interior wall
from the exterior wall area. - Considering the following example
- The axiom as been defined as FFFF
- to model a square shape
- The rewriting rules for F string would be
- F ? F W F
- Where W is another set of rules we defined to
draw internal walls with different texture
colour. - W ? W W -W W
- And the rotation angle for (turn right) and
(turn left) has been defined as 90 degrees.
23Example of Research Implementation Results
- The initial axiom screenshots for square shape.
24Example of Research Implementation Results
- After 1st iteration, interior walls which is
grey texture are rendered within the square shape
25Example of Research Implementation Results
- At the 2nd iterations, more grey interior texture
can be seen rendered within the square shape.
26Example of Research Implementation Results
- Another example for triangle shape
- The axiom as been defined as FFF
- to model a triangle shape
- The rewriting rules for F string would be
- F ? F W F
- Where W is another set of rules we defined to
draw internal walls with different texture
colour. - W ? W W -W W
- And the rotation angle for (turn right) and
(turn left) has been defined as 120 degrees.
27Example of Research Implementation Results
- The initial axiom screenshots for triangle shape.
28Example of Research Implementation Results
- After 1st iteration, interior walls which is
grey texture are rendered within the triangle
shape
29Example of Research Implementation Results
- At the 2nd iterations, more grey interior texture
can be seen rendered within the triangle shape.
30Future work to complete in this research
- As for the future research work, the research
will focus on rendering more random walls shape,
using different interior textures and adding more
than one story to the shape itself.
31Thank you