Silhouette Clipping

Preview:

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

Citation preview

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

Mesh simplificationMesh simplification

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

poorpoorsilhouettesilhouette

coarse meshcoarse mesh

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clipping

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

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clipping

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

Silhouette clipping demoSilhouette clipping demo

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]

normal map stencil mask

edge hierarchy

original mesh

rendered

coarse hull

2D silhouette

RuntimePreprocess

OverviewOverview

normal map silhouetteclipped

edge hierarchy

original mesh

rendered

coarse hull

2D silhouette

RuntimePreprocess

OverviewOverview

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

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

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

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

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

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

Progressive hullProgressive hull

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

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

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

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

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

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

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

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

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

new vertexnew vertexpositionposition

Progressive hull demoProgressive hull demo

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]

Texture creationTexture creation

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

vertex normalsvertex normals

normal-shootingnormal-shootingOursOurs

originaloriginalcoarsecoarse

Silhouette extractionSilhouette extraction

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

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

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

Hierarchical cullingHierarchical culling

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

Hierarchical cullingHierarchical culling

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

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.

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.

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..

Anchored cone primitiveAnchored cone primitive

front-facingcone

back-facingcone

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

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

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

Hierarchy constructionHierarchy construction

Bottom-up greedy joiningBottom-up greedy joining

two clusterstwo clusters

mergemerge adoptadoptparentparent

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.

Silhouette extraction videoSilhouette extraction video

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

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

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

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

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

Stencil settingStencil setting

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

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithm

Stencil setting videoStencil setting video

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.

Silhouette antialiasing videoSilhouette antialiasing video

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

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

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

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

SummarySummary

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

Future workFuture work

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

Recommended