CS 352: Computer Graphics. Hierarchical Graphics, Modeling, And Animation

Similar documents
MODELING AND HIERARCHY

Spatial Data Structures

Spatial Data Structures

Spatial Data Structures

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Advanced 3D-Data Structures

Computer Graphics. Bing-Yu Chen National Taiwan University

Second degree equations - quadratics. nonparametric: x 2 + y 2 + z 2 = r 2

Spatial Data Structures

Spatial Data Structures

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Speeding up your game

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Physically-Based Modeling and Animation. University of Missouri at Columbia

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

CHAPTER 1 Graphics Systems and Models 3

Image Morphing. The user is responsible for defining correspondences between features Very popular technique. since Michael Jackson s clips

Ray Tracing Acceleration. CS 4620 Lecture 20

Reading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional:

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

9. Three Dimensional Object Representations

3D Modeling techniques

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

3D Modeling: Solid Models

COMP 175: Computer Graphics April 11, 2018

9. Visible-Surface Detection Methods

Animation & Rendering

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

Computer Graphics I Lecture 11

Solid Modeling. Ron Goldman Department of Computer Science Rice University

CEng 477 Introduction to Computer Graphics Fall 2007

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Lecture notes: Object modeling

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Hidden surface removal. Computer Graphics

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Images from 3D Creative Magazine. 3D Modelling Systems

Modeling. Anuj Agrawal Dan Bibyk Joe Pompeani Hans Winterhalter

CS559: Computer Graphics. Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008

Hidden Surface Elimination: BSP trees

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Implicit Surfaces & Solid Representations COS 426

Hierarchical Modeling and scene graphs

More Hidden Surface Removal

CS354 Computer Graphics Character Animation and Skinning

Binary Space Partition Trees. Overview. Binary Space Partitioning Trees (Fuchs, Kedem and Naylor `80)

Ray Tracing Acceleration Data Structures

Sculpting 3D Models. Glossary

Intersection Acceleration

Introduction to 2D and 3D Computer Graphics. Realistic Rendering. -- Solids Modeling --

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CS 465 Program 4: Modeller

Spatial Data Structures and Acceleration Algorithms

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

VIII. Visibility algorithms (II)

Topics and things to know about them:

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

CS535 Fall Department of Computer Science Purdue University

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Modeling Technology Group

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

Collision Detection based on Spatial Partitioning

Spatial Data Structures for Computer Graphics

Visible Surface Detection Methods

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Universiteit Leiden Computer Science

Some Thoughts on Visibility

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Surface and Solid Geometry. 3D Polygons

Overview of 3D Object Representations

Advanced Graphics and Animation

Visibility and Occlusion Culling

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Overview of 3D Object Representations

animation projects in digital art animation 2009 fabio pellacini 1

Lecture 11: Ray tracing (cont.)

Polygon Meshes and Implicit Surfaces

Polygon Meshes and Implicit Surfaces

Pipeline Operations. CS 4620 Lecture 10

Ray Tracing: Intersection

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

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Computergrafik. Matthias Zwicker. Herbst 2010

COMPUTER AIDED ARCHITECTURAL GRAPHICS FFD 201/Fall 2013 HAND OUT 1 : INTRODUCTION TO 3D

Course Review. Computer Animation and Visualisation. Taku Komura

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

3D Modeling I. CG08b Lior Shapira Lecture 8. Based on: Thomas Funkhouser,Princeton University. Thomas Funkhouser 2000

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Level of Details in Computer Rendering

Visible Surface Detection. (Chapt. 15 in FVD, Chapt. 13 in Hearn & Baker)

Transcription:

CS 352: Computer Graphics Hierarchical Graphics, Modeling, And Animation

Chapter 9-2 Overview Modeling Animation Data structures for interactive graphics CSG-tree BSP-tree Quadtrees and Octrees Visibility precomputation Many figures and examples in this set of lectures are from The Art of 3D Computer Animation and Imaging, by I. Kerlow

Chapter 9-3 Modeling The modeling problem Modeling primitives Polygon Sphere, ellipsoid, torus, superquadric NURBS, surfaces of revolutions, smoothed polygons Particles Skin & bones Approaches to modeling complex shapes Tools such as extrude, revolve, loft, split, stitch, blend Constructive solid geometry (CSG) Hierarchy; kinematic joints Inverse kinematics Keyframes

Chapter 9-4 Representing objects Objects represented as symbols Defined in model coordinates; transformed into world coordinates (M = TRS) glmatrixmode(gl_modelview); glloadidentity(); gltranslatef( ); glrotatef( ); glscalef( ); glutsolidcylinder( );

Chapter 9-5 Primitives The basic sort of primitive is the polygon Number of polygons: tradeoff between render time and model accuracy

Chapter 9-6

Chapter 9-7 Spline Curves Linear spline Cardinal spline B-spline Bezier curve NURBS (nonuniform rational b-spline)

Chapter 9-8 Mesh

Chapter 9-9 Mesh deformations

Chapter 9-10 Sweep Sweep a shape over a path to form a generalized cylinder

Chapter 9-11 Revolution Revolve a shape around an axis to create an object with rotational symmetry

Chapter 9-12 Extrusion Extrude: grow a 2D shape in the third dimension Shape is created with a (1D) b-spline curves Hole was created by subtracting a cylinder

Chapter 9-13

Chapter 9-14 Joining Primitives Stitching, blending

Chapter 9-15 Modifying Primitives

Chapter 9-16 Subdivision Surfaces Can set level of polygon subdivision

Chapter 9-17

Chapter 9-18

Chapter 9-19

Chapter 9-20 Skin and Bones Skeleton with joined bones Can add skin on top of bones Automatic or hand-tuned skinning

Chapter 9-21

Chapter 9-22 Particles

Chapter 9-23 Algorithmic Primitives Algorithms for trees, mountains, grass, fur, lightning, fire,

Chapter 9-24

Chapter 9-25 Geometric model file formats.obj: Alias Wavefront.dxf: Autocad.vrml: Inventor Dozens more Can convert between formats Converting to a common format may lose info

Chapter 9-26 Hierarchical models When animation is desired, objects may have parts that move with respect to each other Object represented as hierarchy Often there are joints with motion constraints E.g. represent wheels of car as sub-objects with rotational motion (car moves 2 pi r per rotation)

Chapter 9-27

Chapter 9-28 DAG models Could use tree to represent object Actually, a DAG (directed acyclic graph) is better: can re-use objects Note that each arrow needs a separate modeling transform In object-oriented graphics, also need motion constraints with each arrow

Chapter 9-29 Example: Robot Traverse DAG using DFS (or BFS) Push and pop matrices along the way (e.g. left-child right-sibling) (joint position parameters?)

Chapter 9-30

Chapter 9-31 Modeling Programs Moray Shareware Limited functionality Easy Lightwave, Maya NOT shareware Very full-featured Difficult to learn and use Moray, Maya demos; Lightwave video

Chapter 9-32 Animation Suppose you want the robot to pick up a can of oil to drink. How? You could set the joint positions at each moment in the animation (kinematics)

Chapter 9-33 Inverse Kinematics You can t just invert the joint transformations Joint settings aren t even necessarily unique for a hand position! Inverse kinematics: figure out from the hand position where the joints should be set.

Chapter 9-34 Using Inverse Kinematics Specify joint constraints and priorities Move end effector (or object pose) Let the system figure out joint positions [IK demo]

Chapter 9-35 Keyframe Animation In traditional key frame animation the animator draws several important frames, and helpers do the inbetweening or tweening Computer animation is also key-frame based At key frames, animator positions objects and lights, sets parameters, etc. The system interpolates parameter values linearly or along a curve To get from one object pose to the next, inverse kinematics determine joint motions [Keyframe animation demo]

Chapter 9-36 Motion Capture More realistic motion sequences can be generated by Motion Capture Attach joint position indicators to real actors Record live action

Chapter 9-37

Chapter 9-38 Morphing Morphing: smoothly shifting from one image to another First popularized in a Michael Jackson video Method: a combination of Warping both images, gradually moving control points from location in first image to location in the second Cross-fading from first image sequence to second

Chapter 9-39 3D Morphing Define 3D before and after shapes as e.g. NURBS surfaces with same number of control points Gradually move control points from first setting to second Specify key poses: e.g. smile, frown, 12 frames of walking motion

Chapter 9-40 Combined approaches

Chapter 9-41 Example: virtual puppetry Suppose you want to display virtual puppet shows How could you animate puppet movements? How could you control the animations externally?

Chapter 9-42 Character Animation To make computer graphics (or cartoon drawings) come alive

Chapter 9-43 Personality through Pose, Expression, Motion, Timing

Chapter 9-44

Chapter 9-45 Object-oriented Graphics Higher in the programming hierarchy: control models with object-oriented programs robot robbie; robbie.smile(); robbie.walk(270, 5, 3);

Chapter 9-46 Data Structures for Modeling This part of chapter: how some example applications be done efficiently (i.e. topics without a better home ) Tree-based subdivisions of space Example 1: how to represent complex objects made up of union, intersection, difference of other objects

Chapter 9-47 CSG Tree

Chapter 9-48 Application 2: HSR How to render in 3D with hidden surface removal when you don t have a hardware depth-buffer? Can you think of any other ways of removing hidden surfaces quickly? Principle: a polygon can t be occluded by another polygon that is behind it.

Chapter 9-49 BSP-tree The painter s algorithm for hidden surface removal works by drawing all faces, from back to front How to get a listing of the faces in back-tofront order? Put them into a binary tree and traverse the tree (but in what order?)

Chapter 9-50 BSP Tree Figures Right is front of polygon; left is back In and Out nodes show regions of space inside or outside the object (Or, just store split pieces of polygons at leaves)

Chapter 9-51 Traversing a BSP tree Binary Space Partition tree: a binary tree with a polygon at each node Children in left subtree are behind polygon Children in right subtree are in front of polygon Traversing a BSP-tree: If null pointer, do nothing Else, draw far subtree, then polygon at current node, then near subtree Far and near are determined by location of viewer Runtime of traversal? Drawbacks?

Chapter 9-52 Building a BSP tree Inserting a polygon: If tree is empty make it the root If polygon to be inserted intersects plane of polygon of current node, split and insert half on each side recursively. Else insert on appropriate side recursively Problem: the number of faces could grow dramatically Worst case (O(n 2 )) but usually it doesn t grow too badly in practice

Chapter 9-53 BSP-tree Summary Returns polygons not necessarily in sorted order, but in an order that is correct for back-to-front rendering Widely used when Z-buffer hardware may not be available (e.g. game engines) Guarantees back-to-front rendering for alpha blending Works well (linear-time traversals) in the number of split polygons [And we hope the number of polygons doesn t grow too much through splitting]

Chapter 9-54 Application 3: Handling Large Spatial Data Sets Example application: image-based rendering Suppose you have many digital images of a scene, with depth information for pixels How to find efficiently the points that are in front? Other applications: Speeding up ray-tracing with many objects Rendering contours of 3D volumetric data such as MRI scans

Chapter 9-55 Quadtree Quadtree: divide space into four quadrants. Mark as Empty, Full, or Partially full. Recursively subdivide partially full regions Saves much time, space over 2D pixel data!

Chapter 9-56 Quadtree Structure

Chapter 9-57 Octrees Generalize to cutting up a cube into 8 subcubes, each of which may be E, F, or P (and subdivided) Much more efficient than a 3D array of cells for 3D volumetric data

Chapter 9-58 Quadtree Algorithms How would you render a quadtree shape? find the intersection of a ray with a quadtree shape? Take the union of two quadtrees? Intersection? Find the neighbors of a cell?

Chapter 9-59 Applications of Octrees Contour finding in MRI data 3D scanning and rendering Efficient ray tracing Intersection, collision testing

Chapter 9-60 Research in Visibility Can we figure out in advance what will be visible from each viewpoint?

Chapter 9-61 Viewer-centered representation Viewer-centered object representations: representation not of volume of space filled but appearance from all viewpoints

Chapter 9-62 Occlusion in view space Occlusion in view space is subtraction

Chapter 9-63 Events Events: boundaries in viewpoint space where faces appear or disappear

Chapter 9-64 Aspect Graph Aspect graph: a graph with a node for every topologically distinct view of an object, with edges connecting adjacent views

Chapter 9-65 Aspect graph varieties Aspect graphs can be constructed for 3D: space 2D: multiple axis rotations or planar motions 1D: single-axis rotations

Chapter 9-66 1D Aspect Graph for Rotation

Chapter 9-67 1D Aspect Graph Results Useful for rotations without Z-buffer hardware! Not so useful for more viewer freedom, modern graphics hardware

Chapter 9-68 Conservative Visibility Preprocessing Q. can we take advantage of z-buffer? Definition: weak visibility. A polygon is weakly visible from a region if any part of the polygon is visible from any viewpoint in the region Conservative visibility preprocessing: computing in advance a (super-)set of the polygons that are weakly visible from some region Rendering with Z-buffer yields correct image, but it s faster since fewer polygons are drawn

Chapter 9-69 Weak Visibility Subdivision Given an object and a wall, find the region of space from which the wall occludes the object Divide space into regions, where each edge represents some object appearing or disappearing

Chapter 9-70 Conservative Visibility Preprocessing on a Grid Divide viewing space into a 3D (or 2D) grid Compute a conservative display list for each cell

Chapter 9-71 Conservative visibility algorithm Initialize a display list for each grid cell Algorithm: for each object, wall, and cell If the object is not weakly visible from the cell, remove from cell s display list You can churn away at this computation as long as you like, increasing runtimes, but you can stop at any time with usable results. (Results improve over time!)

Chapter 9-72 Perspective What good did this visibility research do for the world? It wasn t enough for me I left graphics research and went into digital libraries Left University of Pittsburgh and went to Wheaton College

Chapter 9-73 Summary 3D modeling uses advanced primitives and ways of cutting, joining them Inverse kinematics determines joint position from end effector motions Keyframe animation involves important poses and inbetweening 3D morphing animates surface control points 3D spatial subdivision trees include CSGtrees, BSP-trees, Quadtrees, and Octrees Visibility preprocessing speeds walkthrough