Visualization Week 11, Fri Mar 30 - - PowerPoint PPT Presentation

visualization week 11 fri mar 30
SMART_READER_LITE
LIVE PREVIEW

Visualization Week 11, Fri Mar 30 - - PowerPoint PPT Presentation

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Visualization Week 11, Fri Mar 30 http://www.ugrad.cs.ubc.ca/~cs314/Vjan2007 News extra TA office hours in lab for hw/project Q&A next week:


slide-1
SLIDE 1

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner http://www.ugrad.cs.ubc.ca/~cs314/Vjan2007

Visualization Week 11, Fri Mar 30

slide-2
SLIDE 2

2

News

  • extra TA office hours in lab for hw/project

Q&A

  • next week: Thu 4-6, Fri 10-2
  • last week of classes:
  • Mon 2-5, Tue 4-6, Wed 2-4, Thu 4-6, Fri 9-6
  • final review Q&A session
  • Mon Apr 16 10-12
  • reminder: no lecture/labs Fri 4/6, Mon 4/9
slide-3
SLIDE 3

3

Review: Collision Proxy Tradeoffs

increasing complexity & tightness of fit

decreasing cost of (overlap tests + proxy update)

AABB OBB Sphere Convex Hull 6-dop

  • collision proxy (bounding volume) is piece of geometry used

to represent complex object for purposes of finding collision

  • proxies exploit facts about human perception
  • we are bad at determining collision correctness
  • especially many things happening quickly
slide-4
SLIDE 4

4

Review: Spatial Data Structures

uniform grids bounding volume hierarchies

  • ctrees

BSP trees kd-trees OBB trees

slide-5
SLIDE 5

5

Review: Aliasing

  • incorrect appearance of high frequencies as

low frequencies

  • to avoid: antialiasing
  • supersample
  • sample at higher frequency
  • low pass filtering
  • remove high frequency function parts
  • aka prefiltering, band-limiting
slide-6
SLIDE 6

6

Review: Supersample and Average

  • supersample: create image at higher resolution
  • e.g. 768x768 instead of 256x256
  • shade pixels wrt area covered by thick line/rectangle
  • average across many pixels
  • e.g. 3x3 small pixel block to find value for 1 big pixel
  • rough approximation divides each pixel into a finer grid of pixels

6/9 9/9 5/9 9/9 0/9 4/9

slide-7
SLIDE 7

7

Review: Image As Signal

  • 1D slice of raster image
  • discrete sampling of 1D spatial signal
  • theorem
  • any signal can be represented as an (infinite)

sum of sine waves at different frequencies

Examples from Foley, van Dam, Feiner, and Hughes

Pixel position across scanline

Intensity

slide-8
SLIDE 8

8

Review: Sampling Theorem and Nyquist Rate

  • Shannon Sampling Theorem
  • continuous signal can be completely recovered from

its samples iff sampling rate greater than twice maximum frequency present in signal

  • sample past Nyquist Rate to avoid aliasing
  • twice the highest frequency component in the

image’s spectrum

slide-9
SLIDE 9

9

Review: Low-Pass Filtering

slide-10
SLIDE 10

10

Scientific Visualization

slide-11
SLIDE 11

11

Reading

  • FCG Chapter 23
slide-12
SLIDE 12

12

Surface Graphics

  • objects explicitly defined by surface or

boundary representation

  • mesh of polygons

200 polys 1000 polys 15000 polys

slide-13
SLIDE 13

13

Surface Graphics

  • pros
  • fast rendering algorithms available
  • hardware acceleration cheap
  • OpenGL API for programming
  • use texture mapping for added realism
  • cons
  • discards interior of object, maintaining only the shell
  • operations such cutting, slicing & dissection not

possible

  • no artificial viewing modes such as semi-

transparencies, X-ray

  • surface-less phenomena such as clouds, fog & gas

are hard to model and represent

slide-14
SLIDE 14

14

Volume Graphics

  • for some data, difficult to create polygonal mesh
  • voxels: discrete representation of 3D object
  • volume rendering: create 2D image from 3D object
  • translate raw densities into colors and

transparencies

  • different aspects of the dataset can be emphasized

via changes in transfer functions

slide-15
SLIDE 15

15

Volume Graphics

  • pros
  • formidable technique for data exploration
  • cons
  • rendering algorithm has high complexity!
  • special purpose hardware costly (~$3K-$10K)

volumetric human head (CT scan)

slide-16
SLIDE 16

16

Isosurfaces

  • 2D scalar fields: isolines
  • contour plots, level sets
  • topographic maps
  • 3D scalar fields: isosurfaces
slide-17
SLIDE 17

17

Volume Graphics: Examples

anatomical atlas from visible human (CT & MRI) datasets industrial CT - structural failure, security applications flow around airplane wing shockwave visualization: simulation with Navier-Stokes PDEs

slide-18
SLIDE 18

18

Isosurface Extraction

  • array of discrete point

samples at grid points

  • 3D array: voxels
  • find contours
  • closed, continuous
  • determined by iso-value
  • several methods
  • marching cubes is most

common

1 2 3 4 3 2 7 8 6 2 3 7 9 7 3 1 3 6 6 3 1 1 3 2 Iso-value = 5

slide-19
SLIDE 19

19

MC 1: Create a Cube

  • consider a cube defined by eight data values

(i,j,k) (i+1,j,k) (i,j+1,k) (i,j,k+1) (i,j+1,k+1) (i+1,j+1,k+1) (i+1,j+1,k) (i+1,j,k+1)

slide-20
SLIDE 20

20

MC 2: Classify Each Voxel

  • classify each voxel according to whether lies
  • outside the surface (value > iso-surface

value)

  • inside the surface (value <= iso-surface value)

8

Iso=7

8 8 5 5 10 10 10

Iso=9 =inside =outside

slide-21
SLIDE 21

21

MC 3: Build An Index

  • binary labeling of each voxel to create index

v1 v2 v6 v3 v4 v7 v8 v5

inside =1

  • utside=0

11110100 00110000 Index:

v1 v2 v3 v4 v5 v6 v7 v8

slide-22
SLIDE 22

22

MC 4: Lookup Edge List

  • use index to access array storing list of edges
  • all 256 cases can be derived from 15 base

cases

slide-23
SLIDE 23

23

MC 4: Example

  • index = 00000001
  • triangle 1 = a, b, c

a b c

slide-24
SLIDE 24

24

MC 5: Interpolate Triangle Vertex

  • for each triangle edge
  • find vertex location along edge using linear

interpolation of voxel values

=10 =0 T=8 T=5 i i+1 x

[] [ ] []

       − + − + = i v i v i v T i x 1

slide-25
SLIDE 25

25

MC 6: Compute Normals

  • calculate the normal at each cube vertex
  • use linear interpolation to compute the

polygon vertex normal

1 , , 1 , , , 1 , , 1 , , , 1 , , 1 − + − + − +

− = − = − =

k j i k j i z k j i k j i y k j i k j i x

v v G v v G v v G

slide-26
SLIDE 26

26

MC 7: Render!

slide-27
SLIDE 27

27

Direct Volume Rendering

  • do not compute surface
slide-28
SLIDE 28

28

Rendering Pipeline

Classify

slide-29
SLIDE 29

29

Classification

  • data set has application-specific values
  • temperature, velocity, proton density, etc.
  • assign these to color/opacity values to make

sense of data

  • achieved through transfer functions
slide-30
SLIDE 30

30

Transfer Functions

  • map data value to color and opacity
slide-31
SLIDE 31

31

Transfer Functions

Human Tooth CT

α(f)

RGB(f)

f

RGB

shading, compositing…

α

Gordon Kindlmann

slide-32
SLIDE 32

32

Setting Transfer Functions

  • can be difficult, unintuitive, and slow

f α f α f α f α

Gordon Kindlmann

slide-33
SLIDE 33

33

Rendering Pipeline

Classify Shade

slide-34
SLIDE 34

34

Light Effects

  • usually only consider reflected part

Light

absorbed transmitted reflected Light=refl.+absorbed+trans.

Light

ambient specular diffuse

s s d d a a

I k I k I k I + + =

Light=ambient+diffuse+specular

slide-35
SLIDE 35

35

Rendering Pipeline

Classify Shade Interpolate

slide-36
SLIDE 36

36

Interpolation

  • given:
  • needed:

2D 1D

  • given:
  • needed:

nearest neighbor linear

slide-37
SLIDE 37

37

Rendering Pipeline

Classify Shade Interpolate Composite

slide-38
SLIDE 38

38

Volume Rendering Algorithms

  • ray casting
  • image order, forward viewing
  • splatting
  • object order, backward viewing
  • texture mapping
  • object order
  • back-to-front compositing
slide-39
SLIDE 39

39

Ray Traversal Schemes

Depth Intensity Max Average Accumulate First

slide-40
SLIDE 40

40

Ray Traversal - First

  • first: extracts iso-surfaces (again!)

Depth Intensity First

slide-41
SLIDE 41

41

Ray Traversal - Average

  • average: looks like X-ray

Depth Intensity Average

slide-42
SLIDE 42

42

Ray Traversal - MIP

  • max: Maximum Intensity Projection
  • used for Magnetic Resonance Angiogram

Depth Intensity Max

slide-43
SLIDE 43

43

Ray Traversal - Accumulate

  • accumulate: make transparent layers visible

Depth Intensity Accumulate

slide-44
SLIDE 44

44

Splatting

  • each voxel represented as fuzzy ball
  • 3D gaussian function
  • RGBa value depends on transfer function
  • fuzzy balls projected on screen, leaving

footprint called splat

  • composite front to back, in object order
slide-45
SLIDE 45

45

Texture Mapping

  • 2D: axis aligned 2D textures
  • back to front compositing
  • commodity hardware support
  • must calculate texture

coordinates, warp to image plane

  • 3D: image aligned 3D texture
  • simple to generate texture

coordinates

slide-46
SLIDE 46

46

InfoVis Example: TreeJuxtaposer

  • side by side comparison of evolutionary trees
  • stretch and squish navigation
  • guaranteed visibility
  • progressive rendering
  • demo - downloadable from http://olduvai.sf.net/tj