procedural content

26
PROCEDURAL CONTENT SET09115 Intro to Graphics Programming

Upload: kendall-huff

Post on 03-Jan-2016

65 views

Category:

Documents


3 download

DESCRIPTION

Procedural Content. SET09115 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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Procedural Content

PROCEDURAL CONTENTSET09115 Intro to Graphics Programming

Page 2: Procedural Content

Breakdown

What is procedural content? Models Textures

Working with noise Perlin noise Examples

Procedural content

Page 3: Procedural Content

Recommended Reading

Search the inter-webs Real-Time Rendering mentions in passing Course text mentions in passing

Page 4: Procedural Content

What is Procedural Content?

Page 5: 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

Page 6: Procedural Content

Terrain

We have actually already spoken about procedural content Terrain

Terrain is generated procedurally from a texture The texture can be

created procedurally also

Page 7: Procedural Content

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

Page 8: Procedural Content

Cities

http://www.youtube.com/watch?v=-d2-PtK4F6Y

Page 10: Procedural Content

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

Page 11: Procedural Content

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

Page 12: Procedural Content

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

Page 13: Procedural Content

Questions?

Page 14: Procedural Content

Working with Noise

Page 15: Procedural Content

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

Page 16: Procedural Content

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

Page 17: Procedural Content

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

Page 18: Procedural 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

Page 19: Procedural Content

Example - Civilization

Page 20: Procedural Content

Example – Sim City

Page 21: Procedural Content

Questions?

Page 22: Procedural Content

Procedural Content

Page 23: Procedural Content

Procedural Content Wiki

http://pcg.wikidot.com/

Page 24: Procedural Content

Questions?

Page 25: Procedural Content

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

Page 26: Procedural Content

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