single pass point rendering and transparent shading paper by yanci zhang and renato pajarola...
TRANSCRIPT
Single Pass Point Rendering and Transparent Shading
Paper by Yanci Zhang and Renato Pajarola
Presentation by Harmen de Weerd and Hedde Bosman
The standard 2+1 algorithm
Visibility Pass
Smooth point interpolation and shading Pass
Normalization/shading Pass
Well known from the lab sessions
The standard 2+1 algorithm cons 2 passes over the dataset with computational
intensive shaders
Transparency hard to achieve Back to front alpha blending, z-buffer is turned off
Interpolation between overlapping splats in one layer uses the z-buffer to cull fragments that do not belong in this one layer (i.e. are not visible).
Possible with depth-peeling seen in previous presentation, but uses multiple geometry passes
One other algorithm proposed for alpha blending which cannot use the GPU
A new algorithm
Idea:
Create multiple groups of the point set that do not need a separate visibility pass
Render an image for each group
postpone -z-buffer test and smooth point interpolation to an image composition pass
1+1 algorithm
Deferred Blending
Divide point set S in K Groups
1+1 Algorithm: Grouping
1+1 Algorithm: Grouping
Largest First grouping algorithm
Largest First grouping algorithm
1
3
2
45
76
123
Largest First grouping algorithm
1
3
2
45
76
123
Largest First grouping algorithm
1
3
2
45
76
123
Largest First grouping algorithm
1
3
2
45
76
123
Largest First grouping algorithm
1
3
2
45
76
123
Largest First grouping algorithm
1
3
2
45
76
123
1+1 Algorithm: Images...
Create K images from K groups
Add depth info to images.
Since splats do not overlap in object space (because of grouping) we do not need to worry about visibility culling
Do use z-buffers since splats might overlap in image space
1+1 Algorithm: Image composition
For each resulting fragment: Determine the minimum depth of the fragment
Determine the sum of the color components if the depth is within of the minimum depth
Determine the sum of all alpha components if the depth is within of the minimum depth
Normalize the colors using the alpha: RGB=RGB/A
1+1 Algorithm: Transparency
Previous algorithm does not account for transparency, so...
Adapt grouping algorithm to make sure no holes exists in surfaces of one group.
Render each group image using alpha blending
Optimal grouping
Transparency Problems
cannot account weight and alpha simultaneously
Need full surface coverage to look 'through' a material layer
Should not have overlap between splats
Transparency Problems 2,3
Transparency Solutions
cannot account weight and alpha simultaneously
Solution:
Do not account the weight. Artifacts are reduced dramatically by multiple
transparent surface layers
Small errors aren't even visible because color is only 8bit.
Grouping algorithm extensions
Relaxation of some edge definitions Virtually co-planer overlapping splats can go in the
same group
If normals of splats are in opposite directions (n1 . N2 < 0) the splats can be in the same group.
Relax overlap condition with user defined parameter
Add points to multiple groups
Grouping algorithm extensions
Grouping results. a) Splats have smaller overlaps but less surface coverage for K = 8. b) Splats have bigger overlaps but better surface cover for K = 4.
Fragment culling
Optimally in each transparent surface layer there is exactly one fragment contributing to alpha-blending per pixel
Two methods to create this situation: Reduce z-buffer precision
increase surface coverage in a group image: Increased splat radius Add splats to multiple groups Decrease number of groups
Basic 1+1 Algorithm (1)
For each group Render splat with color, depth and kernel weight
Voronoi enhanced depth buffer (lower kernel weight is culled)
For each pixel Determine the minimum depth
For each group image Sum the color and weight attributes if the fragment is in
the nearest layer.
Average the sum of color by the sum of weights.
Voronoi enhance
Basic transparency algorithm (2)
Use BSP-tree for efficient back-to-front ordering
Transparency blending pass (using -blending):
Render all splats pi of each group S
k using modified
radii r into separate target images Ik
Perform back-to-front -blending using material transparency
frag:
cnew
= frag
cold
+ (1 - frag
) cfrag
Compositing pass (PBR blending):
Average color of all images Ik into final framebuffer
Reduction in z-buffer accuracy
Overlapping splats cause too much attenuation
Solution: cull fragments that are too close to rendered fragments
Report the depth of each fragment in steps of size
High quality transparency algorithm (3)
Geometry pass for nearest layer Use basic algorithm 1 to get depth and kernel
information about the nearest layer
Geometry pass for other layers Use transparency algorithm 2, but cull all fragments
from nearest layer using depth mask the first pass
Composition pass Perform smooth point interpolation for nearest layer
Average the color over all images for other layers
Combine the nearest layer with the other layers
Reflections and refractions
Refraction effects and specular reflection improve rendering realism
Both are derived from incident viewing vector, surface normal, and environment mapping
Can be added to the nearest layer pass of algorithm 3 Downside: only reflections and refractions for
nearest visible layer
Multi-layer reflection/refraction
Accumulate opacity over all layers for each group S
k separately
Assuming constant material opacity , approximate number of layers l =
total /
Ratio of light absorption: (1 – )l
Transmitted total refraction: sin T = l sin
I
Single vs Multi-layer refraction
Per fragment shading
As with our lab sessions, all needed attributes per fragment are interpolated
Deferred shading approach can be used for any attribute other than color: Phong lighting
Environment map reflection
Multi-layer refraction
Attenuation
Visual results
Combining opaque and transparent objects Single-pass (a) versus two-pass (b) algorithm
Visual results
Depth Peeling vs Algorithm 3 vs Algorithm 2
Speed Comparison
Standard 2+1 PBR algorithm vs the novel 1+1 pass PBR algorithm
Visual Comparison
Ball Joint
David Head
Female model
Q / A