advanced issues in level of detail. algorithms for generalized lods amitabh varshney graphics and...

90
Advanced Issues In Advanced Issues In Level Of Detail Level Of Detail

Upload: samuel-joseph

Post on 17-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Advanced Issues InAdvanced Issues InLevel Of DetailLevel Of Detail

Page 2: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Algorithms for Algorithms for Generalized LODsGeneralized LODs

Amitabh VarshneyAmitabh VarshneyGraphics and Visual Informatics LaboratoryGraphics and Visual Informatics Laboratory

Department of Computer ScienceDepartment of Computer ScienceUniversity of Maryland at College ParkUniversity of Maryland at College Park

http://www.cs.umd.edu/gvilhttp://www.cs.umd.edu/gvil

Page 3: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

LOD Algorithms ClassificationLOD Algorithms Classification

Rossignac & Borrel 93

He et al 96

El-Sana & Varshney 97

Schroeder 97

Garland & Heckbert 97

Rossignac & Borrel 93

He et al 96

El-Sana & Varshney 97

Schroeder 97

Garland & Heckbert 97

Luebke & Erikson 97

El-Sana & Varshney 99

Luebke & Erikson 97

El-Sana & Varshney 99

View-IndependentView-Independent View-DependentView-Dependent

Topology PreservingTopology Preserving

TopologySimplifyingTopology

Simplifying

Turk 92

Schroeder et al 92

Cohen et al 96

Hoppe 96

Cignoni et al 98

Lindstrom & Turk 99

Xia & Varshney 96

Hoppe 97

De Floriani et al 98

Gueziec et al 98

Klein et al 98

Page 4: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Geometry & Topology Geometry & Topology SimplificationsSimplifications

Geometry SimplificationGeometry Simplification– Reducing the number of geometric primitives Reducing the number of geometric primitives

(vertices, edges, triangles)(vertices, edges, triangles) Topology SimplificationTopology Simplification

– Reducing the number of holes, tunnels, cavitiesReducing the number of holes, tunnels, cavities Geometry + Topology SimplificationGeometry + Topology Simplification

– Aggressive simplificationsAggressive simplifications– May not be suitable for some applicationsMay not be suitable for some applications

Page 5: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications

Implementing View-dependent LODsImplementing View-dependent LODs

Variable-Precision RenderingVariable-Precision Rendering

Page 6: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications– View-Independent (Discrete) Simplification View-Independent (Discrete) Simplification

of Topologyof Topology– View-dependent Simplification of TopologyView-dependent Simplification of Topology

Implementing View-dependent LODsImplementing View-dependent LODs

Variable-Precision RenderingVariable-Precision Rendering

Page 7: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Why Discrete Simplification of Why Discrete Simplification of Topology?Topology?

Page 8: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Discrete Simplification of Discrete Simplification of TopologyTopology

Page 9: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Local AlgorithmsLocal Algorithms

Collapsing vertex pairs / virtual edgesCollapsing vertex pairs / virtual edges– Schroeder, Schroeder, Visualization 97Visualization 97

– Popovic and Hoppe, Popovic and Hoppe, Siggraph 97Siggraph 97

– Garland and Heckbert, Garland and Heckbert, Siggraph 97Siggraph 97

Collapsing primitives in a cellCollapsing primitives in a cell– Rossignac and Borrel, Rossignac and Borrel, Modeling in Comp. Graphics 93Modeling in Comp. Graphics 93

– Luebke and Erikson, Luebke and Erikson, Siggraph 97Siggraph 97

Page 10: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Global AlgorithmsGlobal Algorithms

Low-pass filtering in Volumetric domainLow-pass filtering in Volumetric domain– He He et al.,et al., Visualization 95Visualization 95

Rolling a sphere (LRolling a sphere (L22), cube (L), cube (L11, L, L– El-Sana and Varshney, El-Sana and Varshney, Visualization 97Visualization 97

Page 11: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Our Approach to Discrete Our Approach to Discrete Topology SimplificationTopology Simplification

Similar to Similar to -Hulls-Hulls Roll a sphere of radius Roll a sphere of radius over the object over the object

Fill-up regions inaccessible to the sphereFill-up regions inaccessible to the sphere

El-Sana and Varshney, Visualization 97, IEEE TVCG 98

Page 12: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Alpha PrismsAlpha Prisms

Alpha prismAlpha prism– Convolve triangle with Convolve triangle with -side -side

cube (Lcube (Lmetric)metric)– Convex polyhedronConvex polyhedron

Compute union of Compute union of prisms prisms– Fills-up all features less than Fills-up all features less than

Generate the surface from the unionGenerate the surface from the union

Page 13: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults

Page 14: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Concavities and ConvexitiesConcavities and Convexities

ConcavityConcavity ConvexityConvexity

Page 15: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults

OriginalOriginal FinalFinal

Page 16: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications– Discrete Simplification of TopologyDiscrete Simplification of Topology– View-dependent Simplification of TopologyView-dependent Simplification of Topology

Implementing View-dependent LODsImplementing View-dependent LODs

Variable-Precision RenderingVariable-Precision Rendering

Page 17: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Illumination- andIllumination- andView-Dependent DetailView-Dependent Detail

8192 triangles8192 triangles

537 triangles537 triangles

Page 18: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

View-Dependent View-Dependent Topology SimplificationTopology Simplification

Aggressive simplificationAggressive simplification

Varied topology simplificationVaried topology simplification

Connect different objectsConnect different objects

Efficient fold-over prevention policyEfficient fold-over prevention policy Real-timeReal-time

Page 19: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Edge and Vertex-Pair Edge and Vertex-Pair

CollapsesCollapses

H

G

PVertex-Pair CollapseVertex-Pair Collapse

Vertex SplitVertex Split

H

GP

Edge CollapseEdge Collapse

Vertex SplitVertex Split

EdgeEdge CollapseCollapse

Vertex-Pair CollapseVertex-Pair Collapse(Virtual Edge)(Virtual Edge)

Page 20: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Simplifying GenusSimplifying Genus

Allow virtual edge collapsesAllow virtual edge collapses Limit potentially O(nLimit potentially O(n22) virtual edges) virtual edges Typical constraints:Typical constraints:

– Delaunay edgesDelaunay edges

– Edges that span neighboring cells in a spatial Edges that span neighboring cells in a spatial subdivision: octree, grids, etc.subdivision: octree, grids, etc.

– Maximum edge lengthMaximum edge length

Page 21: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Virtual Virtual EdgesEdges

Subdivide the dataset into patchesSubdivide the dataset into patches– Initialize each triangle to a patchInitialize each triangle to a patch

– Merge two patches that:Merge two patches that: Share at least one edgeShare at least one edge Their normals differ less than thresholdTheir normals differ less than threshold

Construct Delaunay triangulation using Construct Delaunay triangulation using only the vertices on patch boundariesonly the vertices on patch boundaries

Page 22: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

View Dependence TreeView Dependence Tree Use an appropriate distance metricUse an appropriate distance metric Construct the set of virtual edgesConstruct the set of virtual edges Build a heap of all the edges (virtual and Build a heap of all the edges (virtual and

real) using the given metric.real) using the given metric. While not empty (heap)While not empty (heap)

– Extract (minimum) edgeExtract (minimum) edge– Collapse its two vertices Collapse its two vertices

Page 23: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

View Dependence TreeView Dependence Tree

Low Detail

High Detail

Hierarchy of vertex-pair collapsesHierarchy of vertex-pair collapses Different levels in this hierarchy represent Different levels in this hierarchy represent

different levels of detaildifferent levels of detail Construct the hierarchy offlineConstruct the hierarchy offline Run-time navigation involves:Run-time navigation involves:

– Vertex split: RefinementVertex split: Refinement

– Vertex collapse: SimplificationVertex collapse: Simplification

Page 24: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Run-time Run-time TraversalTraversalforfor each active node each active node nn dodo

switchswitch((NextStat(n)NextStat(n)){ ){ casecase SPLITSPLIT : : if if ( ( CanSplit(n)CanSplit(n))) Split(n);Split(n); casecase MERGEMERGE: : ifif ( ( CanMerge(n) && CanMerge(n) && CanMerge(Sibling(n)CanMerge(Sibling(n))) Merge(n);Merge(n); casecase STAY : // No Change on the active-nodes list } STAY : // No Change on the active-nodes list }

Page 25: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Simplification Factors Simplification Factors

Screen-space projectionScreen-space projection Local illuminationLocal illumination Visibility cullingVisibility culling Silhouette boundariesSilhouette boundaries Object SpeedObject Speed LOD transfer functionLOD transfer function Prevent fold-oversPrevent fold-overs

– Implicit DependenciesImplicit Dependencies

Page 26: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults

13.5K tris

2.0K tris 200 tris

8.2K tris

Page 27: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults

CloseClose FarFarEl-Sana and Varshney, Eurographics 99

Page 28: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults

Original (340K tris)Original (340K tris) Simplified (49K tris)Simplified (49K tris)

Auxilliary Machine Room DatasetAuxilliary Machine Room Dataset

Page 29: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Foveation ResultsFoveation Results

El-Sana and Varshney, Eurographics 99

Page 30: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications Implementing View-dependent LODsImplementing View-dependent LODs

– Explicit and Implicit DependenciesExplicit and Implicit Dependencies– Maintaining triangle stripsMaintaining triangle strips

Variable-Precision RenderingVariable-Precision Rendering

Page 31: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Mesh Folding Mesh Folding ProblemProblem

A

D

B

C

v1

v1 v1

v1v2

v2

v4

v4 v4

v4

v3v3(v2,v1)

(v3,v4) (v3,v4)

Page 32: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Explicit DependenciesExplicit Dependencies

a

b

cEdge CollapseEdge Collapse

Vertex SplitVertex Split

v0

v2

v1

vk

v0

vk

v2

v1

Neighborhood of an edge collapse is determined and fixed during preprocessing and used for validity checks at run-time

Page 33: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Explicit DependenciesExplicit Dependencies

Vertex splitVertex split– Vertex Vertex cc can split to can split to (a, b)(a, b) only if vertices only if vertices vv00 , v , v11 , , … … v vkk are are

present and adjacent to present and adjacent to c c at run-time.at run-time. Vertex-pair collapseVertex-pair collapse

– Vertex-pair Vertex-pair (a, b)(a, b) can collapse to vertex can collapse to vertex cc only when all the only when all the vertices vertices vv00 , v , v11 , , … … v vkk are present and adjacent to are present and adjacent to (a, b).(a, b).

a

b

Edge CollapseEdge Collapse

Vertex SplitVertex Split

v0

v2

v1vk c

v0

vk

v2

v1

Page 34: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Implicit DependenciesImplicit Dependencies

ObservationsObservations– Collapsibility graph is a Directed Acyclic GraphCollapsibility graph is a Directed Acyclic Graph– Validity check involves determining the age of a node Validity check involves determining the age of a node

relative to its neighborsrelative to its neighbors

SolutionSolution– Each node is assigned a unique integer asEach node is assigned a unique integer as id id– Assign new nodes progressively increasing id-numberAssign new nodes progressively increasing id-number

Page 35: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Implicit DependenciesImplicit Dependencies

VertexVertex vv can split if:can split if:– Its Its idid is greater than the is greater than the idid of all its neighbors of all its neighbors

Vertex-pair Vertex-pair (u, v)(u, v) can collapse to can collapse to w w if:if:– w w ’s ’s idid is less than the is less than the idid of the parents of the of the parents of the

neighbors of the two vertices (neighbors of the two vertices (uu,,vv))

Page 36: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Implicit DependenciesImplicit Dependencies Vertex needs to maintain only two values:Vertex needs to maintain only two values:

– Max ID of all its neighborsMax ID of all its neighbors– Min ID of parents of all its neighborsMin ID of parents of all its neighbors

Run-time checks become constant timeRun-time checks become constant time– check against the above two values instead of all neighbors check against the above two values instead of all neighbors

Localized memory accessesLocalized memory accesses– Eg: Stanford Dragon (871K triangles, 874K nodes) Eg: Stanford Dragon (871K triangles, 874K nodes)

avg memory access distance for dependency checks comes down avg memory access distance for dependency checks comes down to ~1 byte from 14 MB to ~1 byte from 14 MB

Page 37: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications Implementing View-dependent LODsImplementing View-dependent LODs

– Explicit and Implicit DependenciesExplicit and Implicit Dependencies– Maintaining triangle stripsMaintaining triangle strips

Variable-Precision RenderingVariable-Precision Rendering

Page 38: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Recent Research on Recent Research on Triangle StripsTriangle Strips

Akeley, Haeberli, Burns, Akeley, Haeberli, Burns, 1990 1990 Deering, Deering, Siggraph 95Siggraph 95

Arkin et al. Arkin et al. Visual Computer 96Visual Computer 96 Bar-Yehuda & Gotsman, Bar-Yehuda & Gotsman, ACM TOG 96ACM TOG 96

Evans, Skiena, Varshney,Evans, Skiena, Varshney,Visualization 96Visualization 96 Chow, Chow, Visualization 97Visualization 97

Duchaineau et al., Duchaineau et al., Visualization 97Visualization 97 Speckmann & Snoeyink, Speckmann & Snoeyink, CCCG 97CCCG 97

Gumhold & Strasser, Gumhold & Strasser, Siggraph 98Siggraph 98 Taubin et al., Taubin et al., Siggraph 98Siggraph 98

El-Sana, Azanli, Varshney, El-Sana, Azanli, Varshney, Visualization 99Visualization 99 Hoppe, Hoppe, Siggraph 99Siggraph 99

Xiang, Held, Mitchell, Xiang, Held, Mitchell, I3D I3D 9999 Velho et al., Velho et al., Visual Computer 99Visual Computer 99

Page 39: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Triangle Strip Triangle Strip

aa

bb

cc ee

dd

Triangles: (abc), (bcd), (cde)Triangles: (abc), (bcd), (cde)Triangle Strip: abcdeTriangle Strip: abcde

Page 40: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Generalized Triangle StripsGeneralized Triangle Strips

Triangle Strip: a b c d Triangle Strip: a b c d (swap)(swap) e f e f a b c d a b c d cc e f e f

Repeating vertices changes directionRepeating vertices changes direction

aa

bb

cc ee

dd

ff

Page 41: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Triangle Strips with LODsTriangle Strips with LODs

Triangle stripsTriangle strips– 2X speedup2X speedup– Hardware / Software supportHardware / Software support

Discrete LODsDiscrete LODs– Off-line computation of triangle strips per LODOff-line computation of triangle strips per LOD

View-dependent simplificationView-dependent simplification– Connectivity changes every frameConnectivity changes every frame– Requires run-time update of triangle stripsRequires run-time update of triangle strips

Page 42: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Edge Collapse in a Edge Collapse in a Triangle StripTriangle Strip

Repeating vertices can represent edge collapsesRepeating vertices can represent edge collapses

aa

bb

cc ee

dd ff

aa cc ee

b,db,d ff

(abcdef)(abcdef)

(abcbef)(abcbef)

Page 43: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Merge TreeMerge Tree

Merge TreeMesh9

1

25

6

7

810

3 4

1 2

1

3 4

3

5 6

5

7 8

7

9 10

9

1 5

1

Page 44: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Following Parent PointersFollowing Parent Pointers

1 2

1

3 4

3

5 6

5

7 8

7

9 10

9

1 5

1

Replace each Triangle Strip vertex by its closest active Replace each Triangle Strip vertex by its closest active ancestorancestor

Need efficient pointer hoppingNeed efficient pointer hopping

Page 45: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip ListsSkip Lists

Pugh [CACM 1990]Pugh [CACM 1990] Probabilistic balancingProbabilistic balancing Fast searchesFast searches Compressed treesCompressed trees

2 7 9 11 15 31 61 96

NIL

Page 46: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strip Data StructureSkip Strip Data Structure

Array of Skip Strip NodesArray of Skip Strip Nodes MergeMerge

– Increment p Increment p – Increment c Increment c

SplitSplit– Decrement p Decrement p – Decrement c Decrement c

c pVertex Info

c pVertex Info

c pVertex Info

c pVertex Info

c pVertex Info

•••

Collapse 1

Collapse 2

Collapse 3

Log nth Collapse

•••

Page 47: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Building a Skip StripBuilding a Skip Strip

1 2

1

3 4

3

1

c p4

c p3

c p2

c p1

Page 48: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Building a Skip StripBuilding a Skip Strip

1 2

1

3 4

3

1

c p4

c p3

c p2

c p1

Page 49: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Building a Skip StripBuilding a Skip Strip

1 2

1

3 4

3

1

c p4

c p3

c p2

c p1

Page 50: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strips with LODsSkip Strips with LODs

99

11

2255

66

77

881010

33 44

Triangle Strip A (7 6 4 5 3 2 1)Triangle Strip A (7 6 4 5 3 2 1)

Triangle Strip B (1 10 3 9 4 8 7)Triangle Strip B (1 10 3 9 4 8 7)

Page 51: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strip ExampleSkip Strip Example

1

2

3

4

5

6

7

8

9

10Highest Resolution

1 2 3 4 5 6 7 8 9 10

1 3 5 7 9

1 5

Triangle Strip A: 7 6 4 5 3 2 1 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: 7 6 4 5 3 2 1Display Strip A: 7 6 4 5 3 2 1Triangle Strip B: 1 10 3 9 4 8 7 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 8 7Display Strip B: 1 10 3 9 4 8 7

Page 52: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strip ExampleSkip Strip Example

1

2

3

4

5

6

7

8

9

10Lower Resolution

1 2 3 4 5 6 7 8 9 10

1 3 5 7 9

1 5

Triangle Strip A: 7 6 4 5 3 2 1 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: Display Strip A: 5 55 5 4 5 3 2 1 4 5 3 2 1Triangle Strip B: 1 10 3 9 4 8 7 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 Display Strip B: 1 10 3 9 4 5 55 5

Page 53: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strip ExampleSkip Strip Example

1

2

3

4

5

6

7

8

9

10

Triangle Strip A: 7 6 4 5 3 2 1 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: Display Strip A: 5 55 5 4 5 3 2 1 4 5 3 2 1Triangle Strip B: 1 10 3 9 4 8 7 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 Display Strip B: 1 10 3 9 4 5 55 5

Lower Resolution

1 2 3 4 5 6 7 8 9 10

1 3 5 7 9

1 5

Page 54: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Skip Strip ExampleSkip Strip Example

1

2

3

4

5

6

7

8

9

10

Triangle Strip A: 7 6 4 5 3 2 1 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: Display Strip A: 5 55 5 4 5 3 2 1 4 5 3 2 1Triangle Strip B: 1 10 3 9 4 8 7 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 Display Strip B: 1 10 3 9 4 5 55 5

Lower Resolution

1 2 3 4 5 6 7 8 9 10

1 3 5 7 9

1 5

Page 55: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Optimized Skip Strip ExampleOptimized Skip Strip Example

1

2

3

4

5

6

7

8

9

10

Triangle Strip A: 7 6 4 5 3 2 1 Triangle Strip A: 7 6 4 5 3 2 1 Display Strip A: Display Strip A: 5 55 5 4 5 3 2 1 4 5 3 2 1Triangle Strip B: 1 10 3 9 4 8 7 Triangle Strip B: 1 10 3 9 4 8 7 Display Strip B: 1 10 3 9 4 Display Strip B: 1 10 3 9 4 5 55 5

Lower Resolution

1 2 3 4 5 6 7 8 9 10

1 3 5 7 9

1 5

Page 56: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Real-Time DisplayReal-Time Display

Determine the display verticesDetermine the display vertices

Determine the display stripsDetermine the display strips– Determine which strips have changed Determine which strips have changed – Traverse the changed triangle stripsTraverse the changed triangle strips– Follow Skip Strip pointers to get appropriate ancestorsFollow Skip Strip pointers to get appropriate ancestors– Remove redundant verticesRemove redundant vertices

Page 57: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Efficient SkippingEfficient Skipping

Reduce the traversed non-active verticesReduce the traversed non-active vertices– Compress the traversed pathsCompress the traversed paths– Update the compressed paths in lazy fashionUpdate the compressed paths in lazy fashion– Cache the active path indexCache the active path index

EfficiencyEfficiency – We use only We use only O(log log n)O(log log n) jumps jumps

Page 58: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Results: TerrainResults: Terrain

255K tris255K tris 32K tris32K tris

255K tris255K tris 522K tris522K tris

Page 59: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Results: BunnyResults: Bunny

5K tris5K tris30K tris30K tris

30K tris30K tris 65K tris65K tris

El-Sana and Varshney, Visualization 99

Page 60: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Auxiliary Machine RoomAuxiliary Machine Room

65K tris 65K tris

170K tris 340K tris

El-Sana and Varshney, Visualization 99

Page 61: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults Skip Strips make execution of split and merge Skip Strips make execution of split and merge

operations more efficientoperations more efficient Applicable to any hierarchical vertex schemeApplicable to any hierarchical vertex scheme Four our four sample datasets:Four our four sample datasets:

– Skip Strips provided ~ 1.5 to 2.0 X improvement over sending Skip Strips provided ~ 1.5 to 2.0 X improvement over sending raw view-dependent trianglesraw view-dependent triangles

– Skip Strips provided ~ 1.6 to 1.7 X improvement over per-Skip Strips provided ~ 1.6 to 1.7 X improvement over per-frame greedy triangle strip generationframe greedy triangle strip generation

But we have not tested this with video memoryBut we have not tested this with video memory … …

Page 62: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

OutlineOutline

Geometry and Topology SimplificationsGeometry and Topology Simplifications

Implementing View-dependent LODsImplementing View-dependent LODs

Variable-Precision RenderingVariable-Precision Rendering

Page 63: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Defining Level of Defining Level of DetailDetail

NumberNumber of Primitives of Primitives

PrecisionPrecision of primitives of primitives–Colors (Heckbert 82, Xiang 97)–Normals (Deering 95, Zhang & Hoff 97)–Vertex coordinates (King & Rossignac 99)

Page 64: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Variable-Precision RenderingVariable-Precision Rendering

Reduce the precision of graphics primitivesReduce the precision of graphics primitives Relate the number of bits of input precision Relate the number of bits of input precision for a given display accuracyfor a given display accuracy Speedup 3D transformation and lightingSpeedup 3D transformation and lighting by taking advantage of SIMD parallelismby taking advantage of SIMD parallelism Explore spatio-temporal coherenceExplore spatio-temporal coherence

Page 65: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Related WorkRelated Work

Sugihara Sugihara 8989 Taubin & Rossignac Taubin & Rossignac 9898Milenkovic & Nackman Milenkovic & Nackman 9090 Taubin et al.Taubin et al. 98 98Rossignac & Borrel Rossignac & Borrel 9393 Li & Kuo Li & Kuo 98 98 Deering Deering 9595 Cohen-Or et al. Cohen-Or et al. 9999Fortune & Van Wyk Fortune & Van Wyk 9696 Bajaj et al. Bajaj et al. 9999Chow Chow 97 97 King & Rossignac King & Rossignac 9999Luebke & Erikson Luebke & Erikson 9797 Bajaj et al. Bajaj et al. 20002000

Fortune Fortune 9898 Pajarola & RossignacPajarola & Rossignac 2000 2000

Page 66: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Variable-Precision vs. Variable-Precision vs. MultiresolutionMultiresolution

Original Multiresolution Variable Precision

Page 67: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

AssumptionsAssumptions

• • Minimum-sized cube covering the objectMinimum-sized cube covering the object– x, y, z normalized to range [-1.0, 1.0]x, y, z normalized to range [-1.0, 1.0]

• • N-bit fixed-point representation of operandsN-bit fixed-point representation of operands

• • Rounding to the nearest integerRounding to the nearest integer

• • Worst-case studyWorst-case study

Page 68: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Error AnalysisError Analysis

• • Representation error of Representation error of

– Half bit, i.e., Half bit, i.e.,

• • Addition error of Addition error of

• • Multiplication error of Multiplication error of , i.e., lose one bit of accuracy

ba

ba

a

Page 69: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Error AnalysisError Analysis

• • Division error of Division error of ba

Page 70: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Putting it all togetherPutting it all together

Page 71: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

View-dependent View-dependent Transformation Transformation

• • Construct bounding volume hierarchyConstruct bounding volume hierarchy

• • Find the projected size of the objectFind the projected size of the object

• • Determine the nearest visible vertex accuracyDetermine the nearest visible vertex accuracy

Page 72: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

View-dependent View-dependent TransformationTransformation

Accuracy needed for each vertex:Accuracy needed for each vertex:

Compute by using bounding volume hierarchy

Page 73: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Spatio-temporal CoherenceSpatio-temporal Coherence

• • Spatial coherenceSpatial coherence– Using differences in neighboring verticesUsing differences in neighboring vertices– MM x’ = M (x + x’ = M (x + x) = M x + M x) = M x + M xx– Top-down octree traversalTop-down octree traversal

• • Temporal CoherenceTemporal Coherence– Frame-to-frameFrame-to-frame– M’M’ x = (M + x = (M + M) x = M x + M) x = M x + M xM x– Can be combined with spatial coherenceCan be combined with spatial coherence

Page 74: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Transformation ResultTransformation Result

Floating Point(32 bits/vertex coordinate)

Variable Precision(7.9 bits/vertex coordinate)

Page 75: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Variable-Precision LightingVariable-Precision Lighting

Page 76: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Sources of Illumination ErrorsSources of Illumination Errors

• • Operands with different accuracyOperands with different accuracy

• • Square-root operation errorSquare-root operation error

• • Specular exponentiation errorSpecular exponentiation error

Page 77: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Illumination ErrorsIllumination Errors

Operands and Operands and with different bits of accuracy:with different bits of accuracy:

• • Addition error of Addition error of

• • Multiplication error ofMultiplication error of

Same as in the addition case

ba

ba

a b' and )(for ' and )(for nnbnan

Page 78: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Illumination ErrorsIllumination Errors

Square-root operation error Square-root operation error

• • Fixed-point operation Fixed-point operation table lookup table lookup

• • 2n bits operand2n bits operand

• • Most significant n bits as indexMost significant n bits as index

Page 79: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Illumination ErrorsIllumination Errors

Specular exponentiation error of Specular exponentiation error of

• • Operand with bits accuracy, Operand with bits accuracy,

• • Error maximized by large ,Error maximized by large , , and , and

i.e., lose 6 bits of accuracy at most.

)( shina

a n 128shin

a a shin

Page 80: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Illumination ErrorsIllumination Errors

• • Dot-product of vectors lose 2 bits accuracyDot-product of vectors lose 2 bits accuracy

• • Putting it all togetherPutting it all together– Specular (least accurate) decides the overall accuracySpecular (least accurate) decides the overall accuracy– lose 1 bit for normalization, 2 bits for dot product, 6 bits for lose 1 bit for normalization, 2 bits for dot product, 6 bits for

exponentiationexponentiation– Total loss of accuracy: 9 bitsTotal loss of accuracy: 9 bits– So: So: m = n+9 m = n+9

(n = output accuracy, m = input accuracy)(n = output accuracy, m = input accuracy)

Page 81: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Incremental LightingIncremental Lighting

The error of using L2’ as an estimate of L2 is in the order of

L1 V||

VV

L2

L2’

v1

v2

L2

2

1

2

2 LV

Page 82: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Implementation NotesImplementation Notes

Vertices processed in groups as a tradeoff betweenVertices processed in groups as a tradeoff between– L2 cache sizeL2 cache size– Expensive cost of resetting MMX register flag between Expensive cost of resetting MMX register flag between

changes in operand typeschanges in operand types

Avoid error buildupAvoid error buildup– Matrix setup and composition per frame is full precisionMatrix setup and composition per frame is full precision– Transformations are variable precisionTransformations are variable precision– Computation cost is negligibleComputation cost is negligible

Page 83: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Results: VenusResults: Venus

Floating Point

Variable Precision Hao and Varshney, ACM I3D 2001

Page 84: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

Results: VenusResults: Venus

Floating Point Variable Precision

Page 85: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults Auxiliary Machine Room Auxiliary Machine Room

Floating Point

Variable Precision

Page 86: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ResultsResults Auxiliary Machine Room Auxiliary Machine Room

Floating Point

Close-up

Variable PrecisionClose-up

Page 87: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ConclusionsConclusions

More efficient transformation and lightingMore efficient transformation and lighting

Complementary to multiresolution approachesComplementary to multiresolution approaches

For the datasets we testedFor the datasets we tested– Using PII 400MHz PC with 128M RAMUsing PII 400MHz PC with 128M RAM– Voodoo3 3500 graphics card and Glide APIVoodoo3 3500 graphics card and Glide API– Provides a factor of 4 or more speedup Provides a factor of 4 or more speedup

Page 88: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

SoftwareSoftware

http://www.cs.umd.edu/gvil/vpr.htmlhttp://www.cs.umd.edu/gvil/vpr.html

Download free for non-commercial useDownload free for non-commercial use

Page 89: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

ConclusionsConclusionsConclusionsConclusions

Discrete and View-dependent LODs for simplifications

of geometry and topology

Implicit Dependencies for localizing data accesses

Skip Strips: Updating triangle strips with view-

dependent LODs

Variable-Precision transformations and lighting

Discrete and View-dependent LODs for simplifications

of geometry and topology

Implicit Dependencies for localizing data accesses

Skip Strips: Updating triangle strips with view-

dependent LODs

Variable-Precision transformations and lighting

Page 90: Advanced Issues In Level Of Detail. Algorithms for Generalized LODs Amitabh Varshney Graphics and Visual Informatics Laboratory Department of Computer

AcknowledgementsAcknowledgementsAcknowledgementsAcknowledgements

National Science FoundationNational Science Foundation

Dept of DefenseDept of Defense

Honda R & D, North AmericaHonda R & D, North America

General DynamicsGeneral Dynamics

UMIACS, University of MarylandUMIACS, University of Maryland

Stanford Graphics LabStanford Graphics Lab

Cyberware, Inc.Cyberware, Inc.

National Science FoundationNational Science Foundation

Dept of DefenseDept of Defense

Honda R & D, North AmericaHonda R & D, North America

General DynamicsGeneral Dynamics

UMIACS, University of MarylandUMIACS, University of Maryland

Stanford Graphics LabStanford Graphics Lab

Cyberware, Inc.Cyberware, Inc.