CSE 167: Lecture #15: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Similar documents
CSE 167: Lecture #17: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #16: Procedural Modeling

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

More modelling. Ruth Aylett

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

Fractals & Iterative Function Systems

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 28 November 8, 2012

Outline. Solid models and fractals. Constructive solid geometry. Constructive solid geometry COM3404. Richard Everson

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

12.2 Plants. CS Dept, UK

Solid models and fractals

Fractals and L- Systems

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Total 80

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

o Represent 3D objects in a computer? o Manipulate 3D objects with a computer? o CAD programs o Subdivision surface editors :)

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Midterm Project: L-systems in Practice and Theory

Topics. Recursive tree models. Procedural approach L-systems. Image-based approach. Billboarding

Modeling. Michael Kazhdan ( /657) HB FvDFH Modeling Seashells, Fowler et al. 1992

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #19: Wrapping Up. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Mathematics 350 Section 6.3 Introduction to Fractals

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CSE 167: Introduction to Computer Graphics Lecture #4: Coordinate Systems

Definitions. Modeling. Primitives. Creating a model of an object, usually out of a collection of simpler primitives

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSC 470 Computer Graphics. Fractals

Developmental Systems

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Exercise Max. Points Total 90

CSE 167: Lecture #17: Volume Rendering. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Copyright 2009 Pearson Education, Inc. Chapter 9 Section 7 - Slide 1 AND

Fractals. Fractals. Beautiful designs of infinite structure and complexity Qualities of Fractals:

biologically-inspired computing lecture 7 Informatics luis rocha 2015 biologically Inspired computing INDIANA UNIVERSITY

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Fractals Week 10, Lecture 19

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Constructive Solid Geometry and Procedural Modeling. Stelian Coros

Koch-Like Fractal Images

CSE 167: Introduction to Computer Graphics Lecture #8: Scene Graph. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

Modelling. Ruth Aylett

Computer Science 173 Fall, Project 3: Lindenmayer Systems Due in class on Monday, September 28

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CMSC427 Final Practice v2 Fall 2017

Computer Graphics. Prof. Feng Liu. Fall /21/2016

Fractals in Nature and Mathematics: From Simplicity to Complexity

Session 27: Fractals - Handout

Fractals: a way to represent natural objects

CS324e -Elements of Graphics and Visualization. Fractals and 3D Landscapes

7. Stochastic Fractals

CGT 581 G Procedural Methods Fractals

APPROACH GEOMETRY/IMAGE FOR RENDERING FOREST IN REAL TIME

8 Special Models for Animation. Chapter 8. Special Models for Animation. Department of Computer Science and Engineering 8-1

CS39N The Beauty and Joy of Computing

Fractals and Multi-Layer Coloring Algorithms

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

61A Lecture 7. Monday, September 15

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

GRAMMAR-BASED AUTOMATIC 3D MODEL RECONSTRUCTION FROM TERRESTRIAL LASER SCANNING DATA

Syllabus CS476 COMPUTER GRAPHICS Fall 2009

Fractal Coding. CS 6723 Image Processing Fall 2013

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

A New Vision of Fractal Geometry with Triangulation Algorithm

CREATION OF THE TREE MODEL ADAPTING TO ENVIRONMENT

61A Lecture 7. Monday, September 16

Interactive Tool for Procedural City Generation in Houdini Master Thesis. Soham Ramteke NCCA, Bournemouth University

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Plant synthesis Due: Monday, November 17

Imaginary Gardens A Model for Imitating Plant Growth

Animating Plant Growth in L-System By Parametric Functional Symbols

CHAPTER-3 STUDY OF GRAMMAR TREE USING L-SYSTEM. The central concept of L-systems is that of rewriting. In general, rewriting is a

A method for generating stochastic 3D tree models with Python in Autodesk Maya

Parameters and Objects

University of Massachusetts Lowell : Organization of Programming Languages Spring 2004 Problem Set 4. Henderson Picture Language

EE 4702 GPU Programming

2D Drawing Primitives

CSCD18: Computer Graphics. Instructor: Leonid Sigal

Space Filling: A new algorithm for procedural creation of game assets

Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Adaptive Point Cloud Rendering

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

Fractal Trees. Gandhi Games

A Survey of Procedural Techniques for City Generation

Lahore University of Management Sciences. CS 452 Computer Graphics

Generation of 3D Fractal Images for Mandelbrot and Julia Sets

CS 3270 Mobile Development for Android Syllabus

A Survey of Procedural Techniques for City Generation

Lahore University of Management Sciences. CS 452 Computer Graphics

Transcription:

CSE 167: Introduction to Computer Graphics Lecture #15: Procedural Modeling Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Announcements Monday, Nov 26: Midterm review in Atkinson Hall, room 4004 Wednesday, Nov 28: Last day for late grading of project 6 Thursday, Nov 29: Midterm exam #2 Friday, Nov 30: Final project summary due Thursday, Dec 13: Final project presentations in EBU-3B room 1202, 3-6pm 2

Lecture Overview Procedural Modeling Concepts Algorithms 3

3D Modeling Creating 3D objects/scenes and defining their appearance (texture, etc.) So far we created Triangle meshes Bezier patches Interactive modeling Place vertices, control points manually For realistic scenes, need extremely complex models containing millions or billions of primitives Modeling everything manually is extremely tedious 4

Alternatives Data-driven modeling Scan model geometry from real world examples Use laser scanners or similar devices Use photographs as textures Photograph Rendering Archives of 3D models [Levoy et al.] http://www-graphics.stanford.edu/data/3dscanrep/ http://www.tsi.enst.fr/3dmodels/ Reader for PLY point file format: http://w3.impa.br/~diego/software/rply/ Procedural modeling Construct 3D models and/or textures algorithmically 5

Procedural Modeling Wide variety of techniques for algorithmic model creation Used to create models too complex (or tedious) to build manually Terrain, clouds Plants, ecosystems Buildings, cities [Deussen et al.] Usually defined by a small set of data, or rules, that describes the overall properties of the model Tree defined by branching properties and leaf shapes Model is constructed by an algorithm Often includes randomness to add variety E.g., a single tree pattern can be used to model an entire forest 6

Randomness Use some sort of randomness to make models more interesting, natural, less uniform Pseudorandom number generation algorithms Produce a sequence of (apparently) random numbers based on some initial seed value Pseudorandom sequences are repeatable, as one can always reset the sequence E.g., if a tree is built using pseudorandom numbers, then the entire tree can be rebuilt by resetting the seed value If the seed value is changed, a different sequence of numbers will be generated, resulting in a (slightly) different tree 7

Recursion Repeatedly apply the same operation (set of operations) to an object Generate self-similar objects: fractals Objects which look similar when viewed at different scales For example, the shape of a coastline may appear as a jagged line on a map As we zoom in, we see that there is more and more detail at finer scales We always see a jagged line no matter how close we look at the coastline 8

Lecture Overview Procedural Modeling Concepts Algorithms 9

Height Fields Landscapes are often constructed as height fields Regular grid on the ground plane Store a height value at each point Can store large terrain in memory No need to store all grid coordinates: inherent connectivity Shape terrain by operations that modify the height at each grid point Can generate height from grey scale values Allows using image processing tools to create terrain height Extra credit in Homework Assignment #2 10

Fractals Fractal: Fragmented geometric shape which can be split into parts, each of which is (at least approximately) a smaller size copy of the whole Self-similarity Demo: Mandelbrot Set http://www.scale18.com/canvas2.html From Wikipedia 11

Fractal Landscapes Random midpoint displacement algorithm (one-dimensional) Start with single horizontal line segment. Repeat for sufficiently large number of times { Repeat over each line segment in scene { Find midpoint of line segment. Displace midpoint in Y by random amount. Reduce range for random numbers. } } Similar for triangles, quadrilaterals Step 0 Step 1 Step 2 Step 3 12 Result: Mountain Range Source: http://gameprogrammer.com/fractal.html#midpoint

Fractal Landscapes Add textures, material properties; use nice rendering algorithm Example: Terragen Classic (free software) http://www.planetside.co.uk/terragen/ 13 [http://www.planetside.co.uk/gallery/f/tg09]

L-Systems Developed by biologist Aristid Lindenmayer in 1968 to study growth patterns of algae Defined by grammar V = alphabet, set of symbols that can be replaced (variables) S = set of symbols that remain fixed (constants) ω = string of symbols defining initial state P = production rules Stochastic L-system If there is more than one production rule for a symbol, randomly choose one 14

Turtle Interpretation for L-Systems Origin: functional programming language Logo Dialect of Lisp Designed for education: drove a mechanical turtle as an output device Turtle interpretation of strings State of turtle defined by (x, y, α) for position and heading Turtle moves by step size d and angle increment δ Sample Grammar 15 F: move forward a step of length d New turtle state: (x, y, α) x = x + d cosα y = y + d sin α A line segment between points (x, y) and (x, y ) is drawn. +: Turn left by angle δ. Next state of turtle is (x, y, α+δ) Positive orientation of angles is counterclockwise. : Turn right by angle δ. Next state of turtle is (x, y, α-δ)

Example: Sierpinski Triangle Variables: A, B Draw forward Constants: +, - Turn left, right by 60 degrees Start: A Rules: (A B-A-B), (B A+B+A) 2 iterations 4 iterations 6 iterations 9 iterations 16

Example: Fern Variables: X, F X: no drawing operation F: move forward Constants: +, Turn left, right Start: X Rules: (X F-[[X]+X]+F[+FX]-X),(F FF) [Wikipedia] 17

Fractal Trees Recursive generation of trees in 3D http://web.comhem.se/solgrop/3dtree.htm Model trunk and branches as cylinders Change color from brown to green at certain level of recursion 18 Dragon Curve Tree Sierpinski Tree

Algorithmic Beauty of Plants Book The Algorithmic Beauty of Plants by Przemyslaw Prusinkiewicz and Aristid Lindenmayer, 2004 On-Line at: http://algorithmicbotany.org/papers/#abop [Prusinkiewicz, http://algorithmicbotany.org/papers/positional.sig2001.pdf] 19

Buildings, Cities: CityEngine http://www.esri.com/software/cityengine/ 20

CityEngine: Pipeline Parish, Mueller: Procedural Modeling of Cities, ACM Siggraph 2001 21

Shape Grammar Shape Rules Defines how an existing shape can be transformed Generation Engine Performs the transformations Working Area Displays created geometry 22

Example: Coca-Cola Bottle Evolution of Coca-Cola bottles 23 Division of a Coca-Cola bottle

Shape Computation Example Shape computation for two existing Coca-Cola bottles 24 Source: Chau et al.: Evaluation of a 3D Shape Grammar Implementation, Design Computing and Cognition'04, pp. 357-376

Demonstration: Procedural Buildings Demo fr-041: debris by Farbrausch, 2007 http://www.youtube.com/watch?v=wqu_ipkoybg&hd=1 Single, 177 KB EXE file! http://www.farbrausch.de/ 25