silhouette clipping

69
Silhouette Clipping Silhouette Clipping Pedro V. Sander Pedro V. Sander Xianfeng Gu Xianfeng Gu Steven J. Gortler Steven J. Gortler Harvard University Harvard University Hugues H. Hoppe Hugues H. Hoppe John M. Snyder John M. Snyder Microsoft Research Microsoft Research

Upload: thom

Post on 23-Feb-2016

84 views

Category:

Documents


0 download

DESCRIPTION

Silhouette Clipping. Pedro V. Sander Xianfeng Gu Steven J. Gortler Harvard University. Hugues H. Hoppe John M. Snyder Microsoft Research. poor silhouette. + texture/bump map. Mesh simplification. original mesh. coarse mesh. Silhouette clipping. original mesh. coarse mesh. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Silhouette Clipping

Silhouette ClippingSilhouette Clipping

Pedro V. SanderPedro V. SanderXianfeng GuXianfeng Gu

Steven J. GortlerSteven J. Gortler

Harvard UniversityHarvard University

Hugues H. HoppeHugues H. HoppeJohn M. SnyderJohn M. Snyder

Microsoft ResearchMicrosoft Research

Page 2: Silhouette Clipping

Mesh simplificationMesh simplification

original meshoriginal mesh+ texture/bump map+ texture/bump map

poorpoorsilhouettesilhouette

coarse meshcoarse mesh

Page 3: Silhouette Clipping

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clipping

original meshoriginal mesh coarse meshcoarse mesh+ texture/bump map+ texture/bump map

Page 4: Silhouette Clipping

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clipping

original meshoriginal mesh coarse meshcoarse mesh+ texture/bump map+ texture/bump map

Page 5: Silhouette Clipping

Silhouette clipping demoSilhouette clipping demo

Page 6: Silhouette Clipping

normal maporiginal mesh

rendered

coarse mesh

OverviewOverview

[Soucy et al 96][Soucy et al 96][Cignoni et al 98][Cignoni et al 98][Cohen et al 98][Cohen et al 98]

Page 7: Silhouette Clipping

normal map stencil mask

edge hierarchy

original mesh

rendered

coarse hull

2D silhouette

RuntimePreprocess

OverviewOverview

Page 8: Silhouette Clipping

normal map silhouetteclipped

edge hierarchy

original mesh

rendered

coarse hull

2D silhouette

RuntimePreprocess

OverviewOverview

Page 9: Silhouette Clipping

Major contributionsMajor contributions Progressive hullProgressive hull Texture creationTexture creation Silhouette extractionSilhouette extraction Stencil settingStencil setting

Page 10: Silhouette Clipping

Major contributionsMajor contributions Progressive hullProgressive hull Texture creationTexture creation Silhouette extractionSilhouette extraction Stencil settingStencil setting

Page 11: Silhouette Clipping

Major contributionsMajor contributions Progressive hullProgressive hull Texture creationTexture creation Silhouette extractionSilhouette extraction Stencil settingStencil setting

Page 12: Silhouette Clipping

Major contributionsMajor contributions Progressive hullProgressive hull Texture creationTexture creation Silhouette extractionSilhouette extraction Stencil settingStencil setting

Page 13: Silhouette Clipping

Major contributionsMajor contributions Progressive hullProgressive hull Texture creationTexture creation Silhouette extractionSilhouette extraction Stencil settingStencil setting

Page 14: Silhouette Clipping

Coarse hullCoarse hull

Given mesh, create coarse mesh that encloses it.Given mesh, create coarse mesh that encloses it.

Original meshOriginal mesh Coarse hullCoarse hull

Page 15: Silhouette Clipping

Progressive hullProgressive hull

Progressive mesh sequenceProgressive mesh sequence Every mesh encloses all finer meshes.Every mesh encloses all finer meshes.

Page 16: Silhouette Clipping

Edge collapseEdge collapse

Perform greedy sequence of collapses.Perform greedy sequence of collapses. Ensure new mesh encloses old mesh:Ensure new mesh encloses old mesh:

Linear programming problem Linear programming problem

M i M

i-1

Page 17: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 18: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 19: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 20: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 21: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 22: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

Page 23: Silhouette Clipping

Linear programming (2D)Linear programming (2D)

new vertexnew vertexpositionposition

Page 24: Silhouette Clipping

Progressive hull demoProgressive hull demo

Page 25: Silhouette Clipping

Texture creationTexture creation

normal maporiginal mesh

rendered

coarse hull

[Cignoni et al 98][Cignoni et al 98][Soucy et al 96][Soucy et al 96]

Page 26: Silhouette Clipping

Texture creationTexture creation

closest-pointclosest-point[Cignoni et al 98][Cignoni et al 98]

vertex normalsvertex normals

normal-shootingnormal-shootingOursOurs

originaloriginalcoarsecoarse

Page 27: Silhouette Clipping

Silhouette extractionSilhouette extraction

Given mesh and viewpoint, return edges on silhouette.Given mesh and viewpoint, return edges on silhouette.

Page 28: Silhouette Clipping

What is a silhouette edge?What is a silhouette edge?

Edge is on silhouette iff Edge is on silhouette iff oneone adjacent adjacent triangle faces towards viewpoint:triangle faces towards viewpoint:

not silhouettenot silhouette silhouettesilhouette

Page 29: Silhouette Clipping

Related schemesRelated schemes Brute force: Brute force: O(edges)O(edges)

but O(edges on silhouette) but O(edges on silhouette) O( O(edges) !edges) ! [Markosian et al 97][Markosian et al 97]

probabilisticprobabilistic [Gooch et al 99] [Gooch et al 99]

assumes orthographic viewassumes orthographic view [Barequet et al 99] [Hertzmann & Zorin 00][Barequet et al 99] [Hertzmann & Zorin 00]

dual-space formulation dual-space formulation

[Kumar et al 96] [Johannsen & Carter 98] [Kumar et al 96] [Johannsen & Carter 98] backface cullingbackface culling

Ours: optimized hierarchy of anchored conesOurs: optimized hierarchy of anchored cones extracts 3,500 sil edges of 10,000 edges at 250 fpsextracts 3,500 sil edges of 10,000 edges at 250 fps

Page 30: Silhouette Clipping

Hierarchical cullingHierarchical culling

Each node contains:Each node contains: cluster of mesh edgescluster of mesh edges spatial culling primitivespatial culling primitive

Page 31: Silhouette Clipping

Hierarchical cullingHierarchical culling

Each node contains:Each node contains: cluster of mesh edgescluster of mesh edges spatial culling primitivespatial culling primitive

Page 32: Silhouette Clipping

Spatial culling primitiveSpatial culling primitiveGiven cluster of edges,Given cluster of edges,

check if there are no silhouette edges.check if there are no silhouette edges.

True if adjacent triangles are True if adjacent triangles are all front-facing or all back-facing.all front-facing or all back-facing.

Page 33: Silhouette Clipping

Spatial culling primitiveSpatial culling primitiveGiven cluster of edges,Given cluster of edges,

check if there are no silhouette edges.check if there are no silhouette edges.

True if adjacent triangles are True if adjacent triangles are all front-facingall front-facing or all back-facing. or all back-facing.

Page 34: Silhouette Clipping

Spatial culling primitiveSpatial culling primitiveGiven cluster of edges,Given cluster of edges,

check if there are no silhouette edges.check if there are no silhouette edges.

True if adjacent triangles are True if adjacent triangles are all front-facingall front-facing or or all back-facingall back-facing..

Page 35: Silhouette Clipping

Anchored cone primitiveAnchored cone primitive

front-facingcone

back-facingcone

Page 36: Silhouette Clipping

Anchored cone primitiveAnchored cone primitive

Calculate central axisCalculate central axisGilbert’s algorithmGilbert’s algorithm

Calculate cone angleCalculate cone angle

Calculate anchor positionsCalculate anchor positionsLinear programmingLinear programming

Page 37: Silhouette Clipping

Anchored cone primitiveAnchored cone primitive

Calculate central axisCalculate central axisGilbert’s algorithmGilbert’s algorithm

Calculate cone angleCalculate cone angle

Calculate anchor positionsCalculate anchor positionsLinear programmingLinear programming

Page 38: Silhouette Clipping

Anchored cone primitiveAnchored cone primitive

Calculate central axisCalculate central axisGilbert’s algorithmGilbert’s algorithm

Calculate cone angleCalculate cone angle

Calculate anchor positionsCalculate anchor positionsLinear programmingLinear programming

Page 39: Silhouette Clipping

Hierarchy constructionHierarchy construction

Bottom-up greedy joiningBottom-up greedy joining

two clusterstwo clusters

mergemerge adoptadoptparentparent

Page 40: Silhouette Clipping

Hierarchy constructionHierarchy construction

Each root has probability of culling.Each root has probability of culling. We compute an expected extraction We compute an expected extraction

cost for each root, and the forest.cost for each root, and the forest. Choose next join operation to Choose next join operation to

maximally decrease expected maximally decrease expected extraction cost.extraction cost.

Page 41: Silhouette Clipping

Silhouette extraction videoSilhouette extraction video

Page 42: Silhouette Clipping

PerformancePerformance

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Total edgesTotal edges 104,511104,511 600,000600,000 65,79965,799 278,784278,784 282,624282,624

Sil edgesSil edges 3,4613,461 23,49323,493 3,2273,227 3,2913,291 1,7371,737

Tested edgesTested edges 10,25610,256 67,93467,934 10,93810,938 13,13413,134 5,9765,976

Time (ms)Time (ms) 4.14.1 28.228.2 4.34.3 7.97.9 3.33.3

Page 43: Silhouette Clipping

PerformancePerformance

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Total edgesTotal edges 104,511104,511 600,000600,000 65,79965,799 278,784278,784 282,624282,624

Sil edgesSil edges 3,4613,461 23,49323,493 3,2273,227 3,2913,291 1,7371,737

Tested edgesTested edges 10,25610,256 67,93467,934 10,93810,938 13,13413,134 5,9765,976

Time (ms)Time (ms) 4.14.1 28.228.2 4.34.3 7.97.9 3.33.3

Page 44: Silhouette Clipping

PerformancePerformance

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Total edgesTotal edges 104,511104,511 600,000600,000 65,79965,799 278,784278,784 282,624282,624

Sil edgesSil edges 3,4613,461 23,49323,493 3,2273,227 3,2913,291 1,7371,737

Tested edgesTested edges 10,25610,256 67,93467,934 10,93810,938 13,13413,134 5,9765,976

Time (ms)Time (ms) 4.14.1 28.228.2 4.34.3 7.97.9 3.33.3

Page 45: Silhouette Clipping

PerformancePerformance

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Total edgesTotal edges 104,511104,511 600,000600,000 65,79965,799 278,784278,784 282,624282,624

Sil edgesSil edges 3,4613,461 23,49323,493 3,2273,227 3,2913,291 1,7371,737

Tested edgesTested edges 10,25610,256 67,93467,934 10,93810,938 13,13413,134 5,9765,976

Time (ms)Time (ms) 4.14.1 28.228.2 4.34.3 7.97.9 3.33.3

Page 46: Silhouette Clipping

PerformancePerformance

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Total edgesTotal edges 104,511104,511 600,000600,000 65,79965,799 278,784278,784 282,624282,624

Sil edgesSil edges 3,4613,461 23,49323,493 3,2273,227 3,2913,291 1,7371,737

Tested edgesTested edges 10,25610,256 67,93467,934 10,93810,938 13,13413,134 5,9765,976

Time (ms)Time (ms) 4.14.1 28.228.2 4.34.3 7.97.9 3.33.3

Page 47: Silhouette Clipping

Stencil settingStencil setting

Page 48: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Algorithm inspired by Algorithm inspired by concave polygon-filling algorithmconcave polygon-filling algorithm..

Silhouette edges organized in hash table.Silhouette edges organized in hash table. Each contour drawn as fan of triangles:Each contour drawn as fan of triangles:

Triangle front-facing Triangle front-facing stencil stencil ++= 1= 1 Triangle back-facing Triangle back-facing stencil stencil ––= 1= 1

Page 49: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 50: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 51: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 52: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 53: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 54: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 55: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 56: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 57: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 58: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 59: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 60: Silhouette Clipping

Stencil setting algorithmStencil setting algorithm

Page 61: Silhouette Clipping

Stencil setting videoStencil setting video

Page 62: Silhouette Clipping

Silhouette antialiasingSilhouette antialiasing

Transfer stencil to alpha buffer:Transfer stencil to alpha buffer: stencil = 0 stencil = 0 alpha = 0.0 alpha = 0.0 stencil = 1 stencil = 1 alpha = 1.0 alpha = 1.0

Render silhouette edges in alpha buffer Render silhouette edges in alpha buffer as antialiased line segments.as antialiased line segments.

Render coarse hull subject to alpha buffer.Render coarse hull subject to alpha buffer.

Page 63: Silhouette Clipping

Silhouette antialiasing videoSilhouette antialiasing video

Page 64: Silhouette Clipping

Timing analysisTiming analysis

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Faces (original)Faces (original) 69,67469,674 400,000400,000 43,86643,866 185,856185,856 188,416188,416

Rendering timeRendering time 34.734.7 204.7204.7 20.620.6 81.181.1 90.390.3

Faces (coarse)Faces (coarse) 500500 4,0004,000 1,0201,020 928928 500500

Rendering timeRendering time 4.84.8 5.25.2 4.94.9 4.94.9 4.44.4

SC Rendering timeSC Rendering time 7.87.8 50.350.3 6.96.9 10.310.3 5.55.5

Speedup factorSpeedup factor 4.44.4 4.14.1 3.03.0 7.97.9 16.416.4

All times in millisecondsAll times in milliseconds

Page 65: Silhouette Clipping

Timing analysisTiming analysis

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Faces (original)Faces (original) 69,67469,674 400,000400,000 43,86643,866 185,856185,856 188,416188,416

Rendering timeRendering time 34.734.7 204.7204.7 20.620.6 81.181.1 90.390.3

Faces (coarse)Faces (coarse) 500500 4,0004,000 1,0201,020 928928 500500

Rendering timeRendering time 4.84.8 5.25.2 4.94.9 4.94.9 4.44.4

SC Rendering timeSC Rendering time 7.87.8 50.350.3 6.96.9 10.310.3 5.55.5

Speedup factorSpeedup factor 4.44.4 4.14.1 3.03.0 7.97.9 16.416.4

All times in millisecondsAll times in milliseconds

Page 66: Silhouette Clipping

Timing analysisTiming analysis

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Faces (original)Faces (original) 69,67469,674 400,000400,000 43,86643,866 185,856185,856 188,416188,416

Rendering timeRendering time 34.734.7 204.7204.7 20.620.6 81.181.1 90.390.3

Faces (coarse)Faces (coarse) 500500 4,0004,000 1,0201,020 928928 500500

Rendering timeRendering time 4.84.8 5.25.2 4.94.9 4.94.9 4.44.4

SC Rendering timeSC Rendering time 7.87.8 50.350.3 6.96.9 10.310.3 5.55.5

Speedup factorSpeedup factor 4.44.4 4.14.1 3.03.0 7.97.9 16.416.4

All times in millisecondsAll times in milliseconds

Page 67: Silhouette Clipping

Timing analysisTiming analysis

ModelModel BunnyBunny DragonDragon ParasaurParasaur KnotKnot Holes3Holes3

Faces (original)Faces (original) 69,67469,674 400,000400,000 43,86643,866 185,856185,856 188,416188,416

Rendering timeRendering time 34.734.7 204.7204.7 20.620.6 81.181.1 90.390.3

Faces (coarse)Faces (coarse) 500500 4,0004,000 1,0201,020 928928 500500

Rendering timeRendering time 4.84.8 5.25.2 4.94.9 4.94.9 4.44.4

SC Rendering timeSC Rendering time 7.87.8 50.350.3 6.96.9 10.310.3 5.55.5

Speedup factorSpeedup factor 4.44.4 4.14.1 3.03.0 7.97.9 16.416.4

All times in millisecondsAll times in milliseconds

Page 68: Silhouette Clipping

SummarySummary

Silhouette clipping & antialiasingSilhouette clipping & antialiasing Fast silhouette extractionFast silhouette extraction Progressive hullProgressive hull Normal-shooting parametrizationNormal-shooting parametrization

Page 69: Silhouette Clipping

Future workFuture work

Handle internal silhouettesHandle internal silhouettes Visual hull simplificationVisual hull simplification Silhouette level-of-detailSilhouette level-of-detail