Procedural Terrain with Stochastic Trees. WITH MAX MORRIS, CORY GAGEL, MARK WOULFE.

Slides:



Advertisements
Similar presentations
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Advertisements

Solids in contact..
This terms course Last term we both worked on learning 2 things –Processing –The concepts of graphics etc. This term will focus more on the basic concepts.
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
QUICK MATH REVIEW & TIPS 2
AIR NAVIGATION Part 3 The 1 in 60 rule.
GG450 April 22, 2008 Seismic Processing.
4.11. T REES AND V EGETATION Rendering of trees and vegetation.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
Twelve painting with procedures. Overview Making shaded images with procedures Making a more elegant language Making textures with noise functions.
Cassidy Fischer Block B Gr. 9 5/6/2015
The World’s Largest Ferris Wheel
CAD Modelling/Drawing. 3D CAD Modelling types - Wireframe  These types of drawings only show the structure of the object drawn.  No other details are.
Pyramid Construction Pyramids Square Rectangle Hex Cone.
Simple Random Sampling
Advanced Texturing Methods Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 8, 2003.
Procedural terrain on the GPU Chalmers University of Technology Advanced computer graphics – DAT205 David Sundelius Adam Scott.
COMP 175: Computer Graphics March 24, 2015
Section 3 Calculations National 4/5 Scratch Course.
NDVI-based Vegetation Rendering CGIM ‘07 Stefan Roettger, University of Erlangen
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
Functions Functions. A function is a rule that relates two quantities so that each input value corresponds to exactly one output value. Define-
CS 101: “If” and Recursion Abhiram Ranade. This week’ lab assignment: Write a program that takes as input an integer n and a sequence of numbers w1,w2,...,wn.
Isometric Drawing - Trammel Method
Java Classes Methods Objects. Classes Classes We have been using classes ever since we started programming in Java Whenever we use the keyword class.
Image Synthesis Rabie A. Ramadan, PhD D Images.
Multiplying decimals. What is the answer to 0.26 x 0.6? In order to work this out you must be able to multiply the whole numbers together In fact do just.
INTRODUCING WHAT IS IT ? SEE SOME EXAMPLES HOW DO YOU DO IT ?
SOLIDWORKS: Lesson II – Revolutions, Fillets, & Chamfers UCF Engineering.
Introduction This chapter focuses on Parametric equations Parametric equations split a ‘Cartesian’ equation into an x and y ‘component’ They are used.
Scalar Quantities Scalar quantities are measurements that have only magnitude (size) but no direction. Examples of scalar quantities are; Distance Speed.
ME451:Kinematics and Dynamics of Machine Systems (Spring 09)
11 Working with Images Session Session Overview  Find out more about image manipulation and scaling when drawing using XNA  Start to implement.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
01/11/20151 All of the ship would remain visible as apparent size diminishes. Whereas on a flat Earth.
CSE 381 – Advanced Game Programming GLSL Lighting.
A to Z Math Project BY: AUSTIN WAHL. A is for Algebra Tiles  Algebra Tiles are used to represent variables and constants. Also The tiles help you visualize.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
The Cut Cone. The given views show the Front Elevation and part Plan of a cut cone. Draw the following views :- Complete Plan End Elevation Development.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
Create Procedural Textures with Perlin Noises
Dividing Fractions. A. Review  Examples of fractions.
Graphic Communication
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 3 Transformations. 2D Object Transformations The functions used for modifying the size, location, and orientation of objects or of the camera.
Representation and modelling 3 – landscape specialisations 4.1 Introduction 4.2 Simple height field landscapes 4.3 Procedural modeling of landscapes- fractals.
General Exam Tips Think Read the question carefully and try to understand the scenario, then think about the Maths you will need to do. Is it perimeter,
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
Parabolas.
ADAMS Assignment 6 ME451:Kinematics and Dynamics of Machine Systems (Fall 2013) Assigned: November 13, 2013 Due: November 20, 2013.
Speed Tree Let’s Make a Forest Copyright © 2015 – Curt Hill.
Design and technology st aidan’s high A pictorial sketch of a wall lamp is shown. The shade is in the form of a cut cone. Draw, from the given.
Factoring Factors Factors - Whole numbers that are multiplied to find a product are called factors of that product. A number is divisible by its factors.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
PROGRAMMING INFORMATION. PROCEDURES IN PYTHON Procedures can make code shorter, simpler, and easier to write. If you wanted, for example, to use a certain.
Making Waves… Light Waves. What do we Know? What things do you know about “Light” all ready? What can you tell me about the properties of light?
Identifying Quadratic Functions. The function y = x 2 is shown in the graph. Notice that the graph is not linear. This function is a quadratic function.
AS Decision Maths Tips for each Topic. Kruskal and Prim What examiner’s are looking for A table of values in the order that they are added and the total.
Processing Images and Video for An Impressionist Effect Automatic production of “painterly” animations from video clips. Extending existing algorithms.
Some Maths David Meredith Aalborg University.
Game Design, Development, and Technology
Aaron Camm, Jeff Huggins, Steve Moskal, Patrick Cardwell
Descriptive Analysis and Presentation of Bivariate Data
Kinematics Vectors and Motion
Mrs. Dhillon’s Classroom An Introduction to Multiplication Algorithms
Chapter 3.2 – Drawing Vectors
Division Grids.
Chapter 3.2 – Adding Vectors
Presentation transcript:

Procedural Terrain with Stochastic Trees. WITH MAX MORRIS, CORY GAGEL, MARK WOULFE

The Finished Product

Overview  Problem: Create a procedural terrain using perlin noise, with stochastic trees with leaves.  Task 1: Use perlin noise to generate a terrain.  Task 2: Figure out where to place the trees.  Task 3: Create the stochastic trees.  Task 4: Populate trees with leaves.

Task Division  Max: Tasked with using perlin noise to generate terrain, and figuring out where the trees are supposed to go in the world.  Cory: Tasked with creating the stochastic trees and initial leaf generation.  Mark: Tasked with populating the trees with leaves, and helping with the initial perlin noise theory research.

Summary of Perlin Noise  The whole theory of Perlin Noise is based around being able to send off a variable or set of variables and getting the same results every time.  A very common way of generating terrain.  Easily customisable with Frequency (length of the wave) and Amplitude (height of the wave) values.

How we implement it  We set up our voxel world as a 256x256 grid.  We loop through all our X and Z co-ordinates and send the co-ordinates to the noise to generate the noise value.  We get the noise value of each corner of the current voxel.  This noise however is not very smooth, so we take the current neighbour and get its neighbours we then average the values together to smooth out the values.  We then interpolate these values to calculate a height which is then returned to create how high we need to build the current X,Y co-ordinate.  Its then a simple case of building voxels from the ground up to the height value returned between  The trees are then placed randomly in the world on top of grass blocks.

The finished terrain

Stochastic Tree Generation  Once the terrain is generated, we determine at random if an X/Y coordinate should have a tree.  If a tree is to be added, the main program uses the tree generator class to add a tree.  The tree generator takes the coordinates where the tree is to be placed and the type of tree desired to generate the vertices for the tree.  Each branch is a formed cone with a bark texture.  The tree generator class will hold the vertices, texture coordinates, and normals of all the trees requested by the main program.  Once all the trees are added, the main program asks the tree generator to prepare the trees by placing all the data into buffers.

What did it take to make that?  The Lindenmeyer system built during the first maths assignment was enhanced.  A stochastic tree system is read into the tree generator class.  Using constrained random angles and a constrained random iteration, the tree is built from the ground up.  Each section of the branch is subdivided into quads.  The height of the branch will determine how many quads will be generated per branch.  We defined the number of quads per height section which allowed us control over how smooth the branches are around.

How we added trees to terrain  Once the tree information is buffered, the main program simply calls the tree generator render function to draw all the trees in one draw call.

Leaf Generation  First we go through every tree that has been generated by the tree generator and decide what textures should be used if any. (Alive = green textures, dying = brown textures, dead = no leaf textures.)  From the tree generator we pass in the size and position of each branch along with the number of quads we want to use for the leafs.  Depending on the number of quads we take that value, multiply it by 2 and then divide that value from 360 to determine what rotation they should use when being placed.  Leafs are then translated to the end of the branch (based on base position, orientation and length of branch all passed by the tree generator)  The texture used comes from a random call between 0-2 for the relative tree type. Leaf Textures Top down view of leaf quads

Leaf Placement  We do some additional checks before actually placing our leaves depending on the height and size of the branch.  If the branch size is less than 1 (a tiny branch barely see able with the human eye) then we ignore that branch and don’t draw leaves on it.  If the branch does not start at least halfway up the tree then no leaves are drawn (leads to more realistic trees.) This is done by having a constant check for each branch to determine the longest branch which is always the main trunk of the tree.  When drawing the leaves we scale them to the size of the branch (20 / size of the branch) and also insure that it is of a minimum height as to not draw tiny leaves. Tree following rules defined Tree without rules defined

Demonstration