Graphics' Data Structures
Upcoming SlideShare
Loading in...5
×
 

Graphics' Data Structures

on

  • 2,134 views

 

Statistics

Views

Total Views
2,134
Views on SlideShare
1,570
Embed Views
564

Actions

Likes
0
Downloads
11
Comments
0

1 Embed 564

http://aannewball.wikispaces.com 564

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Graphics' Data Structures Graphics' Data Structures Presentation Transcript

  • Virtual modelsand Data StructuresIng. Andrés Adolfo Navarro Newball,MSc, PhDSenior Lecturer and ResearcherPontificia Universidad Javeriana, Cali,Colombia
  • Computer Science Department, Pontificia Universidad Javeriana, CaliPoint Z (x, y, z) X Y
  • Computer Science Department, Pontificia Universidad Javeriana, CaliLine Z(x1, y1, z1) (x2, y2, z2) X Y
  • Computer Science Department, Pontificia Universidad Javeriana, CaliPolygon Z (x1, y1, z1) (x2, y2, z2) (x3, y3, z3) X Y
  • Computer Science Department, Pontificia Universidad Javeriana, CaliMesh
  • Creación de mallas Technique Description Advantages Disadvantages Straightforward Pulling vertices around To generate new sets of Tedious modelling polygons means reactivating Not very useful in practice whatever modelling procedure was used to create the original polygons 3D digitiser or Convert real objects into polygon meshes. equivalent manual Manual strategy: drawing a net of vertices strategy over the surface of the object. The vertices are defined where net lines intersect Digitiser: the 3D coordinates of the vertices are input using a 3D digitiser Automatic device Convert real objects into polygon meshes. They generate a big number such as laser The object is placed in a rotating table in of triangles. ranger the path of the bean and the table also As concavities may not be hit moves down and up. by the bean, they can only A skinning algorithm operates on pairs of model convex objects obtained contours converts data into very accurately. large number of triangles. From Generate a model from definitions with mathematical mathematical formulas. description (procedural) Sweeping Generate model from definitions with Only real option with user interaction curves defined mathematically. interaction For example, using cross sections or rail product surfaces
  • Estructuras de datos paramallas 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 Mapping coordinates Local coordinatesVertices list Camera Faces description 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
  • Computer Science Department, Pontificia Universidad Javeriana, CaliTriangle 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, CaliTriangle strips ABC, CBD, CDE, and EDF. However, using a triangle strip, they can be stored simply as a sequence of vertices ABCDEF.
  • 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ígonospueden 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 Eachedge 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/dataforma ts/ 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.