Hardware-Assisted Visibility Sorting
This presentation is the property of its rightful owner.
Sponsored Links
1 / 63

Hardware-Assisted Visibility Sorting for Tetrahedral Volume Rendering PowerPoint PPT Presentation


  • 97 Views
  • Uploaded on
  • Presentation posted in: General

Hardware-Assisted Visibility Sorting for Tetrahedral Volume Rendering. Steven Callahan Milan Ikits Jo ã o Comba Cl á udio Silva. Overview. Introduction Previous Work Hardware-Assisted Visibility Sorting Results Future Work Conclusion. Research Goal. Real-time volume rendering

Download Presentation

Hardware-Assisted Visibility Sorting for Tetrahedral Volume Rendering

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Hardware assisted visibility sorting for tetrahedral volume rendering

Hardware-Assisted Visibility Sortingfor Tetrahedral Volume Rendering

Steven Callahan Milan Ikits

João Comba Cláudio Silva


Overview

Overview

  • Introduction

  • Previous Work

  • Hardware-Assisted Visibility Sorting

  • Results

  • Future Work

  • Conclusion


Research goal

Research Goal

  • Real-time volume rendering

    • Scalable (machine performance)

    • Data of arbitrary size

    • Simple and robust implementations


Volume rendering

Volume Rendering

Regular

Irregular


Why irregular grids

Why Irregular Grids ?

Unstructured grids are the preferred data type in scientific computations

Level-Of-Detail (LOD) techniques intrinsically need unstructured grids

El-Sana et al, Ben-Gurion


Optical models

Optical Models

Absorption plus emission

Light

s

s


Compositing

Compositing

Front-to-back

I1

I0

I2

1

2

0

I01

I2

2

01


Volume rendering intersection sampling sorting

Volume Rendering: (Intersection) Sampling + Sorting


Sampling triangle based approach

Sampling: Triangle-Based Approach

Class 1 (+, +, +, -)

Class 2 (+, +, -, -)

Projected Tetrahedra [Shirley-Tuchman 1990]


Sorting

Sorting

Application

Object-Space

Sorting

i.e., let’s sort the geometry!

Rasterization

Image Space

Display


Cell projection

Cell-Projection

B

7

5

6

A

3

4

p

2

1

A < B

p


Object space sorting williams mpvo

Object-Space Sorting: Williams’ MPVO

B < A

A < C

B < E

C < E

C < D

E < F

D < F

Idea: Define ordering relations

by looking at shared faces.

D

A

C

F

B

E

Viewing direction


Mpvo limitations

MPVO Limitations

Missing relations!


Xmpvo

XMPVO

A < C

B < D

Idea: Using ray shooting queries to complement ordering relations.

C

D

A

B

A < B

Viewing direction


Sorting1

Sorting

Application

Object Space

Rasterization

Image-Space

Sorting

Display

i.e., let’s sort the pixels!


Image space sorting a buffer

Image-Space Sorting: A-Buffer

  • Idea: Keep a list of intersections for each pixel.

[Carpenter 1984]


Cell projection with an a buffer

Cell-Projection With An A-Buffer


Cell projection with an a buffer1

Cell-Projection With An A-Buffer


Cell projection with an a buffer2

Cell-Projection With An A-Buffer


Cell projection with an a buffer3

Cell-Projection With An A-Buffer


Cell projection with an a buffer4

Cell-Projection With An A-Buffer


Cell projection with an a buffer5

Cell-Projection With An A-Buffer


Cell projection with an a buffer6

Cell-Projection With An A-Buffer


Cell projection with an a buffer7

Cell-Projection With An A-Buffer


Cell projection with an a buffer8

Cell-Projection With An A-Buffer


Cell projection with an a buffer9

Cell-Projection With An A-Buffer


Cell projection with an a buffer10

Cell-Projection With An A-Buffer


Cell projection with an a buffer11

Cell-Projection With An A-Buffer


Cell projection with an a buffer12

Cell-Projection With An A-Buffer

Not sorted!


Cell projection with an a buffer13

Cell-Projection With An A-Buffer

Sorted!


A buffer limitations

A-Buffer Limitations

2

Number of Intersections: O(cn )

n x n pixels

c cells

  • Problems

    • Time: sorting takes too long

    • Memory: storage too high


Sorting2

Sorting

Application

Object-Space

Sorting

Rasterization

Image-Space

Sorting

Display


Approximate object space sorting

Approximate Object-Space Sorting

1


Approximate object space sorting1

Approximate Object-Space Sorting

1

2


Approximate object space sorting2

Approximate Object-Space Sorting

3

1

2


Approximate object space sorting3

Approximate Object-Space Sorting

3

5

1

4

2


Approximate object space sorting4

Approximate Object-Space Sorting

3

6

5

7

1

4

2


Approximate object space sorting5

Approximate Object-Space Sorting

3

7

5

6

1

4

2

A Solution: Use an insertion-sort A-buffer!


Approximate object space sorting6

Approximate Object-Space Sorting

What about the space problem?

3

7

5

6

1

4

2

 Use a conservative bound on the intersections


Hardware assisted visibility sorting havs

Hardware Assisted Visibility Sorting (HAVS)

  • Sort in image-space and object-space

    • Do an approximate object-space sorting of the cells on the CPU (i.e. sort by face centroid)

    • Complete the sort in image-space by using a fixed depth A-buffer (called a k-buffer) implemented on the GPU

    • Can handle non-convex meshes, has a low memory overhead, and requires minimal pre-processing of data


Havs overview

HAVS Overview


K buffer

k-buffer

  • Fixed size A-buffer of depth k

  • Fragment stream sorter

  • Stores k entries for each pixel. Each entry consists of the fragment’s scalar value and its distance to the viewpoint

  • An incoming fragment replaces the entry that is closest to the eye (front-to-back compositing)

  • Given a sequence of fragments such that each fragment is within k positions from its position is sorted order, it will output the fragments in sorted order


K buffer hardware implementation

k-buffer: Hardware Implementation

r

a

b

g

g comp

r comp

b comp

a comp

v1

v2

d2

d1

v3

d4

d3

v4

d5

v6

v5

d6

  • Use multiple render target capability of ATI graphics cards (ATI_draw_buffers in OpenGL)

  • Use P-buffer to accumulate color and opacity and three Aux buffers for the k-buffer entries

P-buffer

Aux 0

Aux 1

Aux 2


Fragment shader overview

Fragment Shader Overview


Details

Details

  • Fix incorrect screen-space texture coordinates caused by perspective-correct interpolation

Projecting vertices to find tex coords

Projecting tex coords in shader

Perspective interpolation


Details1

Details

  • Simultaneously reading and writing to a buffer is undefined when fragments are rasterized in parallel


Details2

Details

  • The buffers are initialized and flushed using k screen-aligned rectangles with negative scalar values

  • Handling non-convex objects requires the exterior faces to be tagged with a negative distance d and keeping track of when we are inside or outside of the mesh with the sign of the scalar value v


Details3

Details

  • Early ray termination reads accumulated opacity and kills fragment if it is over a given threshold. Early z-test is currently not available on ATI 9800 when using multiple rendering targets


Pre integrated transfer function

Pre-Integrated Transfer Function

  • Previous Work

    • Volume density optical model

      • Williams and Max 1992

    • Pre-integration on GPU

      • Roettger et al. 2000

      • 5 s to update a 128x128x128 table

    • Incremental pre-integration on CPU

      • Wieler et al. 2003

      • 1.5 s to update a 128x128x128 table


Pre integrated transfer function1

Pre-Integrated Transfer Function

S

S

f

b

l

  • Williams and Max


Pre integrated transfer function2

Pre-Integrated Transfer Function

n = 0…l

max

T

3D

S

b

S

f

  • Roettger et al.


Pre integrated transfer function3

Pre-Integrated Transfer Function

S

S

S

f

p

b

 l

l’

l

  • Weiler et al.


Pre integrated transfer function4

Pre-Integrated Transfer Function

  • Our Approach

    • Incremental pre-integration of the 3D transfer function completely on the GPU

      • Compute base slice using [Roettger et al.]

      • Compute the other slices using the base slice and the previously computed slice [Weiler et al.]

    • 0.067 s to update a 128x128x128 table

    • This allows interactive updates to the colormap and transfer function opacity


Experiments

Experiments

  • Environment

    • 3.0 GHz Pentium 4

    • 1024 MB RAM

    • Windows XP

    • ATI Radeon 9800 Pro

  • Results

    • k-buffer analysis

    • Performance results


K buffer analysis

K-buffer Analysis

  • Accuracy analysis

    • Analysis of k depth required to correctly render datasets

    • Max values from 14 fixed viewpoints


K buffer analysis1

k-buffer Analysis

  • Distribution analysis

    • Shows actual pixels that require large k depths to render correctly for each viewpoint

k <= 2 (green) 2 < k <= 6 (yellow) k > 6 (red)


Results

Results

  • Performance

    • Average values from 14 fixed viewpoints

    • Does not include partial sort on CPU

    • 512 x 512 viewport with a 128 x 128 x 128 pre-integrated transfer function


Image blunt fin

Image – Blunt Fin


Image spx

Image - Spx


Image torso

Image – Torso


Image fighter

Image - Fighter


Future work

Future Work

  • Optimize partial sort on CPU

  • Develop techniques to refine datasets to respect a given k (subdivide degenerate tets)

  • Incorporate isosurface rendering

  • Parallel techniques

  • Proper hole handling

  • Dynamic data

  • Use early z-test


Conclusion

Conclusion

  • Renders up to 6 million Tets/sec when using a linear transfer function

  • Handles arbitrary non-convex meshes

  • Requires minimal pre-processing of data

  • Maximum data size is bounded by main memory

  • Uses simple vertex and fragment shaders


  • Login