Transformation Hierarchies. CS 4620 Lecture 5

Similar documents
Scene Graphs. COMP 575/770 Fall 2010

Scene Graphs. CS4620/5620: Lecture 7. Announcements. HW 1 out. PA 1 will be out on Wed

2D/3D Geometric Transformations and Scene Graphs

Modeling Objects. Modeling. Symbol-Instance Table. Instance Transformation. Each appearance of the object in the model is an instance

CS 465 Program 4: Modeller

Pipeline Operations. CS 4620 Lecture 14

Ray Tracing Acceleration. CS 4620 Lecture 20

Lecture 08: Hierarchical Modeling with Scene Graphs

Graphics Pipeline 2D Geometric Transformations

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

2D Spline Curves. CS 4620 Lecture 18

Pipeline Operations. CS 4620 Lecture 10

Ray Tracing Acceleration. CS 4620 Lecture 22

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Geometry Regents Lomac Date 3/17 due 3/18 3D: Area and Dissection 9.1R. A point has no measure because a point represents a

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

CS 6143 COMPUTER ARCHITECTURE II SPRING 2014

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

Drawing in 3D (viewing, projection, and the rest of the pipeline)

3D Viewing. CS 4620 Lecture 8

Drawing in 3D (viewing, projection, and the rest of the pipeline)

2D Spline Curves. CS 4620 Lecture 13

Culling. Computer Graphics CSE 167 Lecture 12

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

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

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

Hierarchical Models Week 9, Lecture 19

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Data Structures and Organization (p.5 Recursion. Binary Trees)

Three-Dimensional Shapes

Geometric Transformations

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

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

MODELING AND HIERARCHY

CS24 Week 8 Lecture 1

DO NOW Geometry Regents Lomac Date. due. 3D: Area, Dissection, and Cavalieri

Hierarchical Modeling and Scene Graphs

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

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

CS4620/5620: Lecture 14 Pipeline

Hierarchical Modeling and scene graphs

CS 614 COMPUTER ARCHITECTURE II FALL 2005

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

CHAPTER 1 Graphics Systems and Models 3

An undirected graph is a tree if and only of there is a unique simple path between any 2 of its vertices.

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

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

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

COMP 175 COMPUTER GRAPHICS. Lecture 07: Scene Graph. COMP 175: Computer Graphics March 10, Remco Chang 07 Scene Graph

Computer Graphics Fundamentals. Jon Macey

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

Hierarchical Modeling. CS 432 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

we now have a good understanding of 3d representations, rigid body transforms, camera projections, and the fixed function steps in graphics

CS354 Computer Graphics Character Animation and Skinning

Module 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.

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

2D Drawing Primitives

Textures and normals in ray tracing

Previously... contour or image rendering in 2D

Accelerating Ray-Tracing

Chapter 5 - The Scene Graph

Graphics Hardware and Display Devices

Tree traversals and binary trees

User Interaction. User Interaction. Input devices. Input devices. Input devices GUIs and GUI design Event-driven programming 3D interaction

Affine Transformations. Transforming shape models Combining affine transformations Scene graphs, interactor trees Hit tests on transformed shapes

BST Implementation. Data Structures. Lecture 4 Binary search trees (BST) Dr. Mahmoud Attia Sakr University of Ain Shams

Modeling the Virtual World

Ray Tracer I: Ray Casting Due date: 12:00pm December 3, 2001

Computer Graphics (CS 543) Lecture 6a: Hierarchical 3D Models. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

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

CISC 1600 Lecture 3.1 Introduction to Processing

Hierarchical Modeling and Scene Graphs

We can use square dot paper to draw each view (top, front, and sides) of the three dimensional objects:

Transformations. Rotation and Scaling

Lessons from Scene Graphs: Using Scene Graphs to Teach Hierarchical Modeling

Introducing Autodesk Maya Chapter 2: Jumping in Headfirst, with Both Feet!

Nets and Drawings for Visualizing Geometry. Unit 1 Lesson 1

Java2D/Java3D Graphics

HIERARCHICAL TRANSFORMATIONS A Practical Introduction

Rendering & Project Management. Dillon Courts Sandy Natarajan Spencer Balogh Do Young Park

6.837 Computer Graphics Hierarchical Modeling Wojciech Matusik, MIT EECS Some slides from BarbCutler & Jaakko Lehtinen

Think of drawing/diagramming editors. ECE450 Software Engineering II. The problem. The Composite pattern

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

From Art to Engine with Model I/O

Computer Science 474 Spring 2010 Viewing Transformation

Queen s University CISC 454 Final Exam. April 19, :00pm Duration: 3 hours. One two sided aid sheet allowed. Initial of Family Name:

Intersection Acceleration

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

the gamedesigninitiative at cornell university Lecture 14 2D Sprite Graphics

Lecture IV Bézier Curves

Learning from Home Activity Booklet

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Trimester Counting and Cardinality

Animation & Rendering

Hierarchical Modelling

Viewing and Ray Tracing. CS 4620 Lecture 4

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

LECTURE 11 TREE TRAVERSALS

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

Lesson 99. Three-Dimensional Shapes. sphere cone cylinder. Circle the objects that match the shape name.

Transcription:

Transformation Hierarchies CS 4620 Lecture 5 2013 Steve Marschner 1

Data structures with transforms Representing a drawing ( scene ) List of objects Transform for each object can use minimal primitives: ellipse is transformed circle transform applies to points of object 2013 Steve Marschner 2

Example Can represent drawing with flat list but editing operations require updating many transforms 2013 Steve Marschner 3

Example Can represent drawing with flat list but editing operations require updating many transforms 2013 Steve Marschner 3

Groups of objects Treat a set of objects as one Introduce new object type: group contains list of references to member objects This makes the model into a tree interior nodes = groups leaf nodes = objects edges = membership of object in group 2013 Steve Marschner 4

Example Add group as a new object type lets the data structure reflect the drawing structure enables high-level editing by changing just one node 2013 Steve Marschner 5

Example Add group as a new object type lets the data structure reflect the drawing structure enables high-level editing by changing just one node 2013 Steve Marschner 5

Demo Adobe Illustrator as typical 2D drawing program Groups create transformation hierarchy Selecting inside groups allows editing internal nodes 2013 Steve Marschner 6

The Scene Graph (tree) A name given to various kinds of graph structures (nodes connected together) used to represent scenes Simplest form: tree just saw this every node has one parent leaf nodes are identified with objects in the scene 2013 Steve Marschner 7

Concatenation and hierarchy Transforms associated with nodes or edges Each transform applies to all geometry below it want group transform to transform each member members already transformed concatenate Frame transform for object is product of all matrices along path from root each object s transform describes relationship between its local coordinates and its group s coordinates frame-to-canonical transform is the result of repeatedly changing coordinates from group to containing group 2013 Steve Marschner 8

Instances Simple idea: allow an object to be a member of more than one group at once transform different in each case leads to linked copies single editing operation changes all instances 2013 Steve Marschner 9

Example Allow multiple references to nodes reflects more of drawing structure allows editing of repeated parts in one operation 2013 Steve Marschner 10

Example Allow multiple references to nodes reflects more of drawing structure allows editing of repeated parts in one operation 2013 Steve Marschner 10

Example Allow multiple references to nodes reflects more of drawing structure allows editing of repeated parts in one operation 2013 Steve Marschner 10

The Scene Graph (with instances) With instances, there is no more tree an object that is instanced multiple times has more than one parent Transform tree becomes DAG directed acyclic graph group is not allowed to contain itself, even indirectly Transforms still accumulate along path from root now paths from root to leaves are identified with scene objects 2013 Steve Marschner 11

Implementing a hierarchy Object-oriented language is convenient define shapes and groups as derived from single class abstract class Shape { void draw(); class Square extends Shape { void draw() { // draw unit square class Circle extends Shape { void draw() { // draw unit circle 2013 Steve Marschner 12

Implementing traversal Pass a transform down the hierarchy before drawing, concatenate abstract class Shape { void draw(transform t_c); class Square extends Shape { void draw(transform t_c) { // draw t_c * unit square class Circle extends Shape { void draw(transform t_c) { // draw t_c * unit circle 2013 Steve Marschner 13

Implementing traversal Pass a transform down the hierarchy before drawing, concatenate abstract class Shape { void draw(transform t_c); class Square extends Shape { void draw(transform t_c) { // draw t_c * unit square class Circle extends Shape { void draw(transform t_c) { // draw t_c * unit circle class Group extends Shape { Transform t; ShapeList members; void draw(transform t_c) { for (m in members) { m.draw(t_c * t); 2013 Steve Marschner 13

Basic Scene Graph operations Editing a transformation good to present usable UI Getting transform of object in canonical (world) frame traverse path from root to leaf Grouping and ungrouping can do these operations without moving anything group: insert identity node ungroup: remove node, push transform to children Reparenting move node from one parent to another can do without altering position 2013 Steve Marschner 14

Adding more than geometry Objects have properties besides shape color, shading parameters approximation parameters (e.g. precision of subdividing curved surfaces into triangles) behavior in response to user input Setting properties for entire groups is useful paint entire window green Many systems include some kind of property nodes in traversal they are read as, e.g., set current color 2013 Steve Marschner 15

Scene Graph variations Where transforms go in every node on edges in group nodes only in special Transform nodes Tree vs. DAG Nodes for cameras and lights? 2013 Steve Marschner 16