Hierarchical Modeling. Instance Transformation Start with a prototype object (a symbol) Each appearance of the object in the model is an instance – Must.

Slides:



Advertisements
Similar presentations
Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
Advertisements

1Notes  Assignment 0 marks should be ready by tonight (hand back in class on Monday)
Transformations IV Week 3, Wed Jan 23
Hierarchical Modeling I Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Hierarchical Modeling II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Transformations III Week.
CSC 123 – Animating characters Hierarchical modeling Zoë Wood.
2IV60 Computer Graphics 2D transformations
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
Hierarchical Transformations and Models CSE 3541 Matt Boggus.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
Hierarchical Transformations Hierarchical Models Scene Graphs
Advanced Graphics (and Animation) Spring 2002
Hierarchy, Modeling, and Scene Graphs Angel: Chapter 10 OpenGL Programming and Reference Guides, other sources. ppt from Angel, AW, etc. CSCI 6360/4360.
COMP 175: Computer Graphics March 10, 2015
Objectives Review some advanced topics, including Review some advanced topics, including Chapter 8: Implementation Chapter 8: Implementation Chapter 9:
CSE Real Time Rendering
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Chapter 10 Bresenham’s Algorithm Data Structures and Graphics or Working with Models.
Transforms Hierarchical Modeling Scene Graphs Using hierarchical modeling techniques in 3D software design Transforms Local basis Matrix math review Matrices.
Demetriou/Loizidou – ACSC330 – Chapter 9 Hierarchical and Object-Oriented Modeling Dr. Giorgos A. Demetriou Dr. Stephania Loizidou Himona Computer Science.
Data Structures for Scenes, The Basics of Scene Graphs Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Friday,
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Kinematic Linkages.
Week 4 Lecture 1: Hierarchical Modeling Part 1 Based on Interactive Computer Graphics (Angel) - Chapter 10 1 Angel: Interactive Computer Graphics 5E ©
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 40 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 40 Computer Graphics Hierarchy I.
CS559: Computer Graphics Lecture 15: Hierarchical Modeling and Shading Li Zhang Spring 2008.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
Jul 25, 2014IAT 3551 Scene Graphs.  A data structure that stores information about a graphics scene –Each node has information that structures the interpretation.
111/16/ :14 UML Instance Transformation x y z x y z x y z x y z SRT Model Coordinates.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Hierarchical and Object-Oriented Graphics Construct complex models from a set of simple geometric objects Extend the use of transformations to include.
Transformations Tutorial
1/50 CS148: Introduction to Computer Graphics and Imaging Transforms CS148: Introduction to Computer Graphics and Imaging Transforms.
Jeff Parker, 2013 Thanks to Prof. Okan Arikan, UT Austin Ed Angel, UNM
Computer Graphics I, Fall 2008 Hierarchical Modeling II.
Computer Graphics Matrix Hierarchies / Animation
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 9.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling.
University of New Mexico
Hierarchical Modeling. 2 Objectives Build a tree-structured model of a humanoid figure. Examine various traversal strategies. Build a generalized tree-model.
1cs426-winter-2008 Notes. 2 Kinematics  The study of how things move  Usually boils down to describing the motion of articulated rigid figures Things.
CS559: Computer Graphics Lecture 12: OpenGL - Transformation Li Zhang Spring 2008.
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
Computer Graphics I, Fall 2008 Hierarchical Modeling I.
Vertex Buffer Objects and Transformations Week 4 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University.
CSCE 441: Computer Graphics: Hierarchical Models Jinxiang Chai.
The Modelview Stack Lecture 9 Wed, Sep 12, The Modelview Stack OpenGL maintains a stack of matrices. The matrix on top of the stack is the current.
Hierarchical Models Chapter 9.
IAT 355 Scene Graphs Feb 23, 2017 IAT 355.
Modeling and Hierarchy
Hierarchical Modeling II
Hierarchical Transformations Hierarchical Models Scene Graphs
Computer Graphics - Hierarchical Models-
Modeling and Hierarchy
Hierarchical and Object-Oriented Graphics
Introduction to Computer Graphics with WebGL
CSCE 441: Computer Graphics: Hierarchical Models
Hierarchical and Object-Oriented Graphics
Hierarchical Modeling I
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
Hierarchical Modeling & Constructive Solid Geometry
Transformations III Week 3, Mon Jan 21
Transformations IV Week 3, Wed Jan 23
Dr. Chih-Kuo Yeh 葉智國 Computer Graphics Dr. Chih-Kuo Yeh 葉智國
Hierarchical Modeling
Computer Graphics Matrix Hierarchies / Animation
CSCE 441: Computer Graphics: Hierarchical Models
Presentation transcript:

Hierarchical Modeling

Instance Transformation Start with a prototype object (a symbol) Each appearance of the object in the model is an instance – Must scale, orient, position – Defines instance transformation

Symbol-Instance Table Can store a model by assigning a number to each symbol and storing the parameters for the instance transformation

Relationships in Car Model Symbol-instance table does not show relationships between parts of model Consider model of car – Chassis + 4 identical wheels – Two symbols Rate of forward motion determined by rotational speed of wheels

Structure Through Function Calls car(speed) { chassis() wheel(right_front); wheel(left_front); wheel(right_rear); wheel(left_rear); } Fails to show relationships well Look at problem using a graph

Graphs Set of nodes and edges (links) Edge connects a pair of nodes – Directed or undirected Cycle: directed path that is a loop loop

Tree Graph in which each node (except the root) has exactly one parent node – May have multiple children – Leaf or terminal node: no children root node leaf node

Tree Model of Car

Modeling with Trees Must decide what information to place in nodes and what to put in edges Nodes – What to draw – Pointers to children Edges – May have information on incremental changes to transformation matrices (can also store in nodes)

Robot Arm robot arm parts in their own coodinate systems

Articulated Models Robot arm is an example of an articulated model – Parts connected at joints – Can specify state of model by giving all joint angles

Relationships in Robot Arm Base rotates independently – Single angle determines position Lower arm attached to base – Its position depends on rotation of base – Must also translate relative to base and rotate about connecting joint Upper arm attached to lower arm – Its position depends on both base and lower arm – Must translate relative to lower arm and rotate about joint connecting to lower arm

Required Matrices Rotation of base: R b – Apply M = R b to base Translate lower arm relative to base: T lu Rotate lower arm around joint: R lu – Apply M = R b T lu R lu to lower arm Translate upper arm relative to upper arm: T uu Rotate upper arm around joint: R uu – Apply M = R b T lu R lu T uu R uu to upper arm

OpenGL Code for Robot robot_arm() { glRotate(theta, 0.0, 1.0, 0.0); base(); glTranslate(0.0, h1, 0.0); glRotate(phi, 0.0, 1.0, 0.0); lower_arm(); glTranslate(0.0, h2, 0.0); glRotate(psi, 0.0, 1.0, 0.0); upper_arm(); }

Tree Model of Robot Note code shows relationships between parts of model – Can change “look” of parts easily without altering relationships Simple example of tree model Want a general node structure for nodes

Humanoid Figure

Building the Model Can build a simple implementation using quadrics: ellipsoids and cylinders Access parts through functions – torso() – left_upper_arm() Matrices describe position of node with respect to its parent – M lla positions left lower leg with respect to left upper arm

Tree with Matrices

Display and Traversal The position of the figure is determined by 11 joint angles (two for the head and one for each other part) Display of the tree requires a graph traversal – Visit each node once – Display function at each node that describes the part associated with the node, applying the correct transformation matrix for position and orientation

Transformation Matrices There are 10 relevant matrices – M positions and orients entire figure through the torso which is the root node – M h positions head with respect to torso – M lua, M rua, M lul, M rul position arms and legs with respect to torso – M lla, M rla, M lll, M rll position lower parts of limbs with respect to corresponding upper limbs

Stack-based Traversal Set model-view matrix to M and draw torso Set model-view matrix to MM h and draw head For left-upper arm need MM lua and so on Rather than recomputing MM lua from scratch or using an inverse matrix, we can use the matrix stack to store M and other matrices as we traverse the tree

Traversal Code figure() { glPushMatrix() torso(); glRotate3f(…); head(); glPopMatrix(); glPushMatrix(); glTranslate3f(…); glRotate3f(…); left_upper_arm(); glPopMatrix(); glPushMatrix(); save present model-view matrix update model-view matrix for head recover original model-view matrix save it again update model-view matrix for left upper arm recover and save original model-view matrix again rest of code