CSL%20859:%20Advanced%20Computer%20Graphics - PowerPoint PPT Presentation

About This Presentation
Title:

CSL%20859:%20Advanced%20Computer%20Graphics

Description:

Can we turn any given model into a single strip? ... Amortize? At each frame apply only a fraction of the eligible ops. previous mesh. v5 ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 74
Provided by: sub8
Category:

less

Transcript and Presenter's Notes

Title: CSL%20859:%20Advanced%20Computer%20Graphics


1
CSL 859 Advanced Computer Graphics
  • Dept of Computer Sc. Engg.
  • IIT Delhi

2
Mesh
  • List of triangles
  • Each is a triplet of Vertices
  • Each is an array of attributes
  • Eulers relation
  • V F -2 E
  • Adjacency list
  • List of vertices
  • List of pointers
  • A vertex referred 6 times (closed model)

3
Vertex Topology
Vertex Attributes
C
..A.. ..B.. ..C.. ..D.. ..E.. ..F..
D
B
Topology
E
0 1 5 1 3 5 1 2 3 5 3 4 6 5 4 0 5 6
F
A
G
What order should we choose?
Post vertex shader cache
4
Triangle Strip
Vertex Attributes
C
..A.. ..B.. ..C.. ..D.. ..E.. ..F..
D
B
Topology
E
ABFDE AFGE BCD
F
A
Can we turn any given model into a single strip?
G
Would that eliminate the need for storing
topology?
5
Post Shader Cache
  • Perfect Triangle Strip of n triangles gt
  • 1 new vertex per triangle
  • n-2 cache misses
  • Can we do better?
  • Eulers law V F E 2
  • V 0.5F (E 1.5F for closed model)
  • Yes (Ideal 0.5verts/triangle)
  • Chhugani Kumar, I3D 2007

6
Vertex Arrays
  • Array of structures
  • Better triangle locality
  • Structure of arrays
  • Better shader locality

V0 x y z u v a b c
V1 x y z u v a b c
x0 x1 x2 x3
y0 y1 y2 y3
7
Half-Edge Data Structure
Vertex List
Face List
Edge List
..V0.. ..V1.. ..V2.. ..V3.. . .
E0 E2 E1 E5 E4 E3 . .
V0 V1, F0, E1 E2, E5 .. V1 V0, F1, E3 E4, E0 ..
V1
E5
E3
E2
F1
F0
E4
E0
E1
V0
8
Winged-Edge Data Structure
Vertex List
Face List
Edge List
..V0.., E0 ..V1.., E0 ..V2.., E1 ..V3.., E4 . .
E0 E4 . .
V0 V1, F0 F1, E1 E2, E3 E4 . .
V1
E3
F1
E2
Edge is oriented based on one of its faces left
or right
E0
F0
E4
E1
V0
9
Mesh Simplification
Ideally, the change is incremental
courtesy H. Hoppe
10
Nominal Framework
  • Pre-processing
  • Create and store levels in a data-structure
  • Rendering time
  • Decide the appropriate detail
  • Coarse or fine-grained
  • Output count or approximation error
  • Traverse DS to generate that detail
  • Render

11
Competing Goals
  • Computational Efficiency
  • Some pre-processing
  • Storage Efficiency
  • Quality
  • Error metrics
  • screen space vs object space
  • Geometry, attributes, appearance
  • Global vs local optimization
  • local may be faster
  • global may generate closer approximations

12
Attributes
  • Color
  • Normal Vectors
  • Texture Coordinates
  • Curvature
  • Material Properties

13
Topology Considerations
  • Manifold vs non-manifold
  • Topology preservation
  • important in some areas
  • if topology is changed, then we can
  • close holes in objects
  • join disconnected components
  • Shape and attribute appearance more important
    than topology

14
Possible Algorithm?
  • Subdivide space into cells
  • Choose a vertex to represent each cell
  • For each pair of cells
  • If two vertices in two cells have an edge
  • Connect the representative vertices
  • Borel, Rossignac 1993

15
Reduce Geometry Count
  • Remove a vertex
  • That leave a hole
  • Retriangulate the hole

Schroeder et al., 1992
16
Simple Operation
  • Collapse edges, one at a time

vt
vl
vr
vs
17
Simplification
13,546
500
152
150
M0
M1
M175
ecol0
ecoli
ecoln-1
courtesy H. Hoppe
18
Inverse?
parameters
vspl(vs ,vl ,vr , vs ,vt ,)


19
Reconstruction
Progressive Mesh (PM) representation
courtesy H. Hoppe
20
Continuous LOD
  • From PM, extract Mi of any size

3,478 faces?
M0
vspl0
vspl1
vspli-1
vspln-1
Mi
courtesy H. Hoppe
21
Vertex Correspondence
Mc
Mf
M0
v1
v1
Mn
v2
v2
v3
v3
v4
v5
v6
v7
v8
courtesy H. Hoppe
22
Space Overhead


vspl(vs ,vl ,vr , vs ,vt ,)
  • Attrib deltas
  • vt - vs
  • vs - vs


  • Topology
  • Index of vs
  • Pair of index offsets

23
Selective Refinement

M0
vspl0
vspl1
vspli-1
vspln-1
Whats the problem?
courtesy H. Hoppe
24
Parent-Child Correspondence
vs
vsplit
vu
vt
25
Vertex Hierarchy
vspl0
M0
vspl1
vspl2
vspl3
vspl4
vspl5
PM
v2
v1
v3
M0
Xia Varshney 96
26
Selective Refinement
vspl2
vspl0
M0
vspl1
vspl3
vspl4
vspl5
v2
v1
v3
M0
Restrictions?
27
Dependencies
vsplit
ecol
  • vsplit legal if vs, vl , and vr present
  • ecol legal if local neighbors present

Xia Varshney 96
28
Consistency
vsplit
ecol
vsplit legal if vs is active fn0,fn1,fn2,fn3
are active ecol legal if vs,vt are
active fn0,fn1,fn2,fn3 are adjacent
Hoppe 97
29
Rendering Algorithm
  • Start with the active front in previous frame.
  • Exploits frame coherence
  • For each vertex, decided refine or coarsen
  • If legal, perform operation, otherwise
  • Make vertex split legal by generating necessary
    vertices
  • Leave Edge collapses alone
  • Amortize?
  • At each frame apply only a fraction of the
    eligible ops

30
Rendering Algorithm
v1
v2
v3
M0
v5
v10
v11
v4
v8
v9
v7
v12
v13
v6
v12
v14
v15
31
LOD Algorithms
  • Simplification operator
  • Where should it be applied
  • No optimization
  • e.g., uniform grid cells
  • Greedy optimization
  • Sort edge collapses by error
  • Re-insert modified edges after each step
  • Lazy optimization
  • Re-insert a modified edge only when in front
  • Local vs Global optimization

32
Error Metric
  • Preserve appearance
  • Geometric shape
  • Scalar fields (e.g. color)
  • Discontinuity curves

courtesy H. Hoppe
33
Measuring Error
  • Geometric error
  • Distance between the original and simplified
    surface?
  • Volume between the surfaces?
  • Visual error
  • Color, normal, texture distortion
  • Silhouettes, background illumination
  • Semantics
  • Many others

34
Measuring Geometric Error
  • Surface-surface
  • Hausdorff distance
  • Vertex-surface vs
  • Vertex-plane
  • Vertex-vertex
  • Average distance or Max distance

35
Quadric Error
  • Garland Heckbert 1998
  • Measure error by deviation from shape
  • Vertices are at intersection of planes
  • Do not collapse edges
  • Merge vertices

vt
vs
36
Quadric Error Metric
  • Plane equation for a face
  • Distance to vertex v
  • Distance to vertex v

37
Quadric Error (contd)
  • Sum over all planes intersecting at v
  • Call it Q, the quadric error

38
Quadrics Based Simplification
  • Maintain quadric Q for every vertex
  • Assign Edge Quadrics

v1
v2


Q1
Q2
Q
Q
Q
2
1
  • Sort edges based on quadric error
  • Need position of resulting vertex
  • One of original vertices or mid-point?

39
Optimal Vertex Placement
  • Minimize Q to calculate optimal coordinates for
    placing new vertex

40
Boundary Preservation
  • Label boundaries
  • Form boundary plane perpendicular to face
  • Convert planes into quadrics
  • Weighted sum of quadrics
  • Scale border plane quadric higher

41
Preventing Mesh Inversion
  • Preventing foldovers
  • Adjacent face normals should not flip
  • Disallow foldover, or simply weight heavily

7
8
2
10
A
6
9
3
merge
1
5
4
42
Quadric Error Metric
  • Pros
  • Reasonably fast
  • Good fidelity even for drastic reduction
  • Robust -- handles non-manifold surfaces
  • Aggregation -- can merge objects
  • Cons
  • Introduces non-manifold surfaces
  • User controls virtual-edge collapse threshold
  • Increased running time due to search for
    potential pairs
  • Correct value varies with model density
  • Needs extension to handle color (7x7 matrices)

43
Result Bunny Model
69,451 triangles
1,000 triangles
100 triangles
1.4 of original size
0.14 of original size
courtesy Garland, Heckbert
44
Result Terrain Model
199,114 faces
999 faces (46 secs)
courtesy Garland, Heckbert
45
Method Comparison
Edge Contractions
Original model
(250 faces)
(4,204 faces)
Uniform Vertex Clustering
Pair Contractions
(262 faces)
(250 faces)
courtesy Garland, Heckbert
46
Image-Driven Simplification
  • Lindstrom Turk 2000
  • Compare simplifications to original via images
  • Collapse edge
  • Render from many views
  • Evaluate difference (need image metric)
  • Unrender and retry
  • Pick cheapest and apply

47
Image-Driven Simplification
  • Pros
  • Preserves appearance
  • Does not need to trade off geometric error
    against attribute error
  • Shading artifacts accounted for
  • Side effects
  • Drastically simplifies invisible regions!

48
Image-Driven Simplification
  • Cons
  • Very slow
  • Still many examples that breaks it
  • Hard to know how many images is enough
  • Hard to know how to evaluate images (RMS vs
    Bolin-Meyer)

49
Screen Space Error
  • Depends on location and orientation of error
    vector
  • We dont even store error vectors

50
Screen Space Error
e
?
y,z
es
y/z
Eye
Image Plane
51
Screen Space Error
e
LOD
d
p
viewing
plane
r
q
eye
52
Appearance Preservation
  • Preserve three appearance attributes
  • Surface Position
  • Surface Curvature
  • Material Color
  • Each may require different sampling

53
Normals Undersampled
1,749 triangles 10 pixels of surface deviation
13,433 triangles
54
Normals Properly Sampled
1,749 triangles, 10 pixels of deviation
13,433 triangles
55
Recall
v2, c2, n2
  • Filters surface position, colors, and normals
  • Must filter all three equally

v3, c3, n3
v1, c1, n1
v vertex coordinate (x,y,z) c color
(r,g,b) n normal (nx,ny,nz)
56
Decoupled Representation
texture map
v2, t2
c2
c1
c3
v1, t1
v3, t3
normal map
n2
v vertex coordinate (x,y,z) t texture
coordinate (u,v) c color (r,g,b) n normal
vector (nx,ny,nz)
n3
n1
57
Decoupled Approach
  • Simplification filters surface position and
    texture coordinates
  • Color and normal attributes filtered per-pixel
    (mip-mapping, etc.)

58
Sample Normal Map
polygonal surface patch
normal map
59
Texture Deviation Metric
mesh Mi
mesh Mi1
(i1)st edge collapse
Xi
Xi1
x
ei,i1(x) xi1 - xi Ei,i1 max
ei,i1(x) xÎP
P
2D texture domain
60
New Texture Coordinates
Invalid texnew
Valid choices lie in convex kernel
61
Texture Deviation Error
Texture Space
X
62
APS Levels-of-detail
7,809 tris
488 tris
975 tris
1,951 tris
3,905 tris
courtesy J. Cohen
63
Terrains
  • Uniform array of height values
  • May encode in raster formats (DEM, GeoTIFF)
  • Store Z instead of color
  • Easy to interpolate to find elevations
  • Easy view culling
  • There also are TINs
  • Triangulated Irregular Networks

64
TINs
  • Fewer polygons needed
  • Adaptively sampled
  • Precisely model maxima, minima, ridges, valleys,
    overhangs, caves

65
LOD Hierarchy Structures
QuadTree Hierarchy
BinTree Hierarchy
66
Quadtrees
  • Each quad is actually two triangles
  • Produces cracks and T-junctions
  • But simple

67
Bintrees
  • Binary Triangle tree
  • Right triangular irregular networks (RTIN)
  • longest edge bisection
  • Easier to avoid cracks and T-junctions
  • Neighbor must be at adjacent levels

68
Cracks and T-Junctions
  • Avoid cracks
  • Convert cracks into T-junctions
  • Fill cracks with extra triangles
  • Avoid T-junctions
  • Continue to simplify ...

69
Bin-tree and T-junction
70
Terrain as a Pyramid
  • Terrain as mipmap pyramid
  • LOD using nested grids

Coarsest Level
Finest Level
Losasso Hoppe 2005
71
Geometry Clip Maps
  • Transition region
  • Insert 0 area triangles
  • Damp refined vertices as they get close to the
    coarser level

72
Geometry Clip Maps
  • Transition region
  • Insert 0 area triangles
  • Damp refined vertices as they get close to the
    coarser level

73
Texture Mapping PM
  • Sander et al, 2001
Write a Comment
User Comments (0)
About PowerShow.com