Luo Jr. CSCI-497/696 Advaned Computer Graphis http://www.s.rpi.edu/~utler/lasses/advanedgraphis/s8/ Professor Barb Cutler utler@s.rpi.edu MRC 9A Piar Animation Studios, 986 Topis for the Semester Mesh Simplifiation Meshes representation simplifiation subdivision surfaes generation volumetri modeling Simulation partile sstems rigid bod, deformation, loth, wind/water flows ollision detetion weathering Rendering ra traing appearane models shadows loal vs. global illumination radiosit, photon mapping, subsurfae sattering, et. proedural modeling teture snthesis hardware & more Hoppe Progressive Meshes SIGGRAPH 996 4 Mesh Generation & Volumetri Modeling Modeling Subdivision Surfaes Hoppe et al., Pieewise Smooth Surfae Reonstrution 994 Cutler et al., Simplifiation and Improvement of Geri s Game Piar 997 Tetrahedral Models for Simulation 4 5 6
Partile Sstems Phsial Simulation Rigid Bod Dnamis f ( t ) Collision Detetion Frature b Deformation p ( t ( ) ) t f ( t ) p b ( t ) v ( t ) p b ( t ) Müller et al., Stable Real-Time Deformations Star Trek: The Wrath of Khan 98 7 8 f ( t ) Fluid Dnamis Ra Casting For ever piel onstrut a ra from the ee For ever objet in the sene Find intersetion with the ra Keep the losest Foster & Mataas, 996 Visual Simulation of Smoke Fedkiw, Stam & Jensen SIGGRAPH 9 Ra Traing Subsurfae Sattering Shade (interation of light and material) Seondar ras (shadows, refletion, refration) An Improved Illumination Model for Shaded Displa Whitted 98 Jensen et al., A Pratial Model for Subsurfae Light Transport Surfae
Appearane Models Sllabus & Course Website http://www.s.rpi.edu/~utler/lasses/advanedgraphis/s8/ θ r θ i Wojieh Matusik Whih version should I register for? CSCI 696 units of graduate redit CSCI 497 4 units of undergraduate redit same letures, assignments, quies, & grading riteria φ i φ r Other Questions? Henrik Wann Jensen 4 Introdutions Who are ou? name ear/degree graphis bakground (if an) researh/job interests wh ou are taking this lass something fun, interesting, or unusual about ourself Outline Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) 5 6 What is a Transformation? Simple Transformations Maps points (, ) in one oordinate sstem to points (', ') in another oordinate sstem ' a + b + ' d + e + f For eample, Iterated Funtion Sstem (IFS): Can be ombined Are these operations invertible? Yes, eept sale 7 8
Transformations are used to: Position objets in a sene Change the shape of objets Create multiple opies of objets Projetion for virtual ameras Desribe animations Rigid-Bod / Eulidean Transforms Preserves distanes Preserves angles Rigid / Eulidean Identit 9 Similitudes / Similarit Transforms Linear Transformations Preserves angles Similitudes Rigid / Eulidean Similitudes Rigid / Eulidean Linear Identit Isotropi Saling Identit Isotropi Saling Saling Refletion Shear Linear Transformations Affine Transformations L(p + q) L(p) + L(q) L(ap) a L(p) preserves parallel lines Affine Similitudes Rigid / Eulidean Linear Similitudes Rigid / Eulidean Linear Identit Isotropi Saling Saling Refletion Shear Identit Isotropi Saling Saling Refletion Shear 4 4
Projetive Transformations preserves lines Projetive Affine Similitudes Linear Rigid / Eulidean Saling Identit Isotropi Saling Refletion Shear General (Free-Form) Transformation Does not preserve lines Not as pervasive, omputationall more involved Perspetive 5 Sederberg and Parr, Siggraph 986 6 Outline Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) How are Transforms Represented? ' ' ' a + b + ' d + e + f a b d e + f p' M p + t 7 8 Homogeneous Coordinates Add an etra dimension in D, we use matries In D, we use 4 4 matries Eah point has an etra value, w ' ' ' w' p' a e i m b f j n g k o M p d h l p w 9 in homogeneous oordinates ' ' Affine formulation a b d e ' a + b + ' d + e + f + f p' M p + t Homogeneous formulation ' ' p' a b d e f M p 5
Homogeneous Coordinates Most of the time w, and we an ignore it ' ' ' a e i b f j g k d h l Homogeneous Visualiation Divide b w to normalie (homogenie) W? Point at infinit (diretion) If we multipl a homogeneous oordinate b an affine matri, w is unhanged (,, ) (,, ) (7,, ) (4,, ) (4, 5, ) (8,, ) w w Translate (t, t, t) Translate(,,) Sale (s, s, s) Sale(s,s,s) p' Wh bother with the etra dimension? Beause now translations an be enoded in the matri! p p' Isotropi (uniform) saling: s s s p q q' ' ' ' t t t ' ' ' s s s 4 About ais ZRotate(θ) p' θ p About (k, k, k), a unit vetor on an arbitrar ais (Rodrigues Formula) Rotate(k, θ) θ k ' ' ' os θ sin θ -sin θ os θ ' ' ' kk(-)+ kk(-)+ks kk(-)-ks kk(-)-ks kk(-)+ kk(-)-ks kk(-)+ks kk(-)-ks kk(-)+ where os θ & s sin θ 5 6 6
Storage Often, w is not stored (alwas ) Needs areful handling of diretion vs. point Mathematiall, the simplest is to enode diretions with w In terms of storage, using a -omponent arra for both diretion and points is more effiient Whih requires to have speial operation routines for points vs. diretions Outline Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) 7 8 How are transforms ombined? Sale then Translate Non-ommutative Composition Sale then Translate: p' T ( S p ) TS p (,) (,) Sale(,) (,) (,) Translate(,) (,) (5,) (,) (,) Sale(,) (,) (,) Translate(,) (,) (5,) Use matri multipliation: p' T ( S p ) TS p TS Caution: matri multipliation is NOT ommutative! 9 Translate then Sale: p' S ( T p ) ST p Translate(,) (4,) Sale(,) (,) (6,) (,) (,) (8,4) 4 Non-ommutative Composition Sale then Translate: p' T ( S p ) TS p TS Translate then Sale: p' S ( T p ) ST p ST 6 Outline Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) 4 4 7
Orthographi vs. Perspetive Orthographi Simple Orthographi Projetion Projet all points along the ais to the plane Perspetive 4 44 Simple Perspetive Projetion Projet all points along the ais to the d plane, eepoint at the origin: Alternate Perspetive Projetion Projet all points along the ais to the plane, eepoint at the (,,-d): homogenie homogenie * d / * d / d / d /d 45 * d / ( + d) * d / ( + d) ( + d)/ d /d 46 In the limit, as d Outline this perspetive projetion matri... /d...is simpl an orthographi projetion Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) 47 48 8
Iterated Funtion Sstems (IFS) Capture self-similarit Contration (redue distanes) An attrator is a fied point A U fi (A) Eample: Sierpinski Triangle Desribed b a set of n affine transformations In this ase, n translate & sale b.5 49 5 Eample: Sierpinski Triangle Another IFS: The Dragon for lots of random input points (, ) for j to num_iters randoml pik one of the transformations ( k+, k+ ) f i ( k, k ) displa ( k, k ) Inreasing the number of iterations 5 5 D IFS in OpenGL GL_POINTS GL_QUADS Assignment : OpenGL Warmup Get familiar with: C++ environment OpenGL Transformations simple Vetor & Matri lasses Have Fun! 5 Will not be graded (but ou should still do it and submit it!) 54 9
Outline Orthographi & Perspetive Projetions Eample: Iterated Funtion Sstems (IFS) OpenGL Basis: GL_POINTS gldisable(gl_lighting); glbegin(gl_points); glcolorf(.,.,.); glvertef( ); glend(); lighting should be disabled... 55 56 OpenGL Basis: GL_QUADS glenable(gl_lighting); glbegin(gl_quads); glnormalf( ); glcolorf(.,.,.); glvertef( ); glvertef( ); glvertef( ); glvertef( ); glend(); lighting should be enabled... an appropriate normal should be speified OpenGL Basis: Transformations Useful ommands: glmatrimode(gl_modelview); glpushmatri(); glpopmatri(); glmultmatrif( ); From OpenGL Referene Manual 57 58 Questions? For Net Time: Read Hugues Hoppe Progressive Meshes SIGGRAPH 996 Post a omment or question on the ourse WebCT/LMS disussion b am on Frida /5 Image b Henrik Wann Jensen 59 6