Modeling: Polygonal Mesh, Simplification, Lod, Mesh
Total Page:16
File Type:pdf, Size:1020Kb
The Modeling-Rendering Paradigm Modeler: Renderer: EECS 487: Interactive Modeling complex shapes Vertex data • no equation For a chair, Face, etc. Fixed function transForm and Vertex shader • instead, achieve complexity using lighting Computer Graphics simple pieces • polygons, parametric surfaces, or Clip, homogeneous divide and viewport Lecture 36: implicit surfaces scene graph Rasterize • Polygonal mesh simplification • with arbitrary precision, in principle Texture stages Fragment shader Fragment merging: stencil, depth 3D Geometry Representations 2D: Range Image Represent different kinds oF inFormation: Image with depth inFormation point data, surface data, volumetric data • acquired From range scanner, incl. MicrosoFt Kinect and Google Tango Points Solids • not a complete 3D description: does not include • 2D: range image • Constructive Solid Geometry part oF object occluded From viewpoint • 3D: point cloud • Voxels Surfaces Procedural • Polygonal mesh • Particle system • Parametric surfaces • Spring-mass system Cyberware • Subdivision surfaces • Fractals • Implicit surfaces Curless Range image Tessellation Range surface Funkhouser Funkhouser, Ramamoorthi 3D: Point Cloud Surfaces Unstructured set oF 3D Boundary representation (B-reps) point samples • sometimes we only care about the surface, e.g., when Acquired From range finder rendering opaque objects and performing geometric computations Disadvantage: no structural inFo • adjacency/connectivity have to use e.g., k-nearest neighbors to compute Increasingly hot topic in graphics/vision today 3D surface triangles Microscribe3D Funkhouser, Ramamoorthi,Ohtake Chenney, Lozano Solid Modeling Choosing a Representation Some representations are best thought oF as Efficiency For different tasks: defining the space filled • creation/acquisition: by hand, procedurally, • medical data with inFormation attached to the space by fitting to measurements • transparent objects with internal structure • interaction/manipulation: simplification, • taking cuts out of an object, compression, local control oF shape For “What will I see iF I break this object?” modeling, animation, etc. • geometric computation: distance, intersection, normal vectors, smoothness and continuity, ability to evaluate derivatives, curvature, similarity comparisons, indexing, search • storage and transmission: compactness • 3D volume volume element rendering, e.g., with hardware accelerator: “voxel” convert to polygon Chenney, Lozano Funkhouser, Chenney Advantages oF Representations What do People Use? Manipulation: Triangle meshes most widely used • splines easiest originally, but now Subdivision surfaces used a lot in movies many algorithms For polygon meshes Acquisition and modeling: Spline patches used by modeling programs • splines, CSG originally used For modeling Constructive Solid Geometry (CSG) used For • but increasingly complex meshes, range images, modeling machine parts and point cloud acquired From real world Volume data used in medical imaging Simplicity: meshes Range images used in image-based rendering Efficient hardware rendering: meshes Point clouds becoming increasingly relevant, especially with computer vision Ramamoorthi Ramamoorthi Comparison oF B-Reps Polygonal Mesh Features Polygonal Implicit Parametric Subdivision Mesh Surface Surface Surface Accurate ✗ ✔ ✔ ✔ Introduction to five topics: Compact ✗ ✔ ✔ ✔ 1. how to draw good looking meshes? Intuitive ✗ ✗ ✔ ✗ 2. mesh simplification Local ✔ ✗ ✔ ✔ 3. level of detail Affine ✔ ✔ ✔ ✔ 4. mesh representation Real objects ✔ ✔ ✗ ✔ 5. error checking and mesh processing Continuity ✗ ✔ ✔ ✔ Parameterization ✗ ✗ ✔ ✗ Rendering ✔ ✗ ✔ ✔ Intersections ✗ ✔ ✗ ✗ Funkhouser Delaunay Triangulation Dual Meshes and Voronoi Diagram How to create a “good looking” triangle mesh From a set oF points? The dual oF a mesh exchanges its Faces and vertices • place new vertices at centroid oF Faces • minimum vertices and triangles • Fewer, larger triangles Edges in dual cross original edges • no sliver • at right angles A triangulation is Delaunay iff For • at midpoints • (but might not actually “cross” each edge the circumcircle of an iF new vertex is at original edge) adjacent triangle does not contain the opposite vertex Dual of a Delaunay Triangulation Among all possible triangulations, the Delaunay is a Voronoi Diagram triangulation maximizes the smallest angle • a Voronoi face denotes a region closer to a given Delaunay (original) vertex than to Rhymes with “baloney” any other Delaunay vertex [Hart,Bischoff&Kobbelt] Hart,van Laerhoven Mesh Simplification Mesh Simplification More polygons increases model accuracy, but requires more space and processing/rendering time Reduce polygon count: Desired properties: • need For accuracy depends on the application • less storage • generality in types oF mesh • game vs. medical imaging • Faster rendering • efficiency and scalability • approximate solutions vs. final simulations • simpler manipulation • quality oF approximation • screen resolution or viewing distance • visual may not call For a very accurate model Simplification algorithms: • geometric: topological modifications • vertex clustering • control oF approximation quality • continuous LoD Acquisition systems (e.g., 3D scanner) • mesh retiling • smooth transitions between models oFten produce huge models • mesh decimation • more detailed than necessary • mesh optimization • millions oF polygons per object are common • billions oF polygons per object are starting to happen • 300 million faces = 3.7 GB aFter gzip compression Yu Funkhouser Vertex Clustering Mesh Retiling Method: Resample mesh with • partition space into cells “uniFormly spaced” • grids, spheres, octrees, ... random vertices: • merge all vertices within the same cell • generate random • triangles with multiple vertices in one cell vertices on surface degenerate into lines or points • spread them uniFormly Properties: using diffusion/repulsion • general and robust • triangulate vertices • allows topological changes Properties: • not best quality • slow • blurs sharp Features Hart,Funkhouser Funkhouser, Turk Mesh Decimation ManiFold Surface Simplification algorithm: Let M be a surface in 3D • each operation simplifies the model by a small amount M is a manifold iff a neighborhood • apply many operations in an iterative, greedy Fashion to gradually reduce complexity oF mesh: of any point p in M is topologically 1. measure error introduced by potential decimation operations equivalent to the unit open disk good 2. place operations in a priority queue sorted by error (interior oF a unit circle) 3. perform operations in queue successively 4. aFter each operation, re-evaluate error metrics Topological equivalence (or Types oF operations: homeomorphism) allows bad • vertex remove deFormation that does not rip, • edge collapse tear, or poke holes • vertex cluster (virtual edge collapse) part oF On a maniFold surface: manifold First, some topological properties oF meshes . • every edge is shared by exactly 2 faces surface • around each vertex exists a closed loop oF Faces TP3,Funkhouser Hart,TP3 ManiFolds with Boundary Piecewise Linear ManiFolds M’ is a maniFold with boundary iff a neighborhood of any point p in M’ is homeomorphic to a half disk Closed mesh No dangling faces On a maniFold with a boundary: • edges on the boundary belong to Edges only bound two faces exactly one face non-manifold edge dangling • around vertices on the boundary Watertight face the loop of faces is open • no holes in the surface a maniFold surface • no boundary A 3D surface that is a maniFold surface with boundary non-manifold • orientable boundary vertex without boundary is a closed surface TP3 Hart,TP3 Orientable Surface Vertex Remove Method Orientable surface has 2 sides, • remove vertex and adjacent Faces like a piece oF paper • fill hole with new triangles (2 less triangles) By convention, the normal oF a closed orientable surface points “outwards” The Möbius strip and Klein bottle are non-orientable surfaces: Properties • requires maniFold surface around vertex • preserves local topological structure • filing hole well may not be easy TP3,EscherKarcher,Chu-Carroll, Hart,Funkhouser,Ramamoothi Edge Collapse Virtual Edge Collapse Method A.k.a. vertex-pair contraction or vertex cluster • merge two edge vertices into one • joins previously unconnected areas • delete two degenerate triangles • allows topological simplification • usually limited to small distance vertex split to avoid O(N2) virtual edges • not best quality edge collapse Properties • requires maniFold surface around vertex • preserves local topological structure • allows smooth transition Hart,Funkhouser Hart,Manocha Iterative Edge Collapse Simplicial Complex Surface Properties • well-defined For any simplicial A surface is simplicial complex iff complex surfaces • polygons meet only along their edges • induces hierarchy on the surface: • edges intersect only at their endpoints allows smooth transition (geomorph) • currently most popular technique (standard Feature in Direct3D) yes not TP3 Hart,Funkhouser,Watt00 Error Metrics For Simplification Level of Detail (LoD) Pyramid Single resolution not enough Used to rank edges during simplification • application context dictates required detail • reflects amount oF geometric error introduced • context varies over time (and space) • main differentiating Feature among algorithms Level of detail: • replace each object in the scene graph with a hierarchy Must address two interrelated problems oF objects at differing resolutions • what is the best contraction to perform?