Top Banner
Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology
53

Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Dec 27, 2015

Download

Documents

Gabriel Miles
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Prefiltered Anti-Aliasing on Parallel Hardware

Thomas Auzinger

Institute of Computer Graphics and Algorithms

Vienna University of Technology

Page 2: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Motivation

Rasterization

Thomas Auzinger 2

Vector inputRaster grid Rastered outputBetter output quality

?

Page 3: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Examples

Font Rendering

Vector Graphics Display

Mesh Rendering

Thomas Auzinger 3smashingmagazine.comserver.arcgis.comtecharp.com

Page 4: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Design Choices

Which filter?

How to evaluate it?

Thomas Auzinger 4

Performance Quality

Page 5: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 5

Filter Choice

Downsampling to half resolution:

Delta filter

Page 6: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 6

Filter Choice

Downsampling to half resolution:

Box filter Hat filter Gaussian filter

Page 7: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Thomas Auzinger 7

Performance Quality

Page 8: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Motivation – Filter Evaluation

Thomas Auzinger 8

Page 9: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Motivation – Filter Evaluation

Thomas Auzinger 9

1 sample per pixel4 samples per pixel16 samples per pixel256 samples per pixelPrefilteringGround truth

Page 10: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 10

Performance Quality

Page 11: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 11

Page 12: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 12

Page 13: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 13

Performance Quality

Page 14: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Curved Surface Reformation

Sampling visibility

Supersampling shading

Interactive performance

Thomas Auzinger 14

View direction

Page 15: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Curved Surface Reformation

Thomas Auzinger 15

mpCPR CR CSR

Page 16: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 16

Page 17: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 17

Page 18: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 18

Performance Quality

Page 19: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 19

Page 20: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 20

Prefiltering Overview

Overview:

Mesh inputSample positionsFilter supports Output

Page 21: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 21

Prefiltering in 2D

Filter convolution:

yyxyx d)v( )( )(

Sample locationMesh dataFilter function

Page 22: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 22

Prefiltering in 2D

Filter convolution:

yyxyx d)v( )( )(

Complicated integration domain

Intersection area Subdivision Integration domains

... ...,

Page 23: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 23

Prefiltering in 2D

Filter convolution:

yyxyx d)(v )( )( 1

yyxyx d)(v )( )( 2

Page 24: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 24

Prefiltering in 2D

Filter convolution:

Sample location

yyxyx d)v( )( )(

Mesh data & filter

Page 25: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 25

Bonus: Prefiltering in 3D

Filter convolution:

yyxyx d)v( )( )(

Decomposition:

Intersection volume Subdivision Integration domains

Page 26: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Thomas Auzinger 26

Results

Alias-free sampling of complex scenes:

2M tetrahedraat different filter radii

(shown right)

Area filtering

Gaussian filtering

32.52

32.52

Page 27: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 27

Page 28: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Traditional Analytic

Pipeline

Thomas Auzinger 28

Vector

Raster

Vertex Geometry

Tessellation

Visibility

Discretization(Rasterizer)

ShadingAnti-aliasing

Output

Input

Visibility

ShadingAnti-aliasing

Discretization(Integrator)

Output

Vertex Geometry

Tessellation

Input

Page 29: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Analytic Filtering

Visible edges not enough boundary completion

Thomas Auzinger 29

Page 30: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Results

Single zone plate

Thomas Auzinger 30

Page 31: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Results

Another (white) zone plate below

Thomas Auzinger 31

1 sample per pixelAnalytic rasterization

Page 32: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Publications

TA*, Gabriel Mistelbauer*, I. Baclija, R. Schernthaner, Eduard Gröller, Stefan Bruckner

Vessel Visualization using Curved Surface ReformationSciVis 2013 (IEEE Trans. Vis. Comp. Graph.)

TA, Michael Guthe, Stefan Jeschke

Analytic Anti-Aliasing of Linear Functions on PolytopesEurographics 2012 (Comp. Graph. Forum)

TA, Michael Wimmer, Stefan Jeschke

Analytic Visibility on the GPUEurographics 2013 (Comp. Graph. Forum)

TA, Przem Musialski, Reinhold Preiner, Michael Wimmer

Non-Sampled Anti-AliasingVMV 2013

Thomas Auzinger 32

Page 33: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Limitations

Shading prefiltering

Needs closed-form solution

Only possible for simple shading modelsLinear gradients in image space

No perspective interpolation

No non-linear illumination models

33Thomas Auzinger

Page 34: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Our Contribution

Analytic RasterizationVisibility prefiltering

Shading prefiltering

Non-Sampled Anti-Aliasing (NSAA)Visibility prefiltering

Shading sampling

34Thomas Auzinger

Page 35: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Our Contribution

Analytic RasterizationVisibility prefiltering

Shading prefiltering

Non-Sampled Anti-Aliasing (NSAA)Visibility prefiltering

Shading sampling

35Thomas Auzinger

Page 36: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline

DesignFragment gathering

Weight computation

Final blending

36Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Page 37: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Fragment Gathering

37Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Page 38: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Fragment Gathering

Steps

Fragment count (DX)

Scan (GPGPU)

Fragment gathering (DX)

38Thomas Auzinger

0 1 2 1 0

1 2 2 1 1

1 2 2 2 1

0 1 1 1 0

0 0 1 3 4 4 5 ...

B B G G G G B B G ...

fragment histogram

offset buffer

primitive ID buffer

Page 39: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Weight Computation

39Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Page 40: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Weight Computation

StepsParallel hidden surface elimination (GPGPU)

Parallel visibility prefiltering (GPGPU)

40Thomas Auzinger

analytic convolutionanalytic visibility

Page 41: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Weight Computation

StepsParallel hidden surface elimination (GPGPU)

Parallel visibility prefiltering (GPGPU)

41Thomas Auzinger

B B G G G G B B G ...

primitive ID buffer

0.1 0.2 0.2 0.7 0.2 0.4 0.3 0.6 0.4 ...

weight buffer

Page 42: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Final Blending

42Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Page 43: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline – Final Blending

StepsCompute shading (DX)

Weighted blending (DX)

43Thomas Auzinger

0.1 0.2 0.2 0.7 0.2 0.4 0.3 0.6 0.4 ...

weight buffer

shading values

...+

Page 44: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Pipeline

44Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Page 45: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Results

Zone plate

45Thomas Auzinger

NSAAMSAA8

Page 46: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Results

Log grid

46Thomas Auzinger

NSAAMSAA8

Page 47: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Results – Filter Comparison

Radial filters

47Thomas Auzinger

Radial box GaussRadial tent

Page 48: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Timings

Bunny model at different LoDs

Implementation in CUDA

Output resolution: 1024²

GPU: Nvidia GTX 680

Timings in milliseconds

3-4 orders of magnitudeslower than super-sampling

Thomas Auzinger 48

# triangles visibility integration

7k 25 9.1

26k 50 21

70k 121 51

Page 49: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Conclusions

We presented methods for

High-performance sampling

Perfect-quality prefiltering

Future work

Supersampled shading

Polynomial shader interpolation

Transparency effects

Thomas Auzinger 49

Page 50: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Fin

Thank you for your attention!

Any questions?

50Thomas Auzinger

Page 51: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

In parallel for all edges

Unordered output global sort

Scan-based visible edge determination

Intersection

Thomas Auzinger 51

Page 52: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Tiling

Thomas Auzinger 52

Page 53: Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and Algorithms Vienna University of Technology.

Related Work

Josiah Manson and Scott SchaeferAnalytic Rasterization of Curves with Polynomial FiltersEurographics 2013 (Comp. Graph. Forum)

Josiah Manson and Scott SchaeferWavelet RasterizationEurographics 2010 (Comp. Graph. Forum)

G. Mistelbauer, A. Varchola, H. Bouzari, J. Starinsky, A. Köchl, R. Schernthaner, D. Fleischmann, E. Gröller, M. SrámekCenterline Reformations of Complex Vascular StructuresPacific Visualization Symposium 2012

Thomas Auzinger 53