Advanced Computer Graphics: Procedural Modelling

Slides:



Advertisements
Similar presentations
Aberdeen Grammar School
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Procedural Textures Jian Huang, CS594, Fall 2002 This set of slides references slides used at Ohio State and “Texturing and modeling” by Ebert, et. al.
ME 250: Design & Manufacturing I School of Mechanical Engineering
Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
L-systems Presented by Luv Kohli COMP258 October 30, 2002 Images copyright © 1992 D. Fowler, P. Prusinkiewicz, and J. Battjes.
Fractals Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New.
Procedural Modeling L-Systems Procedural Terrain Procedural Behavior Based on the slides from Spring 2007.
Simulating Trees with Fractals and L-Systems Eric M. Upchurch CS 579.
Course Website: Computer Graphics 11: 3D Object Representations – Octrees & Fractals.
16 MULTIPLE INTEGRALS.
CS4395: Computer Graphics 1 Fractals Mohan Sridharan Based on slides created by Edward Angel.
Notes, part 4 Arclength, sequences, and improper integrals.
Approaches To Infinity. Fractals Self Similarity – They appear the same at every scale, no matter how much enlarged.
Guilford County Sci Vis V204.01
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
1 Perception and VR MONT 104S, Spring 2008 Lecture 22 Other Graphics Considerations Review.
4/15/04© University of Wisconsin, CS559 Spring 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Model Construction 김 성 남. Contents What is Modeling? Model Construction - Interactive modeling tools - Scanning tools - Computer vision -
NDVI-based Vegetation Rendering CGIM ‘07 Stefan Roettger, University of Erlangen
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
FRACTALS Dr. Farhana Shaheen Assistant Professor YUC.
The Artificial Life of Plants Przemyslaw Prusinkiewicz, Mark Hammel, Radom´ır Mˇech Department of Computer Science University of Calgary Calgary, Alberta,
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Fractals smooth surfaces and regular shapes - Euclidean-geometry methods -object shapes were described with equations natural objects - have irregular.
Subdivision Schemes Basic idea: Start with something coarse, and refine it into smaller pieces for rendering –We have seen how subdivision may be used.
Multimedia System and Networking UTD Slide- 1 University of Texas at Dallas B. Prabhakaran Rigging.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
INTEGRALS We saw in Section 5.1 that a limit of the form arises when we compute an area. We also saw that it arises when we try to find the distance traveled.
5 INTEGRALS.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Animation 4 Computer & 3D Animation. Computer Assisted Animation  The computer is used to make the animation process quicker and easier.  Usually involves.
CAG – (Auto)CAD Commands
Grammars, L-Systems Jim Whitehead UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/Spring14/01 23 Apr 2014.
Applications and Rendering pipeline
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Model Optimization Wed Nov 16th 2016 Garrett Morrison.
translations, rotations, and reflections
HONR 300/CMSC 491 Computation, Complexity, and Emergence
Binary Notation and Intro to Computer Graphics
Game Design, Development, and Technology
Iterative Mathematics
POLYGON MESH Advance Computer Graphics
Iterative Mathematics
Computer Graphics Lecture 40 Fractals Taqdees A. Siddiqi edu
Copyright © Cengage Learning. All rights reserved.
CSc 8820 Advanced Graphics Algorithms
ATCM 3310 Procedural Animation
CS475 3D Game Development Level Of Detail Nodes (LOD)
Stylized Environmental Rendering
Basic Rendering Techniques
Look at Me Mod 4 Lesson 3 Graphics Module 4- Build a Game.
Computer Graphics.
Importing Files Importing is not the same as capturing.
Introduction to Vectors and Frames
© University of Wisconsin, CS559 Spring 2004
Advanced Computer Graphics: Introduction
Digital Media Dr. Jim Rowan ITEC 2110.
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
APPLICATIONS of FRACTALS
Geometric Objects and Transformations (II)
National 4/5 Graphic Communication
Computer Graphics Lecture 15.
Advanced Computer Graphics: Texture
Last Time B-splines Project 3 was made available
Presentation transcript:

Advanced Computer Graphics: Procedural Modelling Carl Hultquist Department of Computer Science University of Cape Town chultqui@cs.uct.ac.za Advanced Computer GraphicsCollaborative Visual Computing Laboratory

Advanced Computer Graphics Objectives To introduce the field of procedural modelling and what it means for a model to be procedurally generated To examine what techniques have been researched thus far, including the following: Fractals Perlin noise Procedural texturing Cellular texturing Solid texturing L-Systems Subdivision surfaces Urban modelling Special effects 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Motivation Modelling every single object by hand is tedious! An easier alternative is to use a few parameters to “describe” the object and allow the computer to generate the object for the artist (computers are built for doing tedious things) If necessary, the artist can make small modifications afterwards to get the “perfect” object Additionally, procedural methods are extremely compact (no need to store explicit geometry or texture information, only parameters to create these) and can in some cases better represent objects than explicit representations 3/01/2019 Advanced Computer Graphics

Fractals: the Koch Curve Images by Jim Loy (http://www.jimloy.com/fractals/koch.htm) 3/01/2019 Advanced Computer Graphics

Fractals: why they’re important Biggest reason is self-similarity. As seen with the Koch Curve, fractals can contain entire copies of themselves. More generally, fractals are defined to have infinite resolution: so no matter how closely you “zoom in” to the fractal, there will always be an immense amount of detail. In this sense, you could also think of fractals as having various levels of detail. This has implications for modelling: by simply storing the parameters that characterise a fractal, we can iterate and zoom in as much as we need to get a suitable level-of-detail for rendering. 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics 3D Fractals: Mountains Probably the most common use of fractals for procedural modelling of 3D objects Consider the 2D case of a slice through a mountain: As can be seen, we progressively split up the interval over which the mountain is defined, and add random detail. 3/01/2019 Advanced Computer Graphics

3D Fractals: Mountains (2) So with 3D, we instead start with a sub-section of the plane (usually a triangle, square or hexagon), and progressively split up that sub-section into smaller parts Base case 1 step 3 steps 7 steps 3/01/2019 Advanced Computer Graphics

An alternative for creating fractal mountains Notice that at any stage, the mountain is simply described by a regular grid of values, each of which is the height at the given point. Also notice that the mountains are smooth in the sense that there are no irregular discontinuities in their surface. These properties allow us to describe fractal mountains using a different procedural technique: Perlin Noise 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Perlin Noise Invented by Ken Perlin. Key idea is to take a set of noisy functions at different scales, and blend them together. 3/01/2019 Advanced Computer Graphics

Perlin Noise: Creating a Noise Function So how do we create a noisy function? The trick is to take a set of “random” values and interpolate between them. Consider the 2D case below: By interpolating these random values, we obtain a smooth noise function: 3/01/2019 Advanced Computer Graphics

Perlin Noise: Scaling Suppose then we have a 2D noise function noise(x,y), which returns the noise value at the point (x,y). We can scale the noise by defining a new noise function like this: scaled_noise(x,y,freq) = noise(x / freq, y / freq) Higher values of freq will then give much closer views of the noise, thus scaling it. 3/01/2019 Advanced Computer Graphics

Perlin Noise: Applications Fractal mountains Water displacement map (giving the appearance of waves) Simple clouds Procedural texturing Marble textures Wood textures Cellular texturing: extend noise function to 2D. Useful for most texturing applications. Volumetric or solid texturing: extend noise function to 3D. Allows you to “slice” a geometric object arbitrarily and still texture it realistically. 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Lindenmayer-Systems Invented by Aristid Lindenmayer More commonly referred to as L-Systems In essence, L-Systems are a parallel string rewriting mechanism, defined by an initial string and a set of productions (or rules) to iteratively rewrite the string. A simple example: ω : A ρ0 : A → xB ρ1 : B → yA 3/01/2019 Advanced Computer Graphics

L-Systems: basic form As has been shown, an L-System consists of an initial string (typically called ω) and a set of productions (usually called ρx for increasing integers x) Formally, the initial string in a simple L-System is simply a sequence of symbols, and each production has the following format: ρx : pattern → replacement where pattern is a single symbol, and replacement is a sequence of symbols. For each iteration of the L-System, every occurrence of pattern in the string is replaced by replacement, and this is done in parallel over the whole string. 3/01/2019 Advanced Computer Graphics

L-Systems & Parallel Rewriting (1) Consider this L-System: ω : AB ρ0 : A → xB ρ1 : B → yA Parallel rewriting means that during the first iteration, we simultaneously change the A to xB and the B to yA, resulting in the string xByA. A second iteration would then yield xyAyxB. 3/01/2019 Advanced Computer Graphics

L-Systems & Parallel Rewriting (2) There’s one more catch though: What happens if more than one production could be applied to a single symbol in the string? ω : A ρ0 : A → xB ρ1 : B → yA ρ2 : A → zB It may seem silly for now (why would someone write a system like this?) but it’s important to deal with for simple cases like this L-System. The answer is that the first matching production is used, so in this case the first iteration would result in the string xB, and not zB. 3/01/2019 Advanced Computer Graphics

L-Systems and Context (1) In the previous example, we had an L-System which has two rules for rewriting a symbol. This may be very necessary: sometimes we might want to use one production, but at other times we would want to use the other production. How can we distinguish between these? The answer is to add a notion of context to the L-System. This lets us examine the symbols before and after the one we’re currently rewriting, and base our rewriting decision on these symbols. Each production in a context-sensitive L-System has the following form: ρx : left-context < pattern > right-context → replacement and either or both of the “left-context < ” and “> right-context” parts may be omitted. 3/01/2019 Advanced Computer Graphics

L-Systems and Context (2) ω : xA ρ0 : A > y → Bx ρ1 : B → A ρ2 : x < A → By Here are the strings that emerge from iterations of this L-System: xA xBy xAy xBxy xAxy xByxy … 3/01/2019 Advanced Computer Graphics

L-Systems: how is the resulting string used? So you end up with some string of symbols: then what? The usual course of action is to interpret the string as a set of drawing commands, in a similar fashion to Logo. For this reason, this is often referred to as turtle interpretation. Some common symbols used for 2D drawing are: F - Move forward length d while drawing f - Move forward length d without drawing + - Turn left by angle δ - - Turn right by angle δ 3/01/2019 Advanced Computer Graphics

L-Systems: Turtle Interpretation (1) ω : F-F-F-F ρ0 : F → FF-F-F-F-F-F+F δ = 90°, 4 iterations 3/01/2019 Advanced Computer Graphics

L-Systems: Turtle Interpretation (2) ω : RF ρ0 : L → RF+LF+R ρ1 : R → LF-RF-L δ = 60°, 6 iterations 3/01/2019 Advanced Computer Graphics

L-Systems: more extensions! In previous examples, all turning and movement commands used the same angle and the same distance (respectively). Would be nice to be able to adjust these values: the result is a parametric L-System. Each symbol can have an associated bracketed list of values, like this: ω : A(2) ρ0 : A → B(2.4, 3) x ρ1 : B → y A(1.2, 2.2, 4) 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Parametric L-Systems You can then formulate more complex productions, like this example: ω : x F ρ0 : x < F → y F +(30) x F ρ1 : +(x) → +(x - 2) ρ2 : y < F → F F 3/01/2019 Advanced Computer Graphics

L-Systems: Conditions and Branching In addition to allowing symbols to bear parameters, parametric L-Systems also allow for conditions to be placed on productions. ρ1 : +(x) : x > 20 → +(x - 2) For example, the above production will only occur if the parameter x has value greater than 20. Branching is another useful technique used by most turtle interpretation systems: the symbol [ is used to push the turtle’s state onto a stack, and the symbol ] is used to pop the turtle’s state off the stack. 3/01/2019 Advanced Computer Graphics

L-Systems: what about 3D? 2D turtle examples are all well and good, but lots of computer graphics applications require 3D! How do L-Systems help here? Extend the turtle interpretations to include rotation about three axes (the up, left and heading axes). This allows us to rotate in 3D space. 3/01/2019 Advanced Computer Graphics

L-Systems: Applications Parametric, context-sensitive L-Systems with branching are most typically used for modelling plants and flowers. Some more recent applications have been to model road networks. 3/01/2019 Advanced Computer Graphics

Subdivision Surfaces (1) Some objects are incredibly geometrically complex, and may require extraordinary amounts of storage space. Such a problem is exacerbated when the geometry needs to be transferred to another user, since the transfer of all this data may not be practical. Subdivision surfaces allow for some geometrically complex objects to be represented using a much simpler control mesh. The actual object can then be reconstructed through the process of subdivision, whereby the vertices in the control mesh are used to generate new vertices. (See, for example, Subdivision Surfaces in Character Animation, by Tony DeRose, Michael Kass and Tien Truong). 3/01/2019 Advanced Computer Graphics

Subdivision surfaces (2) Positives: Only a simple mesh is stored Can subdivide to any arbitrary level of detail: quick and easy way of allow support for multiple LODs without the need of a decimation algorithm (see Hugues Hoppe’s paper on Progressive Meshes for an example of such a decimation scheme) Negatives: Not all complex objects can be represented like this Can be difficult to work out what control mesh will result in the final object we’re trying to model 3/01/2019 Advanced Computer Graphics

Procedural Modelling of Cities (1) Paper by Yoav Parish and Pascal Müller for SIGGRAPH 2001. Describes a composite procedural modelling system for generating an entire city. Makes use of the following techniques: L-Systems: a variant of L-Systems is used that allows for what are called query modules, which are used to query the environment and receive feedback from the environment before a production is executed. These create the road network for the city. Subdivision: regions of land bounded by roads are subdivided into allotments, each of which will potentially contain a building. 3/01/2019 Advanced Computer Graphics

Procedural Modelling of Cities (2) L-Systems: a variant known as parametric, stochastic L-Systems are used to generate buildings. The basic idea is that symbols in the L-System are interpreted as a type of sculpting command, eroding away from a solid block and resulting in a shape resembling a building. Procedural texturing: a technique which the authors call layered grids is used to generate a 2D texture for use on the buildings. The idea is to use multiple semi-random layers and have these layers interact in a number of semi-random ways to generate the final building façade. 3/01/2019 Advanced Computer Graphics

Procedural Modelling of Cities (3) 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Special effects Many SFX can be considered “procedural” in the sense that there is some computational procedure which creates the effect, as opposed to the effect either being captured from raw footage or painstakingly created by an artist. Examples of such effects include: Morphing and warping Physics engines Animation of characters Smooth camera movement A good example of software that is widely used to accomplish such effects is Houdini by Side Effects Software (http://www.sidefx.com). 3/01/2019 Advanced Computer Graphics

Uses of Procedural Modelling Games: most recent and most notable is kkrieger, which is an FPS in 96 Kb! (complete with sound effects, music, and good graphics) Movies: Primarily used for SFX, but can also be used for generating large virtual environments (VEs). Good examples include The Matrix trilogy, Final Fantasy, anything by Pixar, The Day After Tomorrow, The Lord of the Rings… the list goes on! General VE design: for designing large and complex VE’s, procedural modelling can save time by doing lots of the work for you. The trick is in developing a good interface to harness its full power… (see http://people.cs.uct.ac.za/~chultqui/masters!) 3/01/2019 Advanced Computer Graphics

Advanced Computer Graphics Example: kkrieger Any questions? 3/01/2019 Advanced Computer Graphics