220 likes | 386 Views
Computer Graphics (fall 2009). School of Computer Science University of Seoul. Polygonal Meshes. Mostly handles orientable 2-manifold Composed of triangles, quads, polygons, etc. Comes with Topology (connectivity) Cf ) triangular soup. [right] polygonal mesh example
E N D
Computer Graphics(fall 2009) School of Computer Science University of Seoul
Polygonal Meshes • Mostly handles orientable 2-manifold • Composed of triangles, quads, polygons, etc. • Comes with Topology (connectivity) • Cf) triangular soup [right] polygonal mesh example (image courtesy of Wikipedia) a pen and ink drawing of a wireframe chalice ("Perspective Study of a Chalice"), done by Paolo Uccelloin 1430-1440, Florence, Italy. (image courtesy of SIGGRAPH)
Polygonal Meshes (cont’d) (image courtesy of Wikipedia)
Data Structure for Polygonal Meshes • Corner tables • Vertex-vertex meshes • Face-vertex meshes • Winged-edge meshes • Render dynamic meshes • Quad-edge data structure • Half-edge data structure • Split-edge data structure • Corner data structure
Vertex-Vertex Meshes (VV) • List of connected vertices for each vertex (image courtesy of Wikipedia)
Face-Vertex Meshes (FV) • List of faces defined by vertex indices (image courtesy of Wikipedia)
Quad-Edge Data Structure (images courtesy of VoroWiki)
Half-Edge Data Structure • CGAL Half-edge data structure
Half-Edge Data Structure (cont’d) (image courtesy of MIT)
Split-Edge Data Structure (image courtesy of MIT)
Half-Edge vs. Split-Edge • Dual structures • HalfEdgeMesh::VertexLoop() = SplitEdgeMesh::FaceLoop() • HalfEdgeMesh::FaceLoop() = SplitEdgeMesh::VertexLoop()
Corner Data Structure • Self-dual (image courtesy of MIT)
3D Scene/Model File Formats • Wavefront OBJ (.obj) • 3DS Max (.3ds) • Geomview OFF (Object File Format) (.off) • PLY (.ply) for scanned data • … and more
Loading 3D Files • Some (proprietary) formats are not open to public (e.g., .max) • Libraries • lib3ds (.3ds) • assimp (Open Asset Import Library) • GLM by Nate Robin (.obj) • OpenMesh (.obj, .off, .ply, etc.) • CGAL (.off for input, .off, .obj, .wrl for output)
Where to Find 3D Files? • artist-3d.com • 3DModelFree.com • Archive 3D • TurboSquid • The Stanford 3D Scanning Repository • The Utah 3D Animation Repository • …and more!
Converting 3D Files • 3D Object Converter (for Windows) • Blender (import/export) • …and more
Rendering Polygonal Meshes • Iterating and rendering each polygon • Vertex array • glDrawArrays: triangular soup (no topology) • glDrawElements: triangular mesh (with topology) • VBO (Vertex Buffer Object) • Data kept in GPU memory fast
References • Lecture note by Lars Linsen at Jacobs University • Lecture notes by computer graphics group at MIT • Lecture note by Barb Cutler at Rensselaer Polytechnic Institute