Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola...

42
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman

Transcript of Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola...

Page 1: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Single Pass Point Rendering and Transparent Shading

Paper by Yanci Zhang and Renato Pajarola

Presentation by Harmen de Weerd and Hedde Bosman

Page 2: 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

Page 3: 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 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

Page 4: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 5: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

1+1 algorithm

Page 6: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Deferred Blending

Divide point set S in K Groups

Page 7: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

1+1 Algorithm: Grouping

Page 8: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

1+1 Algorithm: Grouping

Page 9: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

Page 10: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 11: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 12: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 13: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 14: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 15: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Largest First grouping algorithm

1

3

2

45

76

123

Page 16: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 17: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 18: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 19: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Optimal grouping

Page 20: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Transparency Problems

cannot account weight and alpha simultaneously

Need full surface coverage to look 'through' a material layer

Should not have overlap between splats

Page 21: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Transparency Problems 2,3

Page 22: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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.

Page 23: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 24: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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.

Page 25: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 26: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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.

Page 27: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Voronoi enhance

Page 28: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 29: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 30: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 31: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 32: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 33: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Single vs Multi-layer refraction

Page 34: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

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

Page 35: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Visual results

Combining opaque and transparent objects Single-pass (a) versus two-pass (b) algorithm

Page 36: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Visual results

Depth Peeling vs Algorithm 3 vs Algorithm 2

Page 37: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Speed Comparison

Standard 2+1 PBR algorithm vs the novel 1+1 pass PBR algorithm

Page 38: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Visual Comparison

Page 39: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Ball Joint

Page 40: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

David Head

Page 41: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Female model

Page 42: Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.

Q / A