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)) - trans(Cylinder) This expression can be converted to an expression tree, the CSG Expression, of the design: Is CSG representation unique?
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry
Implementation
represent each elementary solid, e.g. cube, as a 3D field of values, negative on the inside and positive outside
The CSG operations of union, intersection, and subtraction then become simple min/max operations on the 3D fields
After all CSG operations are complete, the volume representation is converted to surfaces for rendering
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry
Implementation Any object is defined on a unified domain ; its interior and boundary has negative values, while its exterior has positive values objA: the positions of its valid closure have negative values; positions of its exterior have positive values; objB: the positions of its valid closure have negative values; positions of its exterior have positive values; Then, confused? Union (objA, objB) = min (objA, objB) Intersection (objA, objB) = max (objA, objB) Difference (objA, objB) = max(objA, -objB)
More explanations are needed here
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Constructive solid geometry
It is often used in CAD tools
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 Voxels
Partition space into uniform grid
Grid cells are called a voxels (like pixels)
Store properties of solid object with each voxel
Occupancy
Color
Density
Temperature
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Voxel Acquisition
Scanning devices
Computed tomography (CT)
Magnetic resonance imaging (MRI)
Simulation
Siemens MRI Volume data example 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Voxel Acquisition
Widely used in medical imaging
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 • Mesh • Subdivision • Parametric • Implicit 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh
Which Part?
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh
Connected set of polygons (usually triangles)
Representation: Vertices, Indexed Face Set
Pros: flexible and computers can render them so quickly. So the vast majority of 3D models today are built as textured polygonal models
Cons: polygons are planar and can only approximate curved surfaces using many polygons
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Subdivision
Coarse mesh & subdivision rule
Define smooth surface as limit of sequence of refinements
…..
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Subdivision
Coarse mesh & subdivision rule
Define smooth surface as limit of sequence of refinements
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• Fine mesh coarse mesh – Basic function in mesh processing
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• How? – Edge collapse
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• How? – Vertex removal
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Mesh Simplification
• More examples
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 • Mesh • Subdivision surface • Parametric surface • Implicit surface 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Parametric surface
A parametric surface is a surface in the Euclidean space R3 which is defined by a parametric equation with two parameters ruv(,) xuv (,),(,),(,) yuvzuv Examples:
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 • Mesh • Subdivision surface • Parametric surface • Implicit surface 3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Implicit surface
Points satisfying F( x , y , z ) 0 F( x , y , z ) 0 (x, y, z) inside the surface In fact F( x , y , z ) 0 (x, y, z) on the surface F( x , y , z ) 0 (x, y, z) outside the surface An example in 2D case (an implicit curve):
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Implicit surface • An example
2 æ ö2 æ ö æ ö2 x ç y ÷ z ç ÷ +ç ÷ +ç ÷ -1= 0 è rx ø è ry ø è rz ø
A mechanical model built by using implicit surface tool
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013 Thanks everybody!
3D Modeling, Advanced Computer Graphics Shuang LIANG, SSE, Spring 2013