View
215
Download
2
Tags:
Embed Size (px)
Citation preview
Discontinuity Edge OverdrawDiscontinuity Edge OverdrawDiscontinuity Edge OverdrawDiscontinuity Edge Overdraw
Pedro V. SanderPedro V. Sander11
Hugues HoppeHugues Hoppe22
John SnyderJohn Snyder22
Steven J. GortlerSteven J. Gortler11
Pedro V. SanderPedro V. Sander11
Hugues HoppeHugues Hoppe22
John SnyderJohn Snyder22
Steven J. GortlerSteven J. Gortler11
2001 ACM Symposium on Interactive 3D Graphics2001 ACM Symposium on Interactive 3D Graphics
1 1 Harvard UniversityHarvard University 2 2 Microsoft ResearchMicrosoft Research
1)1) Within triangles interiorsWithin triangles interiors(solved by mipmapping)(solved by mipmapping)
2)2) Among trianglesAmong triangles(‘small object problem’)(‘small object problem’)
3)3) At triangle edgesAt triangle edges(‘crawling jaggies’)(‘crawling jaggies’)
1)1) Within triangles interiorsWithin triangles interiors(solved by mipmapping)(solved by mipmapping)
2)2) Among trianglesAmong triangles(‘small object problem’)(‘small object problem’)
3)3) At triangle edgesAt triangle edges(‘crawling jaggies’)(‘crawling jaggies’)
Aliasing in meshesAliasing in meshesAliasing in meshesAliasing in meshes
Our approach: only attack jaggiesOur approach: only attack jaggiesOur approach: only attack jaggiesOur approach: only attack jaggies Basic algorithm:Basic algorithm:
Render mesh.Render mesh. Identify ‘troublesome’ edges.Identify ‘troublesome’ edges. Render troublesome edges as antialiased lines.Render troublesome edges as antialiased lines.
Basic algorithm:Basic algorithm: Render mesh.Render mesh. Identify ‘troublesome’ edges.Identify ‘troublesome’ edges. Render troublesome edges as antialiased lines.Render troublesome edges as antialiased lines.
OriginalOriginal Overdrawn EdgesOverdrawn Edges Final ResultFinal Result
++ ==
Edge overdraw demoEdge overdraw demoEdge overdraw demoEdge overdraw demo
Previous work: SupersamplingPrevious work: SupersamplingPrevious work: SupersamplingPrevious work: Supersampling
In the limit, solves all aliasing artifacts.In the limit, solves all aliasing artifacts. However, higher rendering cost. However, higher rendering cost.
e.g. 2x2:e.g. 2x2:
In the limit, solves all aliasing artifacts.In the limit, solves all aliasing artifacts. However, higher rendering cost. However, higher rendering cost.
e.g. 2x2:e.g. 2x2:
MethodMethod TransformTransform RasterRaster MemoryMemory
Traditional Traditional SupersamplingSupersampling
1x1x 4x4x 4x4x
Accumulation Accumulation BufferBuffer
4x4x 4x4x 2x2x
Previous work: Edge AntialiasingPrevious work: Edge AntialiasingPrevious work: Edge AntialiasingPrevious work: Edge Antialiasing
Crow ‘77Crow ‘77Scanline rendererScanline renderer
Bloomenthal ‘83Bloomenthal ‘83Image post-processImage post-process
OpenGL “polygon antialiasing”OpenGL “polygon antialiasing”Requires special hardware &Requires special hardware & front-to-back rendering front-to-back rendering
Crow ‘77Crow ‘77Scanline rendererScanline renderer
Bloomenthal ‘83Bloomenthal ‘83Image post-processImage post-process
OpenGL “polygon antialiasing”OpenGL “polygon antialiasing”Requires special hardware &Requires special hardware & front-to-back rendering front-to-back rendering
Previous work: edge overdrawPrevious work: edge overdrawPrevious work: edge overdrawPrevious work: edge overdraw
Sauer et al ‘99Sauer et al ‘992-pass software rendering.2-pass software rendering.Requires polygon sorting.Requires polygon sorting.Only silhouettes & brute-force search.Only silhouettes & brute-force search.
Wimmer ‘97Wimmer ‘97Requires polygon sorting.Requires polygon sorting.
Donovan ‘99Donovan ‘99framebuffer-to-texture copyframebuffer-to-texture copy
Sauer et al ‘99Sauer et al ‘992-pass software rendering.2-pass software rendering.Requires polygon sorting.Requires polygon sorting.Only silhouettes & brute-force search.Only silhouettes & brute-force search.
Wimmer ‘97Wimmer ‘97Requires polygon sorting.Requires polygon sorting.
Donovan ‘99Donovan ‘99framebuffer-to-texture copyframebuffer-to-texture copy
Our contributionOur contributionOur contributionOur contribution
Use ordinary line antialiasing.Use ordinary line antialiasing. Reduce crawling jaggies, while maintaining:Reduce crawling jaggies, while maintaining:
Temporal smoothnessTemporal smoothness Spatial consistencySpatial consistency Spatial sharpnessSpatial sharpness
Fast detection of discontinuity edgesFast detection of discontinuity edges
Use ordinary line antialiasing.Use ordinary line antialiasing. Reduce crawling jaggies, while maintaining:Reduce crawling jaggies, while maintaining:
Temporal smoothnessTemporal smoothness Spatial consistencySpatial consistency Spatial sharpnessSpatial sharpness
Fast detection of discontinuity edgesFast detection of discontinuity edges
Discontinuity edgesDiscontinuity edgesDiscontinuity edgesDiscontinuity edges
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Discontinuity edgesDiscontinuity edgesDiscontinuity edgesDiscontinuity edges
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Discontinuity edgesDiscontinuity edgesDiscontinuity edgesDiscontinuity edges
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Dynamic discontinuity edgesDynamic discontinuity edges Silhouette edgesSilhouette edges
Static discontinuity edgesStatic discontinuity edges(“sharp edges”)(“sharp edges”) Surface boundariesSurface boundaries Material boundariesMaterial boundaries CreasesCreases
Silhouette extractionSilhouette extractionSilhouette extractionSilhouette extraction
[Sander et al 2000][Sander et al 2000]Build silhouette tree during preprocess.Build silhouette tree during preprocess.
Each node contains:Each node contains: Set of edges.Set of edges. Conservative test.Conservative test.
If test passes, then sub-tree is skipped.If test passes, then sub-tree is skipped.
[Sander et al 2000][Sander et al 2000]Build silhouette tree during preprocess.Build silhouette tree during preprocess.
Each node contains:Each node contains: Set of edges.Set of edges. Conservative test.Conservative test.
If test passes, then sub-tree is skipped.If test passes, then sub-tree is skipped.
Silhouette extraction treeSilhouette extraction treeSilhouette extraction treeSilhouette extraction tree
Leave out:Leave out: Sharp edges (~10%)Sharp edges (~10%) Concave edges (~40%)Concave edges (~40%)
Reduces silhouette extraction cost by half.Reduces silhouette extraction cost by half.
Leave out:Leave out: Sharp edges (~10%)Sharp edges (~10%) Concave edges (~40%)Concave edges (~40%)
Reduces silhouette extraction cost by half.Reduces silhouette extraction cost by half.
Shading the edgesShading the edgesShading the edgesShading the edges
Silhouette edge: Silhouette edge: Use the frontface shading attributes.Use the frontface shading attributes.
Frontfacing edge:Frontfacing edge:Combine between the two face Combine between the two face shading attributes (avoids popping). shading attributes (avoids popping).
Silhouette edge: Silhouette edge: Use the frontface shading attributes.Use the frontface shading attributes.
Frontfacing edge:Frontfacing edge:Combine between the two face Combine between the two face shading attributes (avoids popping). shading attributes (avoids popping).
PoppingPopping
Temporal smoothness:Temporal smoothness:sharp edge combiningsharp edge combining
Temporal smoothness:Temporal smoothness:sharp edge combiningsharp edge combining
dd11 = dot( = dot(ee..ff11,,viewdirviewdir))
dd22 = dot( = dot(e.fe.f22,,viewdirviewdir))
ββ = d = d11 / (d / (d11 + d + d22))
dd11 = dot( = dot(ee..ff11,,viewdirviewdir))
dd22 = dot( = dot(e.fe.f22,,viewdirviewdir))
ββ = d = d11 / (d / (d11 + d + d22))
CombiningCombining
PoppingPopping
How to combineHow to combineHow to combineHow to combine
Two approaches:Two approaches:
Edge blended-drawEdge blended-draw Blend face attributes and render once.Blend face attributes and render once. Catches occasional highlight.Catches occasional highlight. Requires multitexturing.Requires multitexturing.
Edge double-drawEdge double-draw Render twice Render twice
(once for each face’s attributes).(once for each face’s attributes). Requires rendering more edges.Requires rendering more edges. Causes slight discontinuity at Causes slight discontinuity at ββ===0.5=0.5
Two approaches:Two approaches:
Edge blended-drawEdge blended-draw Blend face attributes and render once.Blend face attributes and render once. Catches occasional highlight.Catches occasional highlight. Requires multitexturing.Requires multitexturing.
Edge double-drawEdge double-draw Render twice Render twice
(once for each face’s attributes).(once for each face’s attributes). Requires rendering more edges.Requires rendering more edges. Causes slight discontinuity at Causes slight discontinuity at ββ===0.5=0.5
Drawbacks of combiningDrawbacks of combiningDrawbacks of combiningDrawbacks of combining
Slower.Slower.
Blurs discontinuities too much.Blurs discontinuities too much.
Slower.Slower.
Blurs discontinuities too much.Blurs discontinuities too much.
CombinedCombined AsymmetricAsymmetricCombinationCombination
OriginalOriginal
Spatial sharpness:Spatial sharpness:asymmetric edge combiningasymmetric edge combining
Spatial sharpness:Spatial sharpness:asymmetric edge combiningasymmetric edge combining
We combine as little as possible.We combine as little as possible. We use an asymmetric ramp.We use an asymmetric ramp.
Most of the time use “default” face.Most of the time use “default” face.
We combine as little as possible.We combine as little as possible. We use an asymmetric ramp.We use an asymmetric ramp.
Most of the time use “default” face.Most of the time use “default” face.
.9.9 1.01.00000
1.01.0
Symmetric Symmetric ββ
Asy
mm
etri
c A
sym
met
ric
ββ
Sharp edge orientationSharp edge orientationSharp edge orientationSharp edge orientation
For each edge, determine a default face. For each edge, determine a default face. Consistent through sharp edge paths.Consistent through sharp edge paths.
For each edge, determine a default face. For each edge, determine a default face. Consistent through sharp edge paths.Consistent through sharp edge paths.
Not consistentNot consistent ConsistentConsistent
Spatial consistency:Spatial consistency:sharp edge orientationsharp edge orientationSpatial consistency:Spatial consistency:sharp edge orientationsharp edge orientation
Traverse sharp edge paths setting Traverse sharp edge paths setting consistent edge orientation. Stops at:consistent edge orientation. Stops at: Dead endsDead ends LoopLoop Multiple sharp edge “crossings”Multiple sharp edge “crossings”
Traverse sharp edge paths setting Traverse sharp edge paths setting consistent edge orientation. Stops at:consistent edge orientation. Stops at: Dead endsDead ends LoopLoop Multiple sharp edge “crossings”Multiple sharp edge “crossings”
Discontinuity edge sortingDiscontinuity edge sortingDiscontinuity edge sortingDiscontinuity edge sorting For best results,For best results,
sort edges from back to front.sort edges from back to front. No need to sort edges that are far from No need to sort edges that are far from
the silhouette.the silhouette.
For best results,For best results,sort edges from back to front.sort edges from back to front.
No need to sort edges that are far from No need to sort edges that are far from the silhouette.the silhouette.
Not sortedNot sorted SortedSorted
Final algorithm (Preprocess)Final algorithm (Preprocess)Final algorithm (Preprocess)Final algorithm (Preprocess)
Collect sharp edges in mesh.Collect sharp edges in mesh. Assign them consistent orientation. Assign them consistent orientation. Construct silhouette extraction treeConstruct silhouette extraction tree
(exclude sharp and concave edges).(exclude sharp and concave edges).
Collect sharp edges in mesh.Collect sharp edges in mesh. Assign them consistent orientation. Assign them consistent orientation. Construct silhouette extraction treeConstruct silhouette extraction tree
(exclude sharp and concave edges).(exclude sharp and concave edges).
Final algorithm (Runtime)Final algorithm (Runtime)Final algorithm (Runtime)Final algorithm (Runtime)
render mesh;render mesh;extract silhouette;extract silhouette;forfor silhouette edge silhouette edge ee
render render ee using frontface shading attributes using frontface shading attributes forfor sharp edge sharp edge ee
compute compute e.e.ββ;;ifif e.e.ββ < 0.9 < 0.9 thenthen
render render ee using default face shading using default face shading attributes attributes elseelse
render render ee by combining shading attributes by combining shading attributes
render mesh;render mesh;extract silhouette;extract silhouette;forfor silhouette edge silhouette edge ee
render render ee using frontface shading attributes using frontface shading attributes forfor sharp edge sharp edge ee
compute compute e.e.ββ;;ifif e.e.ββ < 0.9 < 0.9 thenthen
render render ee using default face shading using default face shading attributes attributes elseelse
render render ee by combining shading attributes by combining shading attributes
Final algorithm Final algorithm (modifications for sorting)(modifications for sorting)
Final algorithm Final algorithm (modifications for sorting)(modifications for sorting)
Render sharp edges for which Render sharp edges for which 0.1 < 0.1 < e.e.ββ < 0.9 < 0.9
Place other sharp edges in a set S.Place other sharp edges in a set S. Place silhouette edges in Place silhouette edges in SS.. Sort Sort SS back-to-front. back-to-front. Render edges in Render edges in S.S.
Render sharp edges for which Render sharp edges for which 0.1 < 0.1 < e.e.ββ < 0.9 < 0.9
Place other sharp edges in a set S.Place other sharp edges in a set S. Place silhouette edges in Place silhouette edges in SS.. Sort Sort SS back-to-front. back-to-front. Render edges in Render edges in S.S.
Rendering DetailsRendering DetailsRendering DetailsRendering Details
Render triangles:Render triangles: standard z-buffer settings.standard z-buffer settings. GL_POLYGON_OFFSET_FILL.GL_POLYGON_OFFSET_FILL.
Render edges (as antialiased lines):Render edges (as antialiased lines): OVER operation.OVER operation. z-buffer writes disabled.z-buffer writes disabled.
Render triangles:Render triangles: standard z-buffer settings.standard z-buffer settings. GL_POLYGON_OFFSET_FILL.GL_POLYGON_OFFSET_FILL.
Render edges (as antialiased lines):Render edges (as antialiased lines): OVER operation.OVER operation. z-buffer writes disabled.z-buffer writes disabled.
TimingsTimingsTimingsTimingsModelModel DinoDino PlanePlane ManMan ShipShip
FacesFaces 43,86643,866 8,0008,000 1,5861,586 85,06885,068
EdgesEdges 65,79965,799 12,00012,000 2,3792,379 127,602127,602
Sharp edgesSharp edges 900900 2,0852,085 354354 19,76919,769
TimingsTimingsTimingsTimingsModelModel DinoDino PlanePlane ManMan ShipShip
FacesFaces 43,86643,866 8,0008,000 1,5861,586 85,06885,068
EdgesEdges 65,79965,799 12,00012,000 2,3792,379 127,602127,602
Sharp edgesSharp edges 900900 2,0852,085 354354 19,76919,769
Edge stats averaged over 100 viewpointsEdge stats averaged over 100 viewpoints
Extracted Sil edgesExtracted Sil edges 2,0862,086 393393 9494 7,1227,122
Rendered edgesRendered edges 2,6812,681 1,7271,727 373373 21,98021,980
Sorted edgesSorted edges 2,2882,288 1,2121,212 309309 16,44816,448
Combined edgesCombined edges 1212 2323 66 266266
TimingsTimingsTimingsTimingsModelModel DinoDino PlanePlane ManMan ShipShip
FacesFaces 43,86643,866 8,0008,000 1,5861,586 85,06885,068
EdgesEdges 65,79965,799 12,00012,000 2,3792,379 127,602127,602
Sharp edgesSharp edges 900900 2,0852,085 354354 19,76919,769
Edge stats averaged over 100 viewpointsEdge stats averaged over 100 viewpoints
Extracted Sil edgesExtracted Sil edges 2,0862,086 393393 9494 7,1227,122
Rendered edgesRendered edges 2,6812,681 1,7271,727 373373 21,98021,980
Sorted edgesSorted edges 2,2882,288 1,2121,212 309309 16,44816,448
Combined edgesCombined edges 1212 2323 66 266266
Rendering time per frame (in milliseconds)Rendering time per frame (in milliseconds)
No Edge OverdrawNo Edge Overdraw 18.918.9 9.89.8 7.27.2 40.140.1
Edge OverdrawEdge Overdraw 20.020.0 10.310.3 7.77.7 88.488.4
Sorted Edge OverdrawSorted Edge Overdraw 23.323.3 10.810.8 7.77.7 121.2121.2
Pentium III 800Mhz, GeForce2Pentium III 800Mhz, GeForce2
Comparison with SupersamplingComparison with SupersamplingComparison with SupersamplingComparison with Supersampling
OriginalOriginal 2x2 Supersampled2x2 Supersampled OverdrawOverdraw
(explicit geometry of antialiased lines(explicit geometry of antialiased linesgives better coverage information)gives better coverage information)
OriginalOriginal
Sorted OverdrawSorted Overdraw
LimitationsLimitationsLimitationsLimitations It ‘thickens’ the model a bitIt ‘thickens’ the model a bit
(mostly visible at low resolutions).(mostly visible at low resolutions).
Memory overhead.Memory overhead.
It ‘thickens’ the model a bitIt ‘thickens’ the model a bit(mostly visible at low resolutions).(mostly visible at low resolutions).
Memory overhead.Memory overhead.
OriginalOriginal OverdrawOverdraw
SummarySummarySummarySummary
Edge overdraw is a simple,Edge overdraw is a simple, efficient alternative for eliminating jaggies. efficient alternative for eliminating jaggies.
Designed to reduce spatial aliasing.Designed to reduce spatial aliasing.
But, also reduces crawling jaggies.But, also reduces crawling jaggies.
Future work:Future work:Extracting silhouettes on dynamic meshes.Extracting silhouettes on dynamic meshes.
Edge overdraw is a simple,Edge overdraw is a simple, efficient alternative for eliminating jaggies. efficient alternative for eliminating jaggies.
Designed to reduce spatial aliasing.Designed to reduce spatial aliasing.
But, also reduces crawling jaggies.But, also reduces crawling jaggies.
Future work:Future work:Extracting silhouettes on dynamic meshes.Extracting silhouettes on dynamic meshes.
The endThe endThe endThe end