Direct Volume Rendering (DVR): Ray-casting Jian Huang This set of slides references slides used by Prof. Torsten Moeller (Simon Fraser), Prof. Han-Wei.

Slides:



Advertisements
Similar presentations
7.1 Vis_04 Data Visualization Lecture 7 3D Scalar Visualization Part 2 : Volume Rendering- Introduction.
Advertisements

Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
A Coherent Grid Traversal Algorithm for Volume Rendering Ioannis Makris Supervisors: Philipp Slusallek*, Céline Loscos *Computer Graphics Lab, Universität.
Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transformation Philippe Larcoute & Marc Levoy Stanford University Published in SIGGRAPH.
Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002.
Ray-casting in VolumePro™ 1000
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
The Discrete Ray-casting Algorithm Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University.
Hank Childs, University of Oregon November 15 th, 2013 Volume Rendering, Part 2.
Volume Rendering Volume Modeling Volume Rendering Volume Modeling Volume Rendering 20 Apr
Illumination Model & Surface-rendering Method 박 경 와.
Direct Volume Rendering (DVR): Ray-casting
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 2005 Tamara Munzner Information Visualization.
1 Scientific Visualization Melanie Tory Acknowledgments: Torsten Möller (Simon Fraser University) Raghu Machiraju (Ohio State University) Klaus Mueller.
Surface Reconstruction from 3D Volume Data. Problem Definition Construct polyhedral surfaces from regularly-sampled 3D digital volumes.
Splatting Josh Anon Advanced Graphics 1/29/02. Types of Rendering Algorithms Backward mapping Image plane mapped into data Ray casting Forward mapping.
Introduction to Volume Rendering Presented by Zvi Devir.
(conventional Cartesian reference system)
Direct Volume Rendering Joe Michael Kniss Scientific Computing and Imaging Institute University of Utah.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Volume Visualization Acknowledgements: Torsten Möller (SFU)
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics.
ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg
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.
Volumetric and Blobby Objects Lecture 8 (Modelling)
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
19/18/ :34 Graphics II Volume Rendering Session 10.
Optical Models Jian Huang, CS 594, Spring 2002 This set of slides are modified from slides used by Prof. Torsten Moeller, at Simon Fraser University, BC,
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.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
ITUppsala universitet Advanced Computer Graphics Filip Malmberg
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
Unstructured Volume Rendering Jian Huang, CS 594, Spring 2002 This set of slides reference slides developed by Prof. Torsten Moeller, SFU, Canada.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
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.
Visualization Process sensorssimulationdatabase raw data images Transformation.
3D Volume Visualization. Volume Graphics  Maintains a 3D image representation that is close to the underlying fully-3D object (but discrete)  경계표면 (Boundary.
Computer Graphics II University of Illinois at Chicago Volume Rendering Presentation for Computer Graphics II Prof. Andy Johnson By Raj Vikram Singh.
Volume Visualization Presented by Zhao, hai. What’ volume visualization Volume visualization is the creation of graphical representations of data sets.
CHAPTER 10 VOLUME VISUALIZATION. OUTLINE 3D (volumetric) scalar fields Slice plane and isosurfaces techniques are limited in showing only a subset of.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Volume Visualization with Ray Casting
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Direct Volume Rendering
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Hardware-Accelerated Parallel Non-Photorealistic Volume Rendering Eric B.Lum Kwan-Liu Ma University of California at Davis.
Robert S. Laramee 1 Visualization, Lecture Volume Visualization Part 2 (of 4) Direct Volume.
Volume Visualization Huamin QU Computer Science Department Hong Kong University of Science and Technology Hong Kong University of Science and Technology.
Volume Visualization Chap. 10 November 20 , 2008 Jie Zhang Copyright ©
3D Graphics Rendering PPT By Ricardo Veguilla.
CSc4730/6730 Scientific Visualization
Volume Rendering Lecture 21.
Volume Visualization Chap. 10 December 3 , 2009 Jie Zhang Copyright ©
Real-Time Volume Graphics [06] Local Volume Illumination
Volume Rendering (2).
Volume Rendering Lecture 21.
Volume Rendering.
Presentation transcript:

Direct Volume Rendering (DVR): Ray-casting Jian Huang This set of slides references slides used by Prof. Torsten Moeller (Simon Fraser), Prof. Han-Wei Shen (Ohio State).

Papers Tuy and Tuy, 1984, IEEE CG & A (one of the earliest volume rendering techniques) Levoy, 1988 IEEE CG&A, and later improvements Drebin, Carpenter, Hanrahan, 1988, SIGGRAPH Direct: No conversion to surface geometry

Basic Idea Based on the idea of ray tracing Trace from eat each pixel as a ray into object space Compute color value along the ray Assign the value to the pixel

Data Representation 3D volume data are represented by a finite number of cross sectional slices (hence a 3D raster) On each volume element (voxel), stores a data value (if it uses only a single bit, then it is a binary data set. Normally, we see a gray value of 8 to 16 bits on each voxel.) N x 2D arraies = 3D array

Data Representation (2) What is a Voxel? – Two definitions A voxel is a cubic cell, which has a single value cover the entire cubic region A voxel is a data point at a corner of the cubic cell The value of a point inside the cell is determined by interpolation

Viewing Ray Casting Where to position the volume and image plane What is a ‘ray’ How to march a ray

Viewing (1) 1. Position the volume Assuming the volume dimensions is w x w x w We position the center of the volume at the world origin y (0,0,0)x z Volume center = [w/2,w/2,w/2] (local space) Translate T(-w/2,-w/2,-w/2) (data to world matrix? world to data matrix )

Viewing (2) 2. Position the image plane Assuming the distance between the image plane and the volume center is D, and initially the center of the image plane is (0,0,-D) y (0,0,0)x z Image plane

Viewing (3) 3. Rotate the image plane A new position of the image plane can be defined in terms of three rotation angle  with respect to x,y,z axes Assuming the original view vector is [0,0,1], then the new view vector g becomes: cos  sin  cos  sin  g = [0,0,1] cos  sin  sin  cos  sin  0 cos  sin  cos 

Viewing (4) y (0,0,0)x z u v E S E0u0 v0 + S0 B B = [0,0,0] S 0 = [0,0,-D] u 0 = [1,0,0] v 0 = [0,1,0] Now, R: the rotation matrix S = B – D x g U = [1,0,0] x R V = [0,1,0] x R

Viewing (5) R: the rotation matrix S = B – D x g U = [1,0,0] x R V = [0,1,0] x R + S Image Plane: L x L pixels E Then E = S – L/2 x u – L/2 x v So Each pixel (i,j) has coordinates P = E + i x u + j x v u v We enumerate the pixels by changing i and j (0..L-1)

Viewing (6) 4. Cast rays Remember for each pixel on the image plane P = E + i x u + j x v and the view vector g = [0,0,1] x R So the ray has the equation: Q = P + k (d x g) d: the sampling distance at each step x x d x x p Q K = 0,1,2,…

Early Methods Before 1988 Did not consider transparency did not consider sophisticated light transportation theory were concerned with quick solutions hence more or less applied to binary data non-binary data - require sophisticated classification/compositing methods!

Ray Tracing -> Ray Casting “another” typical method from traditional graphics Typically we only deal with primary rays - hence: ray-casting a natural image-order technique as opposed to surface graphics - how do we calculate the ray/surface intersection??? Since we have no surfaces - we need to carefully step through the volume

Ray Casting Stepping through the volume: a ray is cast into the volume, sampling the volume at certain intervals The sampling intervals are usually equi-distant, but don’t have to be (e.g. importance sampling) At each sampling location, a sample is interpolated / reconstructed from the grid voxels popular filters are: nearest neighbor (box), trilinear (tent), Gaussian, cubic spline Along the ray - what are we looking for?

Example: Using the nearest neighbor kernel In tuys’ paper Q = P + K x V (v=dxg) At each step k, Q is rounded off to the nearest voxel (like the DDA algorithm) Check if the voxel is on the boundary or not (compare against a threshold) If yes, perform shading

Basic Idea of Ray-casting Pipeline - Data are defined at the corners of each cell (voxel) - The data value inside the voxel is determined using interpolation (e.g. tri-linear) - Composite colors and opacities along the ray path - Can use other ray-traversal schemes as well c1 c2 c3

Ray Traversal Schemes Depth Intensity Max Average Accumulate First

Ray Traversal - First Depth Intensity First First: extracts iso-surfaces (again!) done by Tuy&Tuy ’84

Ray Traversal - Average Depth Intensity Average Average: produces basically an X-ray picture

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

Ray Traversal - Accumulate Depth Intensity Accumulate Accumulate opacity while compositing colors: make transparent layers visible! Levoy ‘88

Raycasting color opacity 1.0 volumetric compositing object (color, opacity)

Raycasting color opacity Interpolation kernel 1.0 object (color, opacity) volumetric compositing

Raycasting color c = c s  s (1 -  ) + c opacity  =  s (1 -  ) +  1.0 object (color, opacity) volumetric compositing Interpolation kernel

Raycasting color opacity 1.0 object (color, opacity) volumetric compositing

Raycasting color opacity 1.0 object (color, opacity) volumetric compositing

Raycasting color opacity 1.0 object (color, opacity) volumetric compositing

Raycasting color opacity 1.0 object (color, opacity) volumetric compositing

Raycasting color opacity object (color, opacity) volumetric compositing

Volume Rendering Pipeline Acquired values Data preparation Prepared values classificationshading Voxel colors Ray-tracing / resampling Sample colors compositing Voxel opacities Sample opacities Image Pixels

DCH DVR Pipeline

DCH - Pipeline Original data Material percentage volumes Color volumeOpacity volumeDensity volume GradientShaded volume Transformed volume Final image Classification Normals Shading shears compositing

Common Components of General Pipeline Interpolation/reconstruction Classification or transfer function Gradient/normal estimation for shading –Question: are normals also interpolated?

Levoy - Interpolation

Levoy - Interpolation (2) Closest valueWeighted average

Levoy – Gradient/Normals Central difference per voxel X+1 y-1, Y+1 z-1

Levoy - Compositing Image order back-to-front using the over operator

Levoy - Shading Phong Shading + Depth Cueing C p = color of parallel light source k a / k d / k s = ambient / diffuse / specular light coefficient k 1, k 2 = fall-off constants d(x) = distance to picture plane L = normalized vector to light H = normalized vector for maximum highlight N(x i ) = surface normal at voxel x i

Classification Classification: Mapping from data to opacities Region of interest: high opaicity (more opaque) Rest: translucent or transparent The opacity function is typically specified by the user Levoy came up with two formula to compute opacity 1. Isosurface 2. Region boundary (e.g. between bone and fresh)

Classification/Transfer Function Maps raw voxel value into presentable entities: color, intensity, opacity, etc. Raw-data  material (R, G, B, , K a, K d, K s,...) May require probabilistic methods (Drebin). Derive material volume from input. Estimate % of each material in all voxels. Pre-computed. AKA segmentation. Often use look-up tables (LUT) to store the transfer function that are discovered

Levoy - Classification Usually not only interested in a particular iso- surface but also in regions of “change” Feature extraction - High value of opacity exists in regions of change Transfer function (Levoy) - Saliency Surface “strength”

Levoy - Classification Chemistry Data –only iso-value - loose information of layers –iso-range - could be too narrow or too wide –thickness of region should be constant –hence linear fall off of opacity –wider fall off for larger gradient Medical Data –assume at most two tissues meet –linear transition between opacities of “neighboring” tissues –reflects linear combination of tissues within one voxel

Opacity function (1) Goal: visualize voxels that have a selected threshold value fv - No intermediate geometry is extracted - The idea is to assign voxels that have value fv the maximum opacity (say  ) - And then create a smooth transition for the surrounding area from 1 to 0 -Levoy wants to maintain a constant thickness for the transition area.

Opacity function (2) Maintain a constant isosurface thickness opacity =  opacity = 0 Can we assign opacity based on function value instead of distance? (local operation: we don’t know where the isosurface is) Yes – we can based on the value distance f – fv but we need to take into account the local gradient

Opacity function (3) Assign opacity based on value difference (f-fv) and local gradient gradient: the value fall-off rate grad =  f  s Assuming a region has a constant gradient and the isosurface transition has a thickness R opacity =  F = fv opacity = 0 F = fv – grad * R thickness = R F = f(x) Then we interpolate the opacity opacity =  –  * ( fv-f(x))/ (grad * R)

Levoy - Classification A

Levoy - Classification B

DCH - Material Percentage V. Probabilistic classifier probability that a voxel has intensity I: p i - percentage of material P i (I) - prob. that material i has value I P i (I) given through statistics/physics p i then given by:

DCH - Classification Like Levoy - assumes only two materials per voxel that will lead to material percentage volumes from them we conclude color/opacity: –where C i =(  i R i,  i G i,  i B i,  i )

DCH- Classification

Levoy - Improvements Levoy 1990 front-to-back with early ray termination  = 0.95 hierarchical oct-tree data structure –skip empty cells efficiently

Volumetric Ray Integration color opacity object (color, opacity) 1.0