Chapter III Modeling.

Slides:



Advertisements
Similar presentations
1 Planes, Polygons and Objects ©Anthony Steed
Advertisements

Geometry Compression Michael Deering, Sun Microsystems SIGGRAPH (1995) Presented by: Michael Chung.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung
1 Computer Graphics Chapter 7 3D Object Modeling.
Polygonal Mesh – Data Structure and Smoothing
ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg
1 Chapter 3 Methods of Analysis Copyright © 2013 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
CS-321 Dr. Mark L. Hornick 1 3-D Object Modeling.
In the name of God Computer Graphics Modeling1. Today Introduction Modeling Polygon.
Introduction to 3D Graphics Lecture 4: Scenes and Scene Graphs Anthony Steed University College London.
Mesh Representation, part I
Polygon Lists & 3-D File Formats Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, February 18, 2002.
Map Scale, Resolution and Data Models. Components of a GIS Map Maps can be displayed at various scales –Scale - the relationship between the size of features.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
Image Synthesis Rabie A. Ramadan, PhD 1. 2 About my self Rabie A. Ramadan My website and publications
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
3D Graphics for Game Programming Chapter I Modeling in Game Production.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
Solid Modeling. Solid Modeling - Polyhedron A polyhedron is a connected mesh of simple planar polygons that encloses a finite amount of space. A polyhedron.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 8 Ravi Ramamoorthi
CS418 Computer Graphics John C. Hart
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Subdivision Surfaces Greg Humphreys University of Virginia CS 445, Fall 2003.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
Chapter III Rasterization
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
ALGORITHMS FOR POLYGON REDUCTION Author: Ing. Roman Schulz FIT VUT, 2008.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
Modeling So far in class: –We’ve looked at images and image manipulation –We’ve looked at rendering from polygons Next major section: –Modeling You may.
1 Planes, Polygons and Objects ©Anthony Steed
Slide 1Lecture Fall ‘00 Surface Modeling Types: Polygon surfaces Curved surfaces Volumes Generating models: Interactive Procedural.
Unit-4 Geometric Objects and Transformations- I

Ying Zhu Georgia State University
Computer Graphics Lecture 21 Triangles and Planes Taqdees A
CENG 789 – Digital Geometry Processing 04- Mesh Data Structures
Week 12 - Thursday CS361.
Constructing Objects in Computer Graphics
POLYGON MESH Advance Computer Graphics
Computer Graphics Index Buffers
Lecture 33: Shape Modeling Li Zhang Spring 2008
Deferred Lighting.
Constructing Objects in Computer Graphics By Andries van Dam©
Mean Shift Segmentation
Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates to store the shape.
Chapters VIII Image Texturing
Fitting Curve Models to Edges
CSC461: Lecture 23 Shading Computation
Vectors, Normals, & Shading
Chapter IV Spaces and Transforms
Chapter VI OpenGL ES and Shader
Chapter IX Bump Mapping
Building Models Ed Angel Professor Emeritus of Computer Science
Chapter XIII Character Animation
Meshes.
Chapter V Vertex Processing
Screen-space Object Manipulation
CS-378: Game Technology Lecture #4: Texture and Other Maps
Subdivision Surfaces 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Chapter 14 Shading Models.
03 | Creating, Texturing and Moving Objects
Presentation transcript:

Chapter III Modeling

Polygon Mesh Implicit representation vs. explicit representation (in polygon mesh) The polygon mesh representation is preferred in real-time applications because the GPU is optimized for processing polygons. Note that the mesh's vertices are the points that sample the smooth surface and therefore the polygon mesh is not an accurate representation but an approximate one. A triangle is the simplest polygon and the triangle mesh is most popularly used. In a typical closed mesh, the number of triangles is approximately twice the number of vertices, e.g., given 100 vertices, we have about 200 triangles.

Polygon Mesh (cont’d) Even though the triangle mesh is far more popular in general, the quad mesh is often preferred especially for modeling step. A straightforward method to convert a quad mesh into a triangle mesh is to split each quad into two triangles. triangle mesh quad mesh

Polygon Mesh (cont’d) Levels of detail (LOD) Tradeoff between accuracy and efficiency: As the resolution increases, the shape of the mesh becomes closer to the original smooth surface, but the time needed for processing the mesh also increases. refinement simplification

Polygon Mesh – Non-indexed Representation The vertices are enumerated in a memory space, named vertex array. Three vertices are read in linear order to make up a triangle. It is inefficient because the vertex array contains redundant data.

Polygon Mesh – Indexed Representation A better method is using a separate index array. A vertex appears “only once” in the vertex array. Three indices per triangle are stored in the index array. The data stored in the vertex array are not restricted to vertex positions but include a lot of additional information. (All of these data will be presented one by one throughout this class.) Therefore, the vertex array storage saved by removing the duplicate data outweighs the additional storage needed for the index array.

Surface Normals Surface normals play a key role in computer graphics. Given triangle p1, p2, p3, let v1 denote the vector connecting the first vertex (p1) and the second (p2). Similarly, the vector connecting the first vertex (p1) and the third (p3) is denoted by v2. Then, the triangle normal can be computed using the cross product based on the right-hand rule. Every normal vector is made to be a unit vector by default. Note that p1, p2, and p3 are ordered counter-clockwise (CCW).

Surface Normals (cont’d) What if the vertices are ordered clockwise (CW), i.e., p1, p3, p2? The vector connecting the first vertex (p1) and the second (p3) and that connecting the first vertex (p1) and the third (p2) define the triangle normal. The normal is in the opposite direction! The normal direction depends on the vertex order, i.e., whether p1, p2, p3 or p1, p3, p2. In computer graphics, surface normals are supposed to point out of the polyhedron. For this, we need CCW ordering of the vertices, i.e., p1, p2, p3, instead of p1, p3, p2.

Surface Normals (cont’d) In the index array, the vertices are ordered CCW.

Surface Normals (cont’d) We have discussed the triangle normals, but more important are the vertex normals. A normal can be assigned to a vertex such that the vertex normal approximates the normal of the smooth surface’s point that the vertex samples. A vertex normal can be defined by averaging the normals of all the triangles sharing the vertex. Modeling packages such as 3ds Max do compute vertex normals. Vertex normals are an indispensable component of the vertex array.

Export and Import Game objects and related data created using off-line graphics packages are stored in files and passed to the run-time game program. The process of outputting the data in a format suitable for other applications is called export. On the other hand, taking such exported data is called import. For exporting and importing, simple scripts or programs are used. For example, 3ds Max provides MAXScript and an exporter can be written using MAXScript. In 3ds Max, a lot of file formats are supported for export. Among the popular is .obj file. export import modeler file game program

Export and Import (cont’d) Consider a low-resolution mesh of a unit sphere. The sphere surface is uniformly sampled at every 45 degrees such that the mesh is composed of 26 vertices and 48 triangles. Shown below are some snippets of the .obj file for the mesh.

Export and Import (cont’d) The triangle mesh stored in a file is imported into the vertex and index arrays of the 3D application. As the mesh is composed of 48 triangles, the index array has 144 (48 times 3) elements.