|
Discontinuity Edge Overdraw
|
tarix | 07.11.2018 | ölçüsü | 0,93 Mb. | | #78506 |
|
Pedro V. Sander1 Hugues Hoppe2 John Snyder2 Steven J. Gortler1
Aliasing in meshes - Within triangles interiors (solved by mipmapping)
- Among triangles (‘small object problem’)
- At triangle edges (‘crawling jaggies’)
Our approach: only attack jaggies Basic algorithm: - Render mesh.
- Identify ‘troublesome’ edges.
- Render troublesome edges as antialiased lines.
Previous work: Supersampling In the limit, solves all aliasing artifacts. However, higher rendering cost. e.g. 2x2:
Previous work: Edge Antialiasing Crow ‘77 Scanline renderer Bloomenthal ‘83 Image post-process OpenGL “polygon antialiasing” Requires special hardware & front-to-back rendering
Previous work: edge overdraw Sauer et al ‘99 2-pass software rendering. Requires polygon sorting. Only silhouettes & brute-force search. Wimmer ‘97 Requires polygon sorting. Donovan ‘99 framebuffer-to-texture copy
Our contribution Use ordinary line antialiasing. Reduce crawling jaggies, while maintaining: - Temporal smoothness
- Spatial consistency
- Spatial sharpness
Discontinuity edges Dynamic discontinuity edges Static discontinuity edges (“sharp edges”)
Discontinuity edges Dynamic discontinuity edges Static discontinuity edges (“sharp edges”) - Surface boundaries
- Material boundaries
- Creases
Discontinuity edges Dynamic discontinuity edges Static discontinuity edges (“sharp edges”) - Surface boundaries
- Material boundaries
- Creases
Silhouette extraction [Sander et al 2000] Build silhouette tree during preprocess. Each node contains: - Set of edges.
- Conservative test.
If test passes, then sub-tree is skipped.
Leave out: - Sharp edges (~10%)
- Concave edges (~40%)
Reduces silhouette extraction cost by half.
Shading the edges Silhouette edge: Use the frontface shading attributes. Frontfacing edge: Combine between the two face shading attributes (avoids popping).
Temporal smoothness: sharp edge combining d1 = dot(e.f1,viewdir) d2 = dot(e.f2,viewdir) β = d1 / (d1 + d2)
How to combine Two approaches: Edge blended-draw - Blend face attributes and render once.
- Catches occasional highlight.
- Requires multitexturing.
Edge double-draw - Render twice (once for each face’s attributes).
- Requires rendering more edges.
- Causes slight discontinuity at β==0.5
Drawbacks of combining Slower. Blurs discontinuities too much.
Spatial sharpness: asymmetric edge combining We combine as little as possible. We use an asymmetric ramp. Most of the time use “default” face.
Sharp edge orientation For each edge, determine a default face. Consistent through sharp edge paths.
Spatial consistency: sharp edge orientation Traverse sharp edge paths setting consistent edge orientation. Stops at: - Dead ends
- Loop
- Multiple sharp edge “crossings”
For best results, sort edges from back to front. No need to sort edges that are far from the silhouette.
Sorting demo
Final algorithm (Preprocess) Collect sharp edges in mesh. Assign them consistent orientation. Construct silhouette extraction tree (exclude sharp and concave edges).
Final algorithm (Runtime) render mesh; extract silhouette; for silhouette edge e render e using frontface shading attributes for sharp edge e if e.β < 0.9 then render e using default face shading attributes else render e by combining shading attributes
Final algorithm (modifications for sorting) Render sharp edges for which 0.1 < e.β < 0.9 Place other sharp edges in a set S. Place silhouette edges in S. Sort S back-to-front. Render edges in S.
Rendering Details Render triangles: - standard z-buffer settings.
- GL_POLYGON_OFFSET_FILL.
Render edges (as antialiased lines): - OVER operation.
- z-buffer writes disabled.
Timings
Timings
Timings
Comparison with Supersampling
Demos
Limitations It ‘thickens’ the model a bit (mostly visible at low resolutions). Memory overhead.
Summary Edge overdraw is a simple, efficient alternative for eliminating jaggies. Designed to reduce spatial aliasing. But, also reduces crawling jaggies. Future work: Extracting silhouettes on dynamic meshes.
The end
Dostları ilə paylaş: |
|
|