Procedural Terrain Generation

Slides:



Advertisements
Similar presentations
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
Advertisements

Random Numbers Dick Steflik. Pseudo Random Numbers In most cases we do not want truly random numbers –most applications need the idea of repeatability.
Professor John Peterson
CS 280 Data Structures Professor John Peterson. Big O Notation We use a mathematical notation called “Big O” to talk about the performance of an algorithm.
A Rainy Day. Indoor Activities What Do You Like to Do after School I like to watch TV I like watching TV after I finished my homework after school at.
Noise and Procedural Techniques John Spitzer Simon Green NVIDIA Corporation.
About Your Brain By Katlynn Combs. What's good for your brain? A. Classical music B. Rock music C. Junk food D. Fruit E. Vegetables.
Piecewise and Step Functions
Create Procedural Textures with Perlin Noises
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 18:Noise Ken Greenebaum.
Multiplying Decimals Type your name and send: Next slide.
Fitting image transformations Prof. Noah Snavely CS1114
Mental Maths LO: To add together coins and notes. Can you add together the coins and notes you see? Type your name and send: Next Slide.
Spring 2008Programming Development Techniques 1 Topic 5.5 Higher Order Procedures (This goes back and picks up section 1.3 and then sections in Chapter.
Primary Longman Elect 3B Chapter 2 Improving writing by using pronouns and linking words.
2.3 Output Formatting. Outputting Format Specify the number of spaces, “c”, used to print an integer value with specifier %cd, e.g., %3d, %4d. E.g. printf.
RANDOM NUMBER GENERATORS MATH CLUB 12/06/2010. WHAT ARE RANDOM NUMBERS? 1, 3, 5, 7, 9, 11, …? 3, 7, 0, 7, 7, 4, 1, 5, 6, 1, 7, 8, 5 …? 44, 22, 16, 33,
Adding Fractions BY MRS. MULLER. Key Vocabulary  Numerator: The top number of the fraction (the amount out of the whole)  Denominator: The bottom number.
Year 5 - Numeracy Title page..
Converting Percents to fractions
CSSE463: Image Recognition Day 26
The Divisibility & Modular Arithmetic: Selected Exercises
The first element of the Traits
PARENT WRITING INFORMATION SESSION
3. Random Number Generator
Linear Equations Sections 10.1 – 10.3.
Top Ten Tips for Screwing-up a Presentation
Piecewise and Step Functions
JavaScript Functions.
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Enough Mathematical Appetizers!
Multiplication Grids Multiplying a 2 digit number by a 1 digit number.
CS005 Introduction to Programming
Algorithm Analysis (not included in any exams!)
Hello, it’s good to see you!
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Solving Linear Systems by Linear Combinations
Random Number Generation
Random vs pseudo random
Value returning Functions
L.O. To identify and share the aspects of identity that have had the most impact n each of us TLN Identity Pack L5.
Coding Concepts (Data Structures)
Multiplication Grids Multiplying a 2 digit number by a 1 digit number.
Applied Discrete Mathematics Week 6: Computation
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Guest Lecture by David Johnston
Counting Discrete Mathematics.
ML – Lecture 3B Deep NN.
CSSE463: Image Recognition Day 26
CSSE463: Image Recognition Day 26
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Relations.
Enough Mathematical Appetizers!
CSSE463: Image Recognition Day 27
Tonga Institute of Higher Education IT 141: Information Systems
CSSE463: Image Recognition Day 26
Chapter 8 - Functions and Functionality
BASEAL Relationships - 3
Tonga Institute of Higher Education IT 141: Information Systems
Enough Mathematical Appetizers!
When we multiply by 10 we are making the number ten times bigger.
CSSE463: Image Recognition Day 26
Fred Five the Ladybird Hello
AM 1.2g To Factor Multiple Quadratics
Improving writing by using pronouns and linking words
Slope intercept form is:
Find equations of lines
The first element of the Traits
Multiplying Decimals Multiply and divide decimals and fractions, using efficient and generalizing procedures, including standard algorithms.
Presentation transcript:

Procedural Terrain Generation Making a world from scratch Venkatraman Srikanth Delta Force

What I am going to talk about? The problem My bad idea The better idea

The Big Problem Given an integer, make a random world ☺

Approaching the Problem What do we have to do? Input – Some integer Output – Some random world/map => each world must be unique to the integer given => a given input always makes the same world => no randomness!

The Answer Pseudo - Randomness! Pseudo - Randomness?

Requirement Given a starting point number (the input integer), generate a lot of random numbers whenever we want

The Real Answer Let’s just take a number, and screw it up really bad and hope people don’t notice

Screw up a number Let’s take a number, and multiply something to it X = A*X

Screw up a number more Now let’s add something to it X = A*X + C

Not random enough? Modulus to the rescue!

Making values not sequential Let’s modulus by 12. Let’s start at 1, and increment by 7.

Making values not sequential Series : 1 8 3 10 5 7 2 9 4 11 Random enough!

The LCG! Linear Congruential Generator

For large values A = 1103515245 C = 12345 M = 231 = 2147483648 This is what C’s rand() uses!

A memorable snippet

The second problem – the world Let’s start with some water. A big 2D grid of water. Water is nice.

The second problem – the world Let’s put some points of land

The second problem – the world Lo! We have land!

Bad idea, bad execution, but it’s something

How to improve? Let’s look at a real world application

What does this look like?

What does this look like?

Behold, Perlin Noise!

Some Applications

Ken Perlin, The Oscars, 1996

But how do we make terrain? A Heightmap!

Sweet! How does it work? Gradients!

A schematic

Computing the Gradient Product

Let’s make better terrain!

Something is missing - detail!

Let’s put them together!

Let’s put them together!

Making it an island - Weight the centre

The End Result :

We did it!

View all the demos and the source code venkatraman.me/proc-map-gen Thanks for being a wonderful audience!