silhouette clipping pedro v. sander xianfeng gu steven j. gortler harvard university pedro v. sander...

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

Post on 18-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Silhouette ClippingSilhouette ClippingSilhouette ClippingSilhouette Clipping

Pedro V. SanderPedro V. Sander

Xianfeng GuXianfeng Gu

Steven J. GortlerSteven J. Gortler

Harvard UniversityHarvard University

Pedro V. SanderPedro V. Sander

Xianfeng GuXianfeng Gu

Steven J. GortlerSteven J. Gortler

Harvard UniversityHarvard University

Hugues H. HoppeHugues H. Hoppe

John M. SnyderJohn M. Snyder

Microsoft ResearchMicrosoft Research

Hugues H. HoppeHugues H. Hoppe

John M. SnyderJohn M. Snyder

Microsoft ResearchMicrosoft Research

Mesh simplificationMesh simplificationMesh simplificationMesh simplification

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

poorpoorsilhouettesilhouette

poorpoorsilhouettesilhouette

coarse meshcoarse mesh

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clippingSilhouette clippingSilhouette clipping

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

silhouette clippedsilhouette clipped

Silhouette clippingSilhouette clippingSilhouette clippingSilhouette clipping

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

Silhouette clipping demoSilhouette clipping demoSilhouette clipping demoSilhouette clipping demo

normal maporiginal mesh

rendered

coarse mesh

OverviewOverviewOverviewOverview

[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

OverviewOverviewOverviewOverview

normal map silhouetteclipped

edge hierarchy

original mesh

rendered

coarse hull

2D silhouette

RuntimePreprocess

OverviewOverviewOverviewOverview

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

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

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

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

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

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

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

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

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

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

Coarse hullCoarse hullCoarse 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 hullProgressive hullProgressive hull

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

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

Edge collapseEdge collapseEdge 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

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)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 demoProgressive hull demoProgressive hull demo

Texture creationTexture creationTexture 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 creationTexture creationTexture creation

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

vertex normalsvertex normals

normal-shootingnormal-shootingOursOurs

originaloriginal

coarsecoarse

Silhouette extractionSilhouette extractionSilhouette 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?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:

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

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 cullingHierarchical cullingHierarchical culling

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

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

Hierarchical cullingHierarchical cullingHierarchical cullingHierarchical culling

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

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

Spatial culling primitiveSpatial culling primitiveSpatial culling primitiveSpatial culling primitive

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

Given 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 primitiveSpatial culling primitiveSpatial culling primitive

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

Given 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 primitiveSpatial culling primitiveSpatial culling primitive

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

Given 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 primitiveAnchored cone primitiveAnchored cone primitive

front-facingcone

back-facingcone

Anchored cone primitiveAnchored cone primitiveAnchored 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

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

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

Calculate central axisCalculate central axisGilbert’s algorithmGilbert’s algorithm

Calculate cone angleCalculate cone angle

Calculate anchor positionsCalculate anchor positionsLinear programmingLinear programming

Hierarchy constructionHierarchy constructionHierarchy constructionHierarchy construction

Bottom-up greedy joiningBottom-up greedy joining Bottom-up greedy joiningBottom-up greedy joining

two clusterstwo clusters

mergemerge adoptadoptparentparent

Hierarchy constructionHierarchy constructionHierarchy 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 videoSilhouette extraction videoSilhouette extraction video

PerformancePerformancePerformancePerformance

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

PerformancePerformancePerformancePerformance

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

PerformancePerformancePerformancePerformance

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

PerformancePerformancePerformancePerformance

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

PerformancePerformancePerformancePerformance

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 settingStencil settingStencil setting

Stencil setting algorithmStencil setting algorithmStencil 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

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 algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting algorithmStencil setting algorithmStencil setting algorithmStencil setting algorithm

Stencil setting videoStencil setting videoStencil setting videoStencil setting video

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

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 videoSilhouette antialiasing videoSilhouette antialiasing video

Timing analysisTiming analysisTiming 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 analysisTiming 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 analysisTiming 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 analysisTiming 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

SummarySummarySummarySummary

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

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

Future workFuture workFuture workFuture work

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

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