• Keine Ergebnisse gefunden

Hardware Accelerated Volume Visualization

N/A
N/A
Protected

Academic year: 2022

Aktie "Hardware Accelerated Volume Visualization"

Copied!
39
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Hardware Accelerated Volume Visualization

Leonid I. Dimitrov & Milos Sramek

GMI

Austrian Academy of Sciences

(2)

A Real-Time VR System

Real-Time: 25-30 frames per second

4D visualization: real time input of data volumes

High resolution data sets: 5123, 16 bit

High image quality: shading, transparency, depth cues

Interactive parameter changes: lookup tables, classification

(3)

Real-Time Data Visualization

Simulation / visualization

Acquisition / visualization

Render

Render

E.g., Surgical Simulation E.g., Surgical Simulation

E.g., 3D Ultrasound E.g., 3D Ultrasound

(4)

Processing Requirements

High demands on storage, processing, and communication of data

E.g., a 5123 volume:

224 samples 30 instructions 30 frames/sec

500 MBytes/sec band-width between processor and memory.

256 MBytes of storage

120 billion instructions per second.

(5)

HW Acceleration

General-Purpose Supercomputers

Special Architectures

Graphics Accelerators

(6)

General-Purpose Supercomputers

MIMD (e.g. SGI Challenge - 16 processors, shared memory

Performance 5-10 fps (Lacroute 1995)

Drawbacks:

very expensive

shared among users

(7)

Special Architectures

Not specialized on volume rendering (video or polygon processing)

The PIXAR and PIXAR II Image Computer (1984)

Pixel-Planes 5 (Fuchs 1989)

(8)

PIXAR

Primary purpose: Visual effects in film industry

Used for volume rendering (Drebin 1988)

Fast volume rotation by shearing.

Accumulation along volume rows

(9)

Pixel-Planes 5

Multipurpose system (ray casting, splatting)

Graphics processors (20) and Renderers (8)

192192128 data sets at 11 frames per second

Problems

with

bandwidth

(10)

Volume Rendering Accelerators

PARCUM (Jackel 1985)

parallel ray casting

5123 in about a minute

The Voxel Processor (Goldwasser 1983)

octree scene subdivision

hierarchy of rendering an display processors

back-to-front rendering of binary data, image- space shading

2563, 25 fps

Never built

(11)

SGI Reality Engine

Texture mapping of polygons through 3D texture memory

Multiple Raster Manager boards (16MB textures each)

Rendering technique:

planar texture resampling

10 fps (51251264) Cabral 1994

No shading

Ray Casting Planar Texture Resampling

(12)

The CUBE Project (Kaufman 1988)

Based on a Cubic Frame Buffer (CFB)

linear memory skewing, simultaneous access to a beam of voxels

Cube 1: orthonormal projections

163 data sets, 16 boards

Cube 2: ditto, VLSI implementation (14000 transistors)

Resulted in VolumePro (1999)

(13)

VolumePro: The Ray-Casting Pipeline

Data traversal

For each pixel, step along a ray

Resampling

Tri-linear interpolation

Classification

Assign RGBA to each sample

Shading

Estimate gradients (normals)

Per-sample illumination

Compositing

Blend samples into pixel color

Compositing Compositing RGBA LUT RGBA LUT

Illumination Illumination 3D Gradients 3D Gradients

DataData Traversal Traversal DataData

Buffers Buffers

Memory Interface Memory Interface

Interpolation Interpolation

(14)

Super-Sampling Along Rays

SS = 1 SS = 2 SS = 4

(15)

Real-Time Classification

Interactive design of color and opacity transfer functions Interactive design of color and opacity transfer functions

(16)

The Phong Illumination Model

No Illumination

No Illumination Phong IlluminationPhong Illumination Color = (ke + kd Id ) SampleColor + ks Is SpecularColor

Emissive

Emissive DiffuseDiffuse SpecularSpecular

(17)

3D Line Cursor and Cut

Plane

(18)

3D Line Cursor and

Cropping

(19)

The VG500 Board

(20)

VolumePro 500 Summary

DVR with trilinear interpolation and Phong sampling

Future (??)

Perspective projection

Objects (masking)

Overlapping volumes

Intermixing volumes and geometry

(21)

2D Texture Mapping

texturesX Y

textures Z

textures tracedRay

Rendered by VolView on standard 8MB graphic board (1998)

(22)

3D Texture-Mapping HW

Volume is a 3D texture

Proxy geometry:

polygons perpendicular to viewing direction

Clipping against volume bounding box

Assign 3D texture

coordinates to each vertex of the clipped polygons

Project back-to-front using OpenGL blending operations

Originally, no shading!!

(23)

3D

Texture Mapping

Increasing sampling

rate

(24)

Programmable Graphics HW

Nvidia, ATI

Vertex & Fragment Shaders run programs

Scene description

Geometry

processing Rasterization Fragment operations

Vertices Primitives Fragments Pixels Image

(25)

Modern GPUs: Unified Design

Vertex shaders, pixel shaders, etc. become threads running different programs on flexible cores

(26)

A Modern GPU Architecture

(27)

C for Graphics (Cg)

A C-style language for writing vertex and fragment programs

On-demand system-dependent compilation

Significant simplification o HW programing

(28)

DVR using HW acceleration

Proxy geometry based

A set o polygons

Defines relation between volume (3D texture) and viewing parameters

Polygons textured by the shading program

The role of HW

Texture interpolation

Evaluation of the program

Blending of textured polygons

(29)

A Cg example (1)

Shading by setting RGB colors to data gradient

output_data main(

input_data IN,

uniform sampler3D volume) {

output_data OUT;

float4 color1 = tex3D(volume, IN.texcoord1);

float3 normal;

float3 t0 = IN.texcoord1; float3 t1 = IN.texcoord1;

t0.x-=K; t1.x+=K;

normal.x = tex3D(volume,t1).r-tex3D(volume,t0).r;

...

normal = normalize(normal);

OUT.color.rgb = normal*0.5+0.5;

OUT.color.a = color1.a;

return OUT;

}

(30)

A Cg example (2)

Surface enhancement and shading

output_data main(input_data IN, uniform float3 light,

uniform sampler3D volume, uniform sampler3D gradient {

output_data OUT;

float4 color1 = tex3D(volume,IN.texcoord1);

float3 normal = tex3D(gradient,IN.texcoord1);

float3 vecToLight = normalize(light - IN.position);

float difuseLight = max(dot(

normalize(normal),vecToLight),0);

OUT.color.xyz = float3(1.0,1.0,0.0)*difuseLight;

OUT.color.a = 10*length(normal)*color1.a;

return OUT;

}

(31)

GPU-based Volume Ray Casting

On principle the same as CPU ray casting

Special conditions of the environment

Store volume as 3D- texture, cast rays in fragment program, ...

(32)

Basic Ray Setup

Start & end point and direction rquired

Evaluated in shader by rasterization of the volume bounding box

Back face Front face Ray directions

(33)

Standard Optimizations Possible

Early ray termination:

Isosurface: stop on a surface

DVR: stop when accumulated opacity >

threshold

Empty space skipping:

skip transparent samples

Traverse hierarchy (e.g.: octree)

(34)

Empty Space Skipping

Bricking: use approximation instead of the bounding volume

(35)

Intersection Refinement

Bisection: fixed step number or refinement

(36)

Advanced Techniques

Light interaction

Illumination models

Reflection

Shadows

Semi-transparent shadows

Ambient occlusion (local, dynamic)

Scattering (single and multiple, Monte- Carlo,...)

(37)

A few results...

(38)

GPU for General

Computations (gpgpu)

Modern GPUs: Single and double

precision computational units available

Accessible through special API

CUDA (NVIDIA)

Brooks (ATI)

OpenCL (HW independent, support multiple CPUs)

Often used in supercomputers (see top500.org)

(39)

Gpgpu example: Gaussian filtering

Filtering of m3 volume by n3 filter

Theoretical complexity: 3nm3

GPU requires enough data to process

Referenzen

ÄHNLICHE DOKUMENTE

After that we explain in chapter 5.3 how occlusion culling can be combined with hardware accelerated rendering of directional light maps for interactive walkthroughs in large

Other Visual Properties / Glyph Appearance Pre-attentive visual stimuli such as position, width, size, ori- entation, curvature, colour (hue), or intensity are a powerful way

Key-words: Diagonals of rational functions, Heun functions, creative telescoping, extremal rational elliptic surfaces, pullbacked hypergeometric functions, Schwarz map,

keywords Inverse Scattering, Far Field Pattern Data, Robin Type Boundary Conditions, Bound- ary Integral Methods, Level Set Methods, Shape Derivative..

For direct volume rendering, transfer functions map ultrasound data, i.e., voxel echogenicity in B–mode imaging, and frequency information in Doppler imaging, onto colors

Listing 3: This View / HLSL code is generated from the semantic model / shader tree example (see Figure 3.3), which is based on the iDSL example from Listing 2..

Model 2 includes the same dummy variables for secondary formal debt instruments but replaces the bank loan dummy with a dummy variable for broad bank debt (bank loan, overdraft,

Similar to the ‘color transfer’ method, the cumulative distribution function (CDF) is working with statistical characteristics in a decorrelated color space. It is based on the work