high-quality volume graphics volume graphics on consumer ...cs5610/lectures/vol ren intro.pdf ·...

8
1 High-Quality Volume Graphics on Consumer PC Hardware High-Quality Volume Graphics on Consumer PC Hardware Joe Kniss Markus Hadwiger Christof Rezk-Salama Rüdiger Westermann Gordon Kindlmann Volume Graphics Introduction Volume Graphics Introduction High-Quality Volume Graphics on Consumer PC Hardware Tutorial 2 Markus Hadwiger Introduction Introduction Motivation (1) Motivation (1) High-Quality Volume Graphics on Consumer PC Hardware Tutorial 2 Markus Hadwiger Motivation (2) Motivation (2) Scientific visualization DVR, iso, shading, mixed mode High-Quality Volume Graphics on Consumer PC Hardware Tutorial 2 Markus Hadwiger Applications Applications Medicine High-Quality Volume Graphics on Consumer PC Hardware Tutorial 2 Markus Hadwiger Example: CT Angiography Example: CT Angiography High-Quality Volume Graphics on Consumer PC Hardware Tutorial 2 Markus Hadwiger

Upload: others

Post on 15-Oct-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

1

High-Quality Volume Graphics on Consumer PC Hardware

High-Quality Volume Graphics on Consumer PC Hardware

JoeKniss

MarkusHadwiger

ChristofRezk-Salama

RüdigerWestermann

GordonKindlmann

Volume GraphicsIntroduction

Volume GraphicsIntroduction

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

IntroductionIntroduction

Motivation (1)Motivation (1)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Motivation (2)Motivation (2)Scientific visualization

DVR, iso, shading, mixed mode

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

ApplicationsApplicationsMedicine

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Example: CT AngiographyExample: CT Angiography

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Page 2: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

2

ApplicationsApplications

Engineering

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Computational Science

ApplicationsApplications

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Volume DataVolume DataContinuous scalar field in 3D

Discrete

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

volume:voxelsSamplingReconstruction

Sampling & ReconstructionSampling & ReconstructionRectilinear 3D grid; scalar valuesConvolution of samples withreconstruction filter (box, tent, …)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

boxbox tenttentsincsinc

Extract Geometry, then render

Surface extractionSurface extraction

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Without shadows With shadows

Direct Volume RenderingDirect Volume RenderingRender volume without extracting any surfaces (DVR)Map scalar values to optical properties (color, opacity)Need optical model

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Need optical modelSolve volume renderingintegral for viewingrays into the volume

Page 3: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

3

scatteringEmis

sion

active

Optical Models (1)Optical Models (1)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Abs

orpt

ion

active scattering

Optical Models (2)Optical Models (2)Light interaction with density

volume of particles

Absorption only

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Emission onlyAbsorption + emissionScattering + shading/shadowingMultiple scattering

Ray CastingRay CastingNumerical approximation ofvolume rendering integralResample volume at equi-spaced intervals along the rayTri linear

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Tri-linearinterpolation

IntegrationIntegrationWhat must be integrated?

physically correct: emission and absorption of light

Ray

s0Absorption along the distance s0 - s

I(s0)

s

Optical Depth

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

the distance s0 s

Initial intensity (Emission) at s0

Optical Depth τAbsorption к

What must be integrated?physically correct: emission and absorption of light

IntegrationIntegration

Ray

ss~

~q(s)

s0

I(s0)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Absorption along the distance s - s ~Active Emission

at s~

Discrete SolutionDiscrete SolutionResample the scalar field at discrete locations along the viewing ray:

Ray

T(s) T(s)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Back-to-front Compositing with

Page 4: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

4

Alpha BlendingAlpha BlendingNumerical approximation ofvolume rendering integralBack-to-front compositing

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

New composited color is color at current location blended with previous composited colorOpacity-weighted colors!

scalar value s

( )

How do I obtain the emission valuesand Absorption values ?

ClassificationClassification

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

emission RGBabsorption A

T(s)

Alternative CompositingAlternative CompositingMaximum Intensity Projection (MIP)

• no Emission and Absorption

• pixel value is the maximum scalar value alongthe viewing ray

Scalar value SMaximum Smax

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Strahls0 s

• Advantage: transfer function not required!

• Drawback: misleading depth information!

Scalar value Smax

Maximum Intensity ProjectionMaximum Intensity Projection

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Emission/Absorption Maximum Intensity Proj.

Volume Graphics on GPUs

Volume Graphics on GPUs

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Texture-Based MethodsTexture-Based Methods

Ray CastingRay CastingNumerical approximation ofvolume rendering integralResample volume at equi-spaced intervals along the rayTri linear

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Tri-linearinterpolation

Page 5: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

5

IntroductionIntroductionData Set Proxy Geometry Image

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Texture-Based MethodsTexture-Based MethodsProxy Geometry

2D textured slices3D textured slices2D slice interpolation

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Volume Renderer ComponentsSetup and texture downloadFragment shader and blending setupProxy geometry rendering

Slice Decomposition(Proxy Geometry)

Rendering oftextures slices Final Image

Volume Rendering Pipeline

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

TrilinearHardware

InterpolationCompositing(Blending)

Geometry ProcessingGeometry Processing

Proxy Geometry (Polygonal Slices)

No volumetric hardware primitives!

GeometryProcessing Rasterization Fragment

Operations

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

2D Textures2D Textures

Axis-aligned slicesAxis-aligned slicesBilinear Interpolation in Hardware

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

3 copies of the data set in memory!

2D Textures: Drawbacks2D Textures: DrawbacksBilinear instead of trilinear interpolation

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Page 6: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

6

2D Textures: Drawbacks2D Textures: DrawbacksInconsistent sampling rate

d d´ ≠ d

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Emission/Absorbtion incorrectSupersampling not possible!

2D Textures: Drawbacks2D Textures: DrawbacksSelect slice stack for viewpoint

Locations of sampling pointsmay change abruptly!

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Stack switches are noticeable

Better: 3D TexturenBetter: 3D Texturen

Viewport aligned slicesViewport aligned slicesTrilinear Interpolation in Hardware

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Volume is one texture block in memory

Advantages:Advantages:consistent sampling rate(except for perspective projection)

d d

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Supersampling by increasing thenumber of slices

BrickingBrickingDataset is too large to fitinto local video memorySubdivide the data into Smaller chunks (bricks)

Bottleneck: Bus-Bandwidth

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

GPU

Bus

Bottleneck: Bus BandwidthBad load balancing for GPU and Bus

Load Brick Load Brick

DrawDraw

Time

BrickingBricking

Keep the bricks small enough! More than one brick must fit into local video memory!

Texture transfer and rendering t b f d i ll l

Possible Solutions

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

must be performed in parallel.Higher CPU load for slice decomposition!Effective load balancing is still difficult!

Alternative:Use 2D multi-textures instead of 3D textures!

Page 7: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

7

CompositingCompositingFragment Operations:

GeometryProcessing Rasterization Fragment

Operations

Stencil AlphaDepthAlpha

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Test BlendingTestTest

DISABLEDDISABLED DISABLEDDISABLED ENABLEDENABLED ENABLEDENABLED

Fragments

CompositingCompositingRay Integration

Back-to-front Compositing

Ray

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Alpha Blending

glEnable(GL_BLEND);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

CompositingCompositingMaximum Intensity ProjectionsOpenGL Extension: GL_EXT_blend_minmax

Alpha Blending: Maximum Operator

glEnable(GL_BLEND);f d f d bl d

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

#if defined GL_EXT_blend_minmaxglBlendEquationEXT(GL_MAX_EXT);glBlendFunc(GL_SRC_COLOR, GL_DST_COLOR);

#endif // GL_EXT_blend_minmax

CompositingCompositing

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Emission/Absorption Maximum Intensity Proj.

Opacity CorrectionOpacity CorrectionSampling distance depends on slice distance: adjust integrationMay depend on viewing direction(2D-textured slices)

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Texture DefinitionTexture DefinitionVolume textures

Palette indices (pre-class.)Intensity texture (post-class.)

T f f ti t bl

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Transfer function tablesTexture paletteTransfer function texture (1D, …)Pre-integration texture (2D)

Page 8: High-Quality Volume Graphics Volume Graphics on Consumer ...cs5610/lectures/Vol Ren Intro.pdf · Data Set Proxy Geometry Image High-Quality Volume Graphics on Consumer PC Hardware

8

Per-Volume SetupPer-Volume SetupFragment shader configuration

Transfer function application, shading, slice interpolation, …

Blending mode configurationFinal conversion fragment pixel

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Final conversion fragment pixelTexture unit configuration (3D)

When view-aligned slices are usedAll slices use the same texture

Fragment Shader Config (1)Fragment Shader Config (1)NVIDIA GeForce 3/4

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Fragment Shader Config (2)Fragment Shader Config (2)ATI Radeon 8500

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Per-Slice SetupPer-Slice SetupTexture unit configuration (2D)

When object-aligned slices are usedEach slice uses different texture

Slice interpolation needs two

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Slice interpolation needs two adjacent slice texturesFractional position between slices for slice interpolation

Generate FragmentsGenerate FragmentsRender proxy geometry

Submit slices in back-to-front order2D textured slices

Align slices with volumeS if t d f h li

High-Quality Volume Graphics on Consumer PC Hardware

Tutorial 2 Markus Hadwiger

Specify texcoords for each slice3D textured slices

Align slices with viewportUse automatic texcoord generation