Procedural Content
-
Upload
kendall-huff -
Category
Documents
-
view
60 -
download
3
description
Transcript of Procedural Content
PROCEDURAL CONTENTSET09115 Intro to Graphics Programming
Breakdown
What is procedural content? Models Textures
Working with noise Perlin noise Examples
Procedural content
Recommended Reading
Search the inter-webs Real-Time Rendering mentions in passing Course text mentions in passing
What is Procedural Content?
What do we mean by Procedural Content?
Generally, it is considered that artists are the creators of content for games Models, textures, etc.
Programmers generally use content produced by artists within games
The goal of procedural content is to allow a programmer to generate content using some form of algorithm The procedural part
Terrain
We have actually already spoken about procedural content Terrain
Terrain is generated procedurally from a texture The texture can be
created procedurally also
Models
One part of procedural content generation is the generation of models In a way, this is
what Spore does Model creation can
be quite powerful for more tedious content generation
Cities
http://www.youtube.com/watch?v=-d2-PtK4F6Y
Trees
Speed Tree - http://www.youtube.com/watch?v=r18c7QlWLBQ
http://www.youtube.com/watch?v=98HAIwJRxyU
Fractals
Fractals are a common approach to create trees and other natural content
Fractals are considered to be a particular construct that can be broken down, but each part still being a representation of the whole Self-similarity
Noise
Noise is a technique usually used to generate textures Depending on the
noise function, different patterns can appear
Noise functions are often used to generate terrain, or apply roughness to a model
Textures
Another common approach is to generate a texture using an algorithm The texturing practical generates a black
and white check pattern Noise is generally generated into a
texture, and then used
Questions?
Working with Noise
Working with Noise
As mentioned, noise is a very common approach to generating procedural content Graphics cards have a noise function to
generate procedural noise Although considered random, remember
a computer cannot really generate a random number Based on a seed value
Perlin Noise
Developed by Ken Perlin
Perlin noise is used to generate gradient noise There is smooth
transition of heights between pixels
First used in Tron, useful for low memory situations if you use a fixed seed
From Noise to Texture
Once you have noise generated, you can store it in a texture Texture is just a greyscale image
represented by the noise function The texture can now be used for further
content
Texture to Geometry
We have already discussed this idea Take a grid of triangles Manipulate the height of the vertices based
on some value of the texture Colour intensity works well
The new triangle grid to represent a terrain Noise texture can also be used in a more
abstract manner Placement of trees Placement of buildings
Example - Civilization
Example – Sim City
Questions?
Procedural Content
Questions?
To do this week…
I’m not going to produce a practical for this week or next Concentrate on the coursework
I will put the practicals together and post on WebCT over the next few weeks So you can see what to do
I’ve added some new geometry code to WebCT Drawing spheres and torus’ for lighting and
texturing
Summary
Procedural content is fun! There is a lot of interest here Speeds up general development
Really, it’s about working with a particular algorithm to generate the content you want Can be random / noise based Can be more structured
Elite did this