University of British Columbia CPSC 314 Computer Graphics May-June 2005 Tamara Munzner Scientific Visualization,

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CS 551 / 645: Introductory Computer Graphics Visible Surface Determination.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645: Introductory Computer Graphics
UBI 516 Advanced Computer Graphics
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Visualization Week 11,
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Virtual Trackball, Scientific.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Clipping II, Hidden Surfaces.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Textures I Week 8, Mon.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Interpolation Clipping.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Information Visualization.
1 Scientific Visualization Melanie Tory Acknowledgments: Torsten Möller (Simon Fraser University) Raghu Machiraju (Ohio State University) Klaus Mueller.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Introduction to Volume Rendering Presented by Zvi Devir.
(conventional Cartesian reference system)
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Visibility II Week 7,
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Spatial/Scientific Visualization.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Hidden Surfaces II Week.
University of British Columbia CPSC 314 Computer Graphics May-June 2005 Tamara Munzner Sampling, Virtual Trackball,
Volume Visualization Acknowledgements: Torsten Möller (SFU)
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Visibility Week 9, Fri 31 Oct 2003.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Visibility Week 7, Wed.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Visibility: Z Buffering Week 10, Mon 3 Nov 2003.
02/04/03 Page 1 Rendering Visibility Lighting Texturing.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Importance Driven Volume Rendering Authors: I. Viola, A. Kanitsar, M. Gröler Visualization II Instructor: Jessica Crouch.
Hidden Surface Removal
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Visible-Surface Detection Jehee Lee Seoul National University.
CMSC 635 Volume Rendering. Volume data  3D Scalar Field: F(x,y,z) = ?  Implicit functions  Voxel grid  Scalar data  Density  Temperature  Wind.
Volume Rendering CMSC 491/635. Volume data  3D Scalar Field: F(x,y,z) = ?  Implicit functions  Voxel grid  Scalar data  Density  Temperature  Wind.
Binary Space Partitioning Trees Ray Casting Depth Buffering
3D Volume Visualization. Volume Graphics  Maintains a 3D image representation that is close to the underlying fully-3D object (but discrete)  경계표면 (Boundary.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
Computer Graphics Zhen Jiang West Chester University.
David Luebke 1 12/8/2015 Visibility CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Hidden Surfaces University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
CS 445 / 645 Introduction to Computer Graphics Lecture 21 Visibility Visibility.
Visible Surface Detection
Visibility Week 9, Fri 31 Oct 2003
Scientific Visualization, Information Visualization I/II Week 5, Thu Jun 9
Volume Rendering Lecture 21.
CSCE 441: Computer Graphics Hidden Surface Removal
Real-Time Volume Graphics [06] Local Volume Illumination
Visibility: Z Buffering Week 10, Mon 3 Nov 2003
Volume Rendering Lecture 21.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

University of British Columbia CPSC 314 Computer Graphics May-June 2005 Tamara Munzner Scientific Visualization, Information Visualization I/II Week 5, Thu Jun 9

2 News P1 Hall of Fame take 2 P4 grading signup 12-4 Mon Jun 20

3 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

4 Review: Summing Waves I

5 Review: Summing Waves II represent spatial signal as sum of sine waves (varying frequency and phase shift) very commonly used to represent sound “spectrum”

6 Review: 1D Sampling and Reconstruction problems jaggies – abrupt changes lose data

7 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

8 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

9 Review: Supersampling

10 Review: Low-Pass Filtering

11 Review: Invisible Primitives why might a polygon be invisible? polygon outside the field of view / frustum solved by clipping polygon is backfacing solved by backface culling polygon is occluded by object(s) nearer the viewpoint solved by hidden surface removal

12 Review: Back-Face Culling on the surface of a closed orientable manifold, polygons whose normals point away from the camera are always occluded: note: backface culling alone doesn’t solve the hidden-surface problem!

13 Review: Painter’s Algorithm draw objects from back to front problems: no valid visibility order for intersecting polygons cycles of non-intersecting polygons possible

14 Review: BSP Trees preprocess: create binary tree recursive spatial partition viewpoint independent

15 Review: BSP Trees runtime: correctly traversing this tree enumerates objects from back to front viewpoint dependent check which side of plane viewpoint is on at each node draw far, draw object in question, draw near pros simple, elegant scheme works at object or polygon level cons computationally intense preprocessing stage restricts algorithm to static scenes

16 Review: Warnock’s Algorithm start with root viewport and list of all objects recursion: clip objects to viewport if only 0 or 1 objects done else subdivide to new smaller viewports distribute objects to new viewpoints recurse

17 Review: Warnock’s Algorithm termination viewport is single pixel explicitly check for object occlusion single-pixel case common in high depth complexity scenes

18 Review: Z-Buffer Algorithm augment color framebuffer with Z-buffer or depth buffer which stores Z value at each pixel at frame beginning, initialize all pixel depths to  when rasterizing, interpolate depth (Z) across polygon check Z-buffer before storing pixel color in framebuffer and storing depth in Z-buffer don’t write pixel if its Z value is more distant than the Z value already stored there

19 Review: Back-Face Culling most objects in scene are typically “solid” rigorously: orientable closed manifolds orientable: must have two distinct sides cannot self-intersect sphere is orientable boundary partitions space into interior & exterior Mobius strip or Klein bottle is not orientable do not partition space into interior & exterior closed: cannot “walk” from one side to other sphere is closed manifold, plane is not manifold: local neighborhood of all points isomorphic to disc Yes No

20 Review: Back-face Culling NDCS eye works to cull if y z y z cullingsometimes misses polygons that should be culled instead, cull if eye is below polygon plane eye above below VCS above below

21 Clarification/Review: Depth Test Precision reminder: projective transformation maps eye-space z to generic z-range (NDC) thus z N ~= 1/z E

22 Review: Rendering Pipeline GeometryDatabaseGeometryDatabase Model/ViewTransform.Model/ViewTransform. LightingLightingPerspectiveTransform.PerspectiveTransform. ClippingClipping ScanConversionScanConversion DepthTestDepthTest TexturingTexturing BlendingBlending Frame-bufferFrame-buffer OCS object WCS world VCS viewing CCS clipping NDCS normalized device SCS screen (2D) DCS device (3D) (4D) /w

23 Scientific Visualization

24 Reading FCG Chapter 23

25 Surface Graphics objects explicitly defined by surface or boundary representation mesh of polygons 200 polys 1000 polys polys

26 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

27 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

28 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)

29 Isosurfaces 2D scalar fields: isolines contour plots, level sets topographic maps 3D scalar fields: isosurfaces

30 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

31 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 Iso-value = 5

32 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)

33 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= Iso=9 =inside =outside

34 MC 3: Build An Index binary labeling of each voxel to create index v1v2 v6 v3 v4 v7 v8 v5 inside =1 outside= Index: v1v2 v3 v4 v5v6 v7v8

35 MC 4: Lookup Edge List use index to access array storing list of edges all 256 cases can be derived from 15 base cases

36 MC 4: Example index = triangle 1 = a, b, c a b c

37 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

38 MC 6: Compute Normals calculate the normal at each cube vertex use linear interpolation to compute the polygon vertex normal

39 MC 7: Render!

40 Direct Volume Rendering do not compute surface

41 Rendering Pipeline Classify

42 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

43 Transfer Functions map data value to color and opacity

44 Transfer Functions Human Tooth CT (f)(f) RGB(f)RGB(f) f RGBRGB shading, compositing…  Gordon Kindlmann

45 Setting Transfer Functions can be difficult, unintuitive, and slow f  f  f  f  Gordon Kindlmann

46 Rendering Pipeline Classify Shade

47 Light Effects usually only consider reflected part Light absorbed transmitted reflected Light=refl.+absorbed+trans. Light ambient specular diffuse Light=ambient+diffuse+specular

48 Rendering Pipeline Classify Shade Interpolate

49 Interpolation given: needed: 2D 1D given: needed: nearest neighbor linear

50 Rendering Pipeline Classify Shade Interpolate Composite

51 Volume Rendering Algorithms ray casting image order, forward viewing splatting object order, backward viewing texture mapping object order back-to-front compositing

52 Ray Traversal Schemes Depth Intensity Max Average Accumulate First

53 Ray Traversal - First first: extracts iso-surfaces (again!) Depth Intensity First

54 Ray Traversal - Average average: looks like X-ray Depth Intensity Average

55 Ray Traversal - MIP max: Maximum Intensity Projection used for Magnetic Resonance Angiogram Depth Intensity Max

56 Ray Traversal - Accumulate accumulate: make transparent layers visible Depth Intensity Accumulate

57 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

58 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