graphics' data structures
DESCRIPTION
TRANSCRIPT
Virtual modelsand Data StructuresIng. Andrés Adolfo Navarro Newball, MSc, PhD
Senior Lecturer and ResearcherPontificia Universidad Javeriana, Cali, Colombia
Point
Computer Science Department, Pontificia Universidad Javeriana, Cali
Z
X
Y
(x, y, z)
Line
Computer Science Department, Pontificia Universidad Javeriana, Cali
(x2, y2, z2)
Z
X
Y
(x1, y1, z1)
Polygon
Computer Science Department, Pontificia Universidad Javeriana, Cali
(x2, y2, z2)
Z
X
Y
(x1, y1, z1)
(x3, y3, z3)
Mesh
Computer Science Department, Pontificia Universidad Javeriana,
Cali
Creación de mallas Technique Description Advantages DisadvantagesStraightforward modelling
Pulling vertices around To generate new sets of polygons means reactivating whatever modelling procedure was used to create the original polygons
TediousNot very useful in practice
3D digitiser or equivalent manual strategy
Convert real objects into polygon meshes. Manual strategy: drawing a net of vertices over the surface of the object. The vertices are defined where net lines intersectDigitiser: the 3D coordinates of the vertices are input using a 3D digitiser
Automatic device such as laser ranger
Convert real objects into polygon meshes. The object is placed in a rotating table in the path of the bean and the table also moves down and up.A skinning algorithm operates on pairs of obtained contours converts data into very large number of triangles.
They generate a big number of triangles.As concavities may not be hit by the bean, they can only model convex objects accurately.
From mathematical description (procedural)
Generate a model from definitions with mathematical formulas.
Sweeping Generate model from definitions with interaction curves defined mathematically. For example, using cross sections or rail product surfaces
Only real option with user interaction
Estructuras de datos para mallas Dos puntos de vista
Como se almacenan en disco? Formatos comunes
Estructura de datos en memoria
Formatos comunes“The data structure for a complex object can’t be written by
hand. There are a lot of programs that help to create 3D meshes in a very quick way” (Vitulli (2005))
De alguna manera todos deben indicar como crear unir puntos con líneas para crear el poliedro (malla)
3DS .X FBX WRL obj
3DS A series of blocks called chunks which
contain all the information necessary to describe a scene
The name of the object, the vertices coordinates and the list of polygons
Chunks are dependent on others creating a tree structure and their relative parents have to be read first
Only the chunks required by the user or application have to be read
Main Chunk
3D Editor chunk
Object block Material block Key framer
Triangular mesh
Vertices list
Faces description
Local coordinates
Mapping coordinates
Camera
Light
.X Formato de Direct X utilizado por direct
3D Describe geometría, jerarquías de
cuadros, animaciones
FBX Formato de Autodesk para intercambiar
3D entre varios de sus productos Especificación de un SDK para
desarrolladores
WRL Mi favorito por su simpleza Formato de VRML
Representación de objetos We needed an adequate method to represent
the surface of a 3D object A surface separates the interior from the
exterior by a boundary To generate a mathematical surface we need
to establish continuity and neighbourhood relationships between samples
These representations are just approximations In order to decrease the error one can use
more segments or sub-regions.
Representación de objetos Operations required:
Evaluation: sampling of the surface and its attributes
Query: identify if a given point is inside or outside
Modification: surface deformations or topology changes
Representación de objetos Paramétrica:
Vector valued parameterisation function Mejores para evaluación y modificación
Implícita Zero set of a scalar valued function Mejores para query
Mallas poligonales Approximate a surface by a mesh of
planar polygonal facets Low complexity representations more
efficient for rendering Triangular meshes remain the most
used structure for 3D modelling Generación paramétrica Sopa de triángulos
Mallas triangulares Frequently, coarse collection without a
mathematical representation Little connectivity information (triangle
soups), inconsistent normal orientations, gaps, intersecting patches and degenerate elements
Mallas triangulares The valence of a vertex is the number of vertices
in its neighbourhood. In semi-regular triangular meshes, most of the
vertices have a valence of 6 Extraordinary vertices: vertices with a different
valence A triangle mesh is two-manifold, if it does neither
contain non-manifold edges or nonmanifold vertices, nor self-intersections
A non-manifold edge has more than two incident triangles
Triangle strips Triangle strips increase code efficiency. After the
first triangle is defined using three vertices, each new triangle can be defined by only one additional vertex, sharing the last two vertices defined for the previous triangle.
Triangle strips reduce the amount of data needed to create a series of triangles. The number of vertices stored in memory is reduced from 3N to N+2, where N is the number of triangles to be drawn. This allows for less use of disk space, as well as making them faster to load into RAM.
Computer Science Department, Pontificia Universidad Javeriana,
Cali
Triangle strips ABC, CBD, CDE, and EDF. However, using a triangle strip, they can be
stored simply as a sequence of vertices ABCDEF.
Computer Science Department, Pontificia Universidad Javeriana,
Cali
Estructuras de datos La solución simple
Arreglos Un arreglo de coordenadas Un arreglo de uniones
Efficient data structures allow local and global traversal of a mesh. Operations include: Access and enumeration of individual vertices, edges,
faces. Oriented traversal of edges of a face (next edge in a
face). Access to at least one face attached to a given vertex.
Lista enlazada Alan Watt
Jerarquía objeto – superficie – polígono Detalles de los vértices se almacenan una
vez polígonos pueden compartir el mismo
vértice a menos que los vértices sean compartidos por dos superficies
Almacena normales de polígonos y vértices
Lista enlazada Escena:
Lista de objetos Un objeto esta construido por una lista de
superficies Cada superficie se representa con una malla
poligonal Un polígono se define con una serie de vértices
definidos en sentido contrario de las manecillas del reloj. Orden requerido para la normal
Los detalles de cada vértice se almacenan en una lista del objeto. Accesibles al tope
Lista enlazada
Halfedge data structure
Direct edges Most efficient to deal with triangular
meshes Based on indices as references to each
element where indexing follows rules that implicitly encode connectivity information
No explicit representation of edges
Direct edges Each edge is represented into two
opposing halfedges consistently oriented counter clockwise
Direct edges
Direct edges Groups the three halfedges belonging to a
common triangle Additional information is explicitly stored in
arrays. For each vertex, the index of an outgoing
halfedge is stored For each halfedge, the index of its opposite half
edge and the index of the vertex the halfedge points to are stored
Boundaries are managed with special negative indices
Referencias Paul Bourke. Data formats
http://local.wasp.uwa.edu.au/~pbourke/dataformats/ Vitulli, D. (2005). Spacesimulator.net.
http://www.spacesimulator.net/. 3D Computer Graphics. Alan Watt Botsch M., Pauly M., Kobbelt, L., Alliez P., Lévy B.
Geometric Modeling Based on Polygonal Meshes. SIGRAPH Courses, 2007
Navarro Newball, A. A., Wyvill, G., and McCane, B. (2008a). Efficient Mesh Generation
Using Subdivision Surfaces. Sistemas & Telem´atica, 6 (12), 111–126.