Luo Jr. CSCI-453/653 Advanced Computer Graphics http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/s7/ Barb Cutler cutler@cs.rpi.edu MRC 33A Piar Animation Studios, 986 Topics for the Semester Meshes representation simplification subdivision surfaces construction/generation volumetric modeling particle sstems, cloth rigid bod, deformation wind/water flows collision detection weathering Mesh Simplification Rendering Simulation 2 ra tracing, shadows appearance models local vs. global illumination radiosit, photon mapping, subsurface scattering, etc. procedural modeling teture snthesis non-photorealistic rendering hardware & more Hoppe Progressive Meshes SIGGRAPH 996 3 4
Modeling Subdivision Surfaces Mesh Generation & Volumetric Modeling Hoppe et al., Piecewise Smooth Surface Reconstruction 994 Cutler et al., Simplification and Improvement of Tetrahedral Models for Simulation 24 Geri s Game Piar 997 6 5 Particle Sstems Phsical Simulation Star Trek: The Wrath of Khan 982 7 Rigid Bod Dnamics Collision Detection Fracture Deformation Müller et al., Stable Real-Time Deformations 22 8
Fluid Dnamics Ra Casting/Tracing For ever piel construct a ra from the ee For ever object in the scene Find intersection with the ra Keep the closest Foster & Mataas, 996 Visual Simulation of Smoke Fedkiw, Stam & Jensen SIGGRAPH 2 9 Appearance Models Shade (interaction of light and material) Secondar ras (shadows, reflection, refraction) An Improved Illumination Model for Shaded Displa Whitted 98 Subsurface Scattering Wojciech Matusik θr Jensen et al., A Practical Model for Subsurface Light Transport 2 θi φi φ Surface r Henrik Wann Jensen 2
Sllabus & Course Website Grades http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/s7/ http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/s7/ Which version should I register for? This course counts as communications intensive for undergraduates. As such, ou must satisfactoril complete all readings, presentations, project reports to pass the course. As this is an elective (not required) course, I epect to grade this course: A, A-, B+, B, B-, or F Don t epect C or D level work to pass I don t want to give an F s CSCI 653 : 3 units of graduate credit CSCI 453 : 4 units of undergraduate credit (same lectures, assignments, quies, & grading criteria) This is an intensive course aimed at graduate students and undergraduates interested in graphics research, involving significant reading & programming each week. Taking this course in a 5 course overload semester is discouraged. 3 Participation/Laptops in Class Polic http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/s7/ Lecture is intended to be discussion-intensive Laptops, tablet computers, smart phones, and other internet-connected devices are not allowed Ecept during the discussion of the da's assigned paper: students ma use their laptop/tablet to view an electronic version of the paper Other eceptions to this polic are negotiable; please see the instructor in office hours 5 4 Questions?
Outline What is a Transformation? Maps points (, ) in one coordinate sstem to points (', ') in another coordinate sstem Course Overview Classes of Transformations Representing Transformations Combining Transformations Orthographic & Perspective Projections Eample: Iterated Function Sstems (IFS) ' a + b + c ' d + e + f For eample, Iterated Function Sstem (IFS): 7 8 Simple Transformations Transformations are used to: Can be combined Are these operations invertible? Position objects in a scene Change the shape of objects Create multiple copies of objects Projection for virtual cameras Describe animations Yes, ecept scale 9 2
Rigid-Bod / Euclidean Transforms Similitudes / Similarit Transforms Preserves distances Preserves angles Preserves angles Similitudes Rigid / Euclidean Rigid / Euclidean Identit Identit Translation Translation Rotation Isotropic Scaling Rotation 2 Linear Transformations 22 Affine Transformations preserves parallel lines Affine Similitudes Similitudes Linear Linear Rigid / Euclidean Rigid / Euclidean Scaling Scaling Identit Translation Identit Isotropic Scaling Reflection Translation Rotation L(p + q) L(p) + L(q) Isotropic Scaling Reflection Rotation Shear Shear L(ap) a L(p) 23 24
Projective Transformations General (Free-Form) Transformation preserves lines Does not preserve lines Not as pervasive, computationall more involved Projective Affine Similitudes Linear Rigid / Euclidean Scaling Identit Translation Isotropic Scaling Reflection Rotation Shear Perspective 25 Outline Sederberg and Parr, Siggraph 986 26 How are Transforms Represented? Course Overview Classes of Transformations Representing Transformations Combining Transformations Orthographic & Perspective Projections Eample: Iterated Function Sstems (IFS) ' a + b + c ' d + e + f ' ' p' 27 a d b e c + f Mp + t 28
Homogeneous Coordinates Translation in homogeneous coordinates ' a + b + c ' d + e + f Add an etra dimension in 2D, we use 3 3 matrices In 3D, we use 4 4 matrices Affine formulation Each point has an etra value, w a b ' e f ' i j ' m n w' c d g h k l o p p' Mp w ' ' p' d h l c + f Mp + t ' ' p' a b c d e f Mp 3 Homogeneous Visualiation Most of the time w, and we can ignore it a b c e f g i j k b e 29 Homogeneous Coordinates ' ' ' a d Homogeneous formulation Divide b w to normalie (homogenie) W? Point at infinit (direction) If we multipl a homogeneous coordinate b an affine matri, w is unchanged (,, ) (,, 2) w (7,, ) (4, 2, 2) (4, 5, ) (8,, 2) 3 w2 32
Translate (t, t, t) Wh bother with the etra dimension? Because now translations can be encoded in the matri! ' ' ' Scale (s, s, s) Translate(c,,) p q' q c t t t p' Isotropic (uniform) scaling: s s s p' p Scale(s,s,s) ' ' ' s s s 33 Rotation 34 Rotation ZRotate(θ) Rotate(k, θ) p' About (k, k, k), a unit vector on an arbitrar ais (Rodrigues Formula) About ais θ p ' ' ' cos θ -sin θ sin θ cos θ θ k kk(-c)+c kk(-c)-ks kk(-c)+ks ' kk(-c)+ks kk(-c)+c kk(-c)-ks ' kk(-c)-ks kk(-c)-ks kk(-c)+c ' where c cos θ & s sin θ 35 36
Storage Outline Often, w is not stored (alwas ) Needs careful handling of direction vs. point Mathematicall, the simplest is to encode directions with w In terms of storage, using a 3-component arra for both direction and points is more efficient Which requires to have special operation routines for points vs. directions Course Overview Classes of Transformations Representing Transformations Combining Transformations Orthographic & Perspective Projections Eample: Iterated Function Sstems (IFS) 37 How are transforms combined? Non-commutative Composition Scale then Translate (,) Scale then Translate: p' T ( S p ) TS p (2,2) Scale(2,2) (5,3) Translate(3,) (,) (3,) (,) (,) 38 (2,2) Scale(2,2) (5,3) Translate(3,) (3,) (,) (,) Use matri multiplication: p' T ( S p ) TS p TS 3 2 2 Translate then Scale: p' S ( T p ) ST p 2 3 2 (8,4) (,) (4,2) Translate(3,) (3,) Scale(2,2) (6,2) (,) Caution: matri multiplication is NOT commutative! 39 4
Non-commutative Composition Eercise! Scale then Translate: p' T ( S p ) TS p TS 3 2 2 Form teams of 2. Use piece of paper. Put both names on the top. Work together. Both people should write. Hand in to TA Jerame Tler after we discuss. Write down the 33 matri that transforms this set of 4 points: A: (,) B: (,) C: (,) D: (,) 2 3 2 to these new positions: A : (-, ) B : (-, ) C : (, ) D : (, ) Translate then Scale: p' S ( T p ) ST p ST 2 2 3 Show our work. 2 6 2 2 If ou finish earl Solve the problem using a different technique. 4 Outline Orthographic vs. Perspective Orthographic Course Overview Classes of Transformations Representing Transformations Combining Transformations Orthographic & Perspective Projections Eample: Iterated Function Sstems (IFS) Perspective 43 44
Simple Orthographic Projection Simple Perspective Projection Project all points along the ais to the plane Project all points along the ais to the d plane, eepoint at the origin: B similar triangles: / d/ (*d)/ 45 Project all points along the ais to the plane, eepoint at the (,,-d): (,, ) /d *d/ *d/ d /d this perspective projection matri... homogenie * d / ( + d) * d / ( + d) ( + d)/ d /d 46 In the limit, as d Alternate Perspective Projection B similar triangles: / d/(+d) (*d)/(+d) (,, ) homogenie 47 /d...is simpl an orthographic projection 48
Outline Iterated Function Sstems (IFS) Capture self-similarit Contraction (reduce distances) An attractor is a fied point Course Overview Classes of Transformations Representing Transformations Combining Transformations Orthographic & Perspective Projections Eample: Iterated Function Sstems (IFS) 49 Eample: Sierpinski Triangle 5 Eample: Sierpinski Triangle for lots of random input points (, ) for j to num_iters randoml pick one of the transformations (k+, k+) fi (k, k) displa (k, k) Described b a set of n affine transformations In this case, n 3 translate & scale b.5 Increasing the number of iterations 5 52
Another IFS: The Dragon 3D IFS in OpenGL 53 Assignment : OpenGL Warmup 54 Questions? Get familiar with: C++ environment OpenGL Transformations simple Vector & Matri classes Have Fun! Due ASAP (start it toda!) ¼ of the points of the other HWs (but ou should still do it and submit it!) Image b Henrik Wann Jensen 55 56
For Net Time: Volunteer to be Discussant? Questions to think about: Note: This is not a presentation. Be sure to read blurb (& linked webpage) on course webpage about Assigned Readings & Discussants. How do we represent meshes? How to automaticall decide what parts of the mesh are important / worth preserving? Algorithm performance: memor, speed? What were the original target applications? Are those applications still valid? Are there other modern applications that can leverage this technique? Read Hugues Hoppe Progressive Meshes SIGGRAPH 996 Post a comment or question on the course WebCT/LMS discussion b am on Frida 57 58