SLIDE 1
Transparency CISC 3620 May 15, 2017 Outline Reading Real-Time - - PowerPoint PPT Presentation
Transparency CISC 3620 May 15, 2017 Outline Reading Real-Time - - PowerPoint PPT Presentation
Transparency CISC 3620 May 15, 2017 Outline Reading Real-Time Rendering, 5.7 Semitransparent object View-based effects: semitransparent object itself is rendered Light-based effects: object causes light to be weakened or bent, which
SLIDE 2
SLIDE 3
Reading
Real-Time Rendering, 5.7
SLIDE 4
Semitransparent object
◮ View-based effects: semitransparent object itself is rendered ◮ Light-based effects: object causes light to be weakened or
bent, which causes other objects in the scene to be lit and rendered differently Simplest form: view-based: semitransparent object acts as color filter of the view of the objects behind it
SLIDE 5
A-buffer
Depth of closest fragment is stored in Z-buffer Limitation: Only one object stored per pixel A-buffer: has “deep pixels” that store n fragments that are resolved to single pixel color after all objects are rendered Can also work with Z-buffer.
SLIDE 6
Screen-door transparency
render semitransparent polygon with checkerboard fill pattern: render every other pixel, so object behind it is partially visible pixels on screen will be close enough together that checkerboard pattern itself is not visible.
SLIDE 7
Screen-door transparency
◮ Faster ◮ Some visual quality is sacrificed ◮ Limits number of transparent objects that can be layered
SLIDE 8
Alpha coverage
Transparency = how many samples inside pixels are covered Like screen-door transparency but at sub-pixel level Used to antialias edges of cutout textures:
◮ Suppose a fragment covers a pixel but is 25% transparent due
to cutout texture
◮ Render fragment as fully opaque, but covering only three of
the four samples
◮ No sorting necessary ◮ Object silhouette will hide objects behind it in consistent way
along its edges
SLIDE 9
Alpha coverage
SLIDE 10
Alpha test
Only allows for two levels of transparency: opaque or not (no translucency) Sorting not necessary
SLIDE 11
Blending
Alpha value is used to combine color of 2+ fragments. Without blending: each new fragment overwrites existing colors in framebuffer With blending: combine color of old fragment and new fragment Let source RGBA color be: cs, destination color be cd Final blended color: co = αscs + (1 − αs)cd Requires sorting: first opaque objects rendered, then transparent
- bjects blended on top in back to front order
SLIDE 12
Blending
SLIDE 13
Blending without sorting vs. depth peeling
SLIDE 14
Depth peeling
Everitt, "Interactive order-independent transparency"
SLIDE 15
Sorting
◮ Painter’s algorithm ◮ Z-buffer testing without z-depth replacement for transparent
- bjects.
◮ Render transparent objects twice, first backfaces and then
frontfaces
◮ A-buffer: combine fragments in sorted order for high-quality
transparency
SLIDE 16
Depth peeling
First render opaque surfaces, store depths in z-buffer Then render transparent surfaces with depth greater than in z-buffer but less than some threshold Then another pass with closer threshold Etc.
SLIDE 17