Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and...

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

Transcript of Prefiltered Anti-Aliasing on Parallel Hardware Thomas Auzinger Institute of Computer Graphics and...

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

?

Examples

Font Rendering

Vector Graphics Display

Mesh Rendering

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

Design Choices

Which filter?

How to evaluate it?

Thomas Auzinger 4

Performance Quality

Thomas Auzinger 5

Filter Choice

Downsampling to half resolution:

Delta filter

Thomas Auzinger 6

Filter Choice

Downsampling to half resolution:

Box filter Hat filter Gaussian filter

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Thomas Auzinger 7

Performance Quality

Motivation – Filter Evaluation

Thomas Auzinger 8

Motivation – Filter Evaluation

Thomas Auzinger 9

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

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 10

Performance Quality

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

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

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 13

Performance Quality

Curved Surface Reformation

Sampling visibility

Supersampling shading

Interactive performance

Thomas Auzinger 14

View direction

Curved Surface Reformation

Thomas Auzinger 15

mpCPR CR CSR

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

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

Design Choices

Simple Higher Order

Which filter?

How to evaluate it?

Sampling Supersampling Prefiltering

Thomas Auzinger 18

Performance Quality

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

Thomas Auzinger 20

Prefiltering Overview

Overview:

Mesh inputSample positionsFilter supports Output

Thomas Auzinger 21

Prefiltering in 2D

Filter convolution:

yyxyx d)v( )( )(

Sample locationMesh dataFilter function

Thomas Auzinger 22

Prefiltering in 2D

Filter convolution:

yyxyx d)v( )( )(

Complicated integration domain

Intersection area Subdivision Integration domains

... ...,

Thomas Auzinger 23

Prefiltering in 2D

Filter convolution:

yyxyx d)(v )( )( 1

yyxyx d)(v )( )( 2

Thomas Auzinger 24

Prefiltering in 2D

Filter convolution:

Sample location

yyxyx d)v( )( )(

Mesh data & filter

Thomas Auzinger 25

Bonus: Prefiltering in 3D

Filter convolution:

yyxyx d)v( )( )(

Decomposition:

Intersection volume Subdivision Integration domains

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

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

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

Analytic Filtering

Visible edges not enough boundary completion

Thomas Auzinger 29

Results

Single zone plate

Thomas Auzinger 30

Results

Another (white) zone plate below

Thomas Auzinger 31

1 sample per pixelAnalytic rasterization

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

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

Our Contribution

Analytic RasterizationVisibility prefiltering

Shading prefiltering

Non-Sampled Anti-Aliasing (NSAA)Visibility prefiltering

Shading sampling

34Thomas Auzinger

Our Contribution

Analytic RasterizationVisibility prefiltering

Shading prefiltering

Non-Sampled Anti-Aliasing (NSAA)Visibility prefiltering

Shading sampling

35Thomas Auzinger

Pipeline

DesignFragment gathering

Weight computation

Final blending

36Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Pipeline – Fragment Gathering

37Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

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

Pipeline – Weight Computation

39Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Pipeline – Weight Computation

StepsParallel hidden surface elimination (GPGPU)

Parallel visibility prefiltering (GPGPU)

40Thomas Auzinger

analytic convolutionanalytic visibility

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

Pipeline – Final Blending

42Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

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

...+

Pipeline

44Thomas Auzinger

Polygon input

Fragment gathering

Weight computation

Final blending

Raster image

Results

Zone plate

45Thomas Auzinger

NSAAMSAA8

Results

Log grid

46Thomas Auzinger

NSAAMSAA8

Results – Filter Comparison

Radial filters

47Thomas Auzinger

Radial box GaussRadial tent

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

Conclusions

We presented methods for

High-performance sampling

Perfect-quality prefiltering

Future work

Supersampled shading

Polynomial shader interpolation

Transparency effects

Thomas Auzinger 49

Fin

Thank you for your attention!

Any questions?

50Thomas Auzinger

In parallel for all edges

Unordered output global sort

Scan-based visible edge determination

Intersection

Thomas Auzinger 51

Tiling

Thomas Auzinger 52

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