Classic Models in Computer Graphics • 3D Model Representations • Raw Data • Solids • Surfaces
Total Page:16
File Type:pdf, Size:1020Kb
Lecture 2 3D Modeling Dr. Shuang LIANG School of Software Engineering Tongji University Spring 2013 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 What is a 3D model? 3D object using a collection of points in 3D space, connected by various geometric entities such as triangles, lines, curved surfaces, etc. It is a collection of data (points and other information) 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 What is a 3D modeling? The process of developing a mathematical representation of any three-dimensional surface of object via specialized software. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The medical industry uses detailed models of organs 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The movie industry uses them as characters and objects for animated and real-life motion pictures 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The science sector uses them as highly detailed models of chemical compounds 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The architecture industry uses them to demonstrate proposed buildings and landscapes through Software Architectural Models 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The architecture industry uses them to demonstrate proposed buildings and landscapes through Software Architectural Models Microspot Interiors Professional is the award-winning 3D modeling software and interior design program for Mac. Design and envision interior home designs with the power and ease of Interiors. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Usage of a 3D model The engineering community uses them as designs of new devices, vehicles and structures as well as a host of other uses 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Classic models in CG The Utah Teapot The "hello world" in CG A mathematical model of an ordinary teapot, which appears solid, cylindrical and partially convex. Created in 1975 by Martin Newell, a member of the pioneering graphics program at the University of Utah 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Classic models in CG The original, physical teapot was purchased from ZCMI (a department store in Salt Lake City, Utah) in 1974. It was donated to the Boston Computer Museum in 1984 where it was on display until 1990. It now resides in the ephemera collection at the Computer History Museum in Mountain View, California where it is catalogued as "Teapot used for Computer Graphics rendering" (http://en.wikipedia.org/wiki/Utah_teapot) 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Classic models in CG The Stanford Bunny The Stanford Bunny is a computer graphics test model developed by Greg Turk and Marc Levoy in 1994 at Stanford University. The Bunny consists of data describing 69,451 triangles determined by 3D scanning a ceramic figurine of a rabbit. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Classic models in CG The Stanford Happy Buddha The Stanford buddha is a computer graphics test model created with a Cyberware 3030 MS at Stanford University. The Buddha consists of data describing 1,087,716 triangles determined by 3D scanning a real figurine. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Classic models in CG The Stanford Dragon The Stanford Dragon is a computer graphics test model created with a Cyberware 3030 MS at Stanford University. The Dragon consists of data describing 871,414 triangles determined by 3D scanning a real figurine. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Requirements for a 3D representation scheme Unambiguity : When you see a representation of a solid, you will know what is being represented without any doubt. Uniqueness : That is, there is only one way to represent a particular solid. If a representation is unique, then it is easy to determine if two solids are identical since one can just compare their representations. Accuracy : A representation is said accurate if no approximation is required. Validness : This means a representation should not create any invalid or impossible solids. More precisely, a representation will not represent an object that does not correspond to a solid. Closure : Solids will be transformed and used with other operations such as union and intersection. "Closure" means that transforming a valid solid always yields a valid solid. Compactness and Efficiency : A good representation should be compact enough for saving space and allow for efficient algorithms to determine desired physical characteristics. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Point cloud • Range image • Solids • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Point cloud Unstructured samples Advantage: simplicity Disadvantage: no information on adjacency / connectivity 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Range image Image: stores a color along each of a set of regularly- spaced rays in space Range image: stores a depth along each of a set of regularly-spaced rays in space Obtained using devices known as range scanners Vivid910, Laser scanner PMD, CamCube 3.0, TOF camera 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Range image Image: stores a color along each of a set of regularly- spaced rays in space Range image: stores a depth along each of a set of regularly-spaced rays in space Obtained using devices known as range scanners 2.5D range image Range2D ear image with rendering 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Wireframe model • Constructive solid geometry • Voxels • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Wireframe model Wireframe model The oldest way of representing solids It represents shape of a solid object by its characteristics lines and points A wireframe model does not have face information A wireframe model consists of two tables, the vertex table and the edge table. Each entry of the vertex table records a vertex and its coordinate values, while each entry of the edge table has two components giving the two incident vertices of that edge 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Wireframe model For example, to represent a cube Edge Table defined by eight vertices and 12 Edge # Start Vertex End Vertex edges, one needs the following tables 1 1 2 2 2 3 Vertex Table 3 3 4 Vertex # x y z 4 4 1 1 1 1 1 5 5 6 2 1 -1 1 6 6 7 3 -1 -1 1 7 7 8 4 -1 1 1 8 8 5 5 1 1 -1 9 1 5 6 1 -1 -1 10 2 6 7 -1 -1 -1 11 3 7 8 -1 1 -1 12 4 8 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Wireframe model It is ambiguous which one? 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Today’s Topics • What is a 3D model? • Usage of 3D models • Classic models in computer graphics • 3D model representations • Raw data • Solids • Wireframe model • Constructive solid geometry • Voxels • Surfaces 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry CSG A CSG solid is constructed from a few primitives with Boolean operators Primitives: Cuboids(立方体), cylinders(圆柱体), prisms(棱柱), pyramids(角锥 体), spheres(球体), cones(圆锥), torus(圆环) Boolean operators: union, intersection, difference Example: A+B A^B A-B B-A 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry A CSG Example: we want to design a bracket-like shape with a hole shown on the right-most figure below 1. start with two blocks and one cylinder 2. two blocks are scaled and one of them is rotated 3. The cylinder is scaled 4. These three instantiations are then transformed to their desired positions 5. The final product is obtained by computing the union of the two blocks and then subtracting from it the cylinder. 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry A CSG Example: The design procedure of the above model can be written as an expression: (trans(Block1) + trans(Block2))