geometric representations
play

Geometric Representations 3D Graphics Motivation Geometric - PowerPoint PPT Presentation

Geometric Representations 3D Graphics Motivation Geometric representation What do we want to do? empty space (typically 3 ) B geometric object B 3 Fundamental problem The Problem: d B infinite number of


  1. Geometric Representations 3D Graphics

  2. Motivation

  3. Geometric representation • What do we want to do? empty space ℝ 𝑒 (typically ℝ 3 ) B geometric object B  ℝ 3

  4. Fundamental problem • The Problem: ℝ d B infinite number of points my computer: 8GB of memory We need to encode a continuous model with a finite amount of information

  5. Where does this problem occur? • Reconstruction from real data • Modeling or analyses based on acquired scenes • Procedural modeling • Automatic modeling of structured scenes or objects • Interactive modeling • Develop tools for computer artists

  6. Overview Volume Representation Surface Representation • Voxel grid • Level sets Implicit • Tetrahedral meshes • Spline surfaces Parametric • Subdivision surfaces • Primitive meshes • Triangle meshes

  7. Volume representations

  8. Volume Definition: compact subset of ℝ 3

  9. Interest of volumetric representation • Allows to model interior information of shapes, e.g. shape densities, colors etc. • For modeling and simulation, can constrain unrealistic shape variation • Many of the models used in graphics (animals, plants) are volumetric in reality

  10. Implicit voxel grid • Defined by function 𝐺: ℝ 3 → ℝ • Discretized voxel grid assigns a value 𝑤 to position (𝑦, 𝑧, 𝑨)

  11. Implicit voxel grid Advantages Disadvantages • Straight forward to • Difficult to modify extract or change value shape as no high-level 𝑤 associated to position information is available (𝑦, 𝑧, 𝑨) • For irregular shapes, requires voxelization of large volume

  12. Parametric tetrahedral mesh Defined by a function 𝑔: Ω → ℒ with Ω ⊂ ℝ 3 ℒ ⊂ ℝ 3 = volume of interest

  13. Parametric tetrahedral mesh Advantages Disadvantages • Allows to modify the • Difficult to store shape by changing the associated information 𝑤 associated to position mapping function (𝑦, 𝑧, 𝑨) at non-vertex • Used for deformations positions and simulations • Interpolating values requires computation

  14. Surface representations

  15. Surface Definition: orientable 2D manifold embedded in ℝ 3 Intuitively: • Boundary surface of non- degenerate 3D solid • Non-degenerate: no infinitely thin parts, i.e. solid has a clearly defined interior and exterior

  16. Implicit Level Sets • Defined by function 𝐺: ℝ 3 → ℝ • Discretized voxel grid assigns a distance 𝑒 from the surface to each position (𝑦, 𝑧, 𝑨)

  17. Implicit Level Sets Advantages Disadvantages • Straight forward to • Difficult to modify extract or change value surface as no high-level 𝑤 associated to position information is available (𝑦, 𝑧, 𝑨) • For irregular shapes, • Allows for fast Boolean requires voxelization of operations of surfaces large volume

  18. Parametric Surface Representations Defined by a function 𝑔: Ω → ℒ with Ω ⊂ ℝ 2 ℒ ⊂ ℝ 3 = full embedding space

  19. Spline surfaces • Parameter domain Ω = 𝑣 𝑜 , 𝑣 𝑛 × 𝑤 𝑜 , 𝑤 𝑙 𝑜 (. ) • Polynomial or rational basis functions 𝑂 𝑗 𝑛 σ 𝑘=0 𝑜 𝑣 𝑂 𝑜 𝑤 𝑙 • 𝑣, 𝑤 → σ 𝑗=0 𝑑 𝑗𝑘 𝑂 𝑗 𝑘 • 𝑑 𝑗𝑘 are called control points and define a control mesh Historic example « Utah teapot »

  20. Spline Surfaces Advantages Disadvantages • Allows to model • Difficult to fit to smooth surfaces acquired scan data efficiently • Easy to evaluate points at any position • Allows for deformation by changing control points

  21. Subdivision surfaces • Topology defined by the control polygon • Progressive refinement (interpolation or approximation) Butterfly Loop Catmull-Clark 21

  22. Subdivision surfaces • Like splines, they are hence controlled by coarse control mesh • Each step involves • Subdivision (insertion of new vertices) • Adjustment of vertex positions (new only for interpolation schemes, all for approximation schemes) • Provably converge to smooth limit surfaces

  23. Subdivision Surfaces Advantages Disadvantages • Arbitrary geometry and • No parameterization topology can be • Some unexpected modeled results • Approximation at different level of detail Loop

  24. Primitive meshes • Primitive Meshes • Collection of geometric primitives • Triangles • Quadrilaterals • Typically, primitives are parametric surfaces • Composite model: • Mesh encodes topology, rough shape • Primitive parameter encodes local geometry • Triangle meshes rule the world (including “triangle soups”)

  25. Primitive meshes  1  2  3 • Complex Topology for Parametric Models • Mesh of parameter domains attached in a mesh • Domain can have complex shape (“trimmed patches”) • Separate mapping function f for each part (typically of the same class)

  26. Primitive meshes Advantages Disadvantages • Compact representation • Need to specify a mesh (usually) first, then edit geometry • Can represent arbitrary • Problems topology • Mesh structure needs to be adjusted to fit shape • Mesh encodes object topology  Changing object topology is difficult • Examples • Surface reconstruction • Fluid simulation (surface of splashing water)

  27. Special case: Triangle mesh

  28. Triangle meshes • (Probably) most common representation • Simplest surface primitive that can be assembled into meshes • Rendering in hardware (z-buffering) • Simple algorithms for intersections (raytracing, collisions) • Piecewise linear surface representation • Each triangle (𝒃, 𝒄, 𝒅) defines points 𝒒 = α𝒃 + β𝒄 + γ𝒅 with α + β + γ = 1, α + β + γ > 0

  29. Attributes • How to define a triangle? • We need three points in ℝ 3 (obviously). • But we can have more: per-vertex normals (represent smooth surfaces more accurately) texture per-vertex texture coordinates per-vertex color (etc...)

  30. Shared Attributes in Meshes In Triangle Meshes: • Attributes might be shared or separated: adjacent triangles adjacent triangles share normals have separated normals

  31. “Triangle Soup” • Variants in triangle mesh representations: • “ Triangle Soup ” • A set S = { t 1 , ..., t n } of triangles • No further conditions • Does not represent a surface • Triangle Meshes : Additional consistency conditions • Conforming meshes: Vertices meet only at vertices • Manifold meshes: No intersections, no T-junctions

  32. Conforming Meshes • Conforming Triangulation: • Vertices of triangles must only meet at vertices, not in the middle of edges: • This makes sure that we can move vertices around arbitrarily without creating holes in the surface

  33. Manifold Meshes Triangulated two-manifold: • Every edge is incident to exactly 2 triangles (closed manifold) • ...or to at most two triangles (manifold with boundary) • No triangles intersect (other than along common edges or vertices) • Two triangles that share a vertex must share an edge

  34. Attributes • In general: • Vertex attributes: • Position (mandatory) • Normals • Color • Texture Coordinates • Face attributes: • Color • Texture • Edge attributes (rarely used) • E.g.: Visible line

  35. In-class exercise

  36. In-class exercise • How would you describe a triangle mesh whose attributes are only vertex positions? • What data structure would you use? • What are the advantages and disadvantages?

  37. Some common data structures • List of vertices, triangles, edges • Half-edge data structure

  38. Simple data structure • The simple approach: List of vertices, edges, triangles v 1 : (posx posy posz), attrib 1 , ..., attrib nav ... v nv : (posx posy posz), attrib 1 , ..., attrib nav e 1 : (index 1 index 2 ), attrib 1 , ..., attrib nae ... e ne : (index 1 index 2 ), attrib 1 , ..., attrib nae t 1 : (idx 1 idx 2 idx 3 ), attrib 1 , ..., attrib nat ... t nt : (idx 1 idx 2 idx 3 ), attrib 1 , ..., attrib nat

  39. Pros & Cons Advantages: Disadvantages: • Simple to understand and • Dynamic operations are build expensive: • Removing or inserting a • Provides exactly the vertex information necessary for  renumber expected rendering edges, triangles • Adjacency information is one-way • Vertices adjacent to triangles, edges  direct access • Any other relationship  need to search • Can be improved using hash tables (but still not dynamic)

  40. Adjacency data structures Alternative: • Some algorithms require extensive neighborhood operations (get adjacent triangles, edges, vertices) • ...as well as dynamic operations (inserting, deleting triangles, edges, vertices) • For such algorithms, an adjacency based data structure is usually more efficient • The data structure encodes the graph of mesh elements • Using pointers to neighboring elements

  41. First try... • Straightforward Implementation: • Use a list of vertices, edges, triangles • Add a pointer from each element to each of its neighbors • Global triangle list can be used for rendering • Remaining Problems: • Lots of redundant information – hard to keep consistent • Adjacency lists might become very long • Need to search again (might become expensive) • This is mostly a “theoretical problem” (O(n) search)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend