Surface and Solid Geometry 1 3D Polygons • Once we know our plane equation: Ax + By + Cz + D = 0, we still need to manage the truncation which leads to the polygon itself Functionally, we will need to do this to know if a point lies in a polygon or not, for example 2 1 3D Polygons • To do this, we can project the 3D polygon into 2D and see if the point is in the 2d using the inside test z (xi,yi,zi) y (xi’,yi’) x 3 3D Polygons • Project 3d to 2d based on largest of A,B,C This example: z (xi,yi,zi) Z (or C) is principal component of N, normal so project on to xy-plane y x (xi’,yi’) 4 2 Z-buffer • For 3D with multiple polygons, must deal with visibility image plane Project vertices into image plane and with projected vertex include depth in additional depth- or Z-buffer 5 Z-buffer Scan convert each projected polygon: For each polygon in scene project verticies for each pixel inside poly calculate z if z < closest draw into frame buffer update z buffer 6 3 Z-buffer • How do we calculate z for buffer, quickly? z = (-Ax -By -D)/C from plane eq. Same scanline (x + 1): z' = (-A(x + 1) - By - D)/C or z' = z - A/C z z' 7 Z-buffer • How do we calculate z for buffer, quickly? • For the next scanline, following edge coherence: xs+1 = xs + 1/m, ys+1 = ys +1 plus zs = (-Axs -Bys -D)/C, zs+1 = zs - (A/m + B)/C zs+1 z z' 8 4 Z-buffer • Z-buffering is very common approach, also often accelerated with hardware • OpenGL embeds this approach 3D Polygon GRAPHICS PIPELINE Image Pixels 9 10 5 Surface Geometry 11 Surfaces • Interpolating points for 2 parameters, u and v Bi-cubic patch 12 6 Subdivision Surfaces Refinement Types of Subdivision • Interpolating Schemes - Limit Surfaces/Curve will pass through original set of data points. • Approximating Schemes - Limit Surface will not necessarily pass through the original set of data points. 7 Subdivision Surfaces Interpolation example • Approach Limit Curve Surface through an Iterative Refinement Process. Refinement 1 Refinement 2 Refinement ∞ Subdivision Surfaces A Primer: Chaiken’s Algorithm (approximating surface) Q2 Q3 P2 1 3 P1 Q0 P0 P1 Q4 4 4 Q1 3 1 Q5 Q1 P0 P1 Q0 4 4 P 3 P0 1 3 Apply Iteratively Q2 P1 P2 4 4 3 1 Q3 P1 P2 4 4 1 3 P2 P3 4 4 3 1 Q5 P2 P3 4 4 Q4 Limit ‘Curve’ Surface 8 Surface Example Surface evolution with subdivision level Limit surface Catmull-Clark Subdivision (1978) FACE f 1 n vi n 1 EDGE e v1 v 2 f1 f 2 4 VERTEX v i 1 n2 1 vi 2 n n e j j 1 n2 f j j 9 Subdivision used in production • Traditionally B-spline patches have been used in production for character animation. • Difficult to control B-spline patch density in character modelling. Subdivision in Character Animation Tony Derose, Michael Kass, Tien Troung (SIGGRAPH ’98) (Geri’s Game, Pixar 1998) Solid Constructive Geometry 10 Solid geometry • Inherently 3D, geometric elements describe sets of spaces enclosed by 2D boundaries • For example, a solid sphere is the simplest solid element. Other simple primitives include the cube, cylinder, cone, and torus 21 Solid geometry • Other objects are defined by combinations of primitives. • An entire math has been explored related to the combination of solid primitives called constructive solid geometry (CSG) • With CSG, complex shapes may be generated from operations formed on primitives 22 11 Solid geometry • Boolean operators are defined tools for combining solid geometry for CSG • These perform group operations on the points included in the solid primitives • They are: - Union - Subtraction - Intersection • These bool-op's are implemented in Maya 23 Solid geometry • Boolean operator: Union combines two elements into a single one 24 12 Solid geometry • Boolean operator: Union combines two elements into a single one 25 Solid geometry • Boolean operator: Subtract take the difference between two elements 26 13 Solid geometry • Boolean operator: Subtract take the difference between two elements 27 Solid geometry • Boolean operator: Subtract take the difference between two elements 28 14 Solid geometry • Boolean operator: Subtract 29 Solid geometry • Boolean operator: Intersection finds the common points in the given primitives 30 15 31 Solid Constructive Geometry 32 16 CSG Tree Solid geometry Graph for hierarchy of Boolean operations Often used for CAD and Mech Eng 33 Solid geometry Adams & Dutre 2003 34 17 Surfaces splitting Split along the intersection curve A A C A A∩B Label each part of the object (inside/outside) A A C A C 35 Example 36 18 Intersection curve Compute approximate intersection of both mesh sets 37 Split and label operations Interior faces Exterior faces 38 19 Reconstruction Depending on boolean operation: Merge operation along the intersection curve Intersection Union A-B B-A 39 WHY? Solid Constructive Geometry 40 20 Solid Constructive Geometry 41 Solid Constructive Geometry 42 21
© Copyright 2026 Paperzz