7 - Models - Object Modeling Flashcards
Mesh
approximation of an object’s surface with a number of connected polygons (faces).
A polygon mesh consists of the following properties:
* A set of vertices.
* A set of edges: Two edges are chained if they share one vertex.
* A set of faces (polygons)
Types of mesh :
triangle mesh, and quadrangle mesh (made of quadrilaterals).
The more polygons in a mesh, the “smoother” the object appears.
Surface Nomals
vectors perpendicular to the surface.
Computed for each face and averaged at the vertices
They give a better representation of the curvature of an object.
A polygon mesh MUST satisfy what
The intersection of two faces is either empty, a vertex, or an edge.
The faces must have consistent normals (either facing outward or inward – defining the same “outward” direction)
Manifold meshes:
every edge must be shared by exactly 2 faces (except for the border edges).
The faces must have consistent normals (the same direction)
Triangle Meshes
- GL_TRIANGLES (3n vertices)
- GL_TRIANGLE_STRIP (n + 2 vertices)
- GL_TRIANGLE_FAN (n + 1 vertices)
Why do we not do explicit representation for a triangle mesh, how do we deal with it?
Leads to redundant data (each vertex is shared by multiple triangles)
Requires 3x3xn = 9n floats for n triangles
Use a vertex array instead, by specifying that we are drawing triangles.
Vertex Buffer Objects
these are arrays that can remain in GPU memory.
Drawing with arrays is more efficient, but the whole array still has to be sent to GPU every time it’s drawn.
VBOs can remain in the GPU.
Shared Vertex Representation (redundant)