Direct Volume Rendering (DVR): Ray-casting

Slides:



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

GR2 Advanced Computer Graphics AGR
SI31 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
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.
Ray-casting in VolumePro™ 1000
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
Shadow Rendering Techniques A point is in the shadow of a light source if it can not be “seen” by the light source, i.e. the line segment that connects.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
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 박 경 와.
Splatting Jian Huang, CS 594, Spring 2002 This set of slides reference slides made by Ohio State University alumuni over the past several years.
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.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Alla Sheffer Advanced Rendering Week.
1 Scientific Visualization Melanie Tory Acknowledgments: Torsten Möller (Simon Fraser University) Raghu Machiraju (Ohio State University) Klaus Mueller.
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.
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.
Paper by Alexander Keller
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
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.
-Global Illumination Techniques
Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Graphics.
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.
Direct Volume Rendering (DVR): Ray-casting Jian Huang This set of slides references slides used by Prof. Torsten Moeller (Simon Fraser), Prof. Han-Wei.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
Ray Tracing Jian Huang, CS 594, Fall, 2002 This set of slides are used at Ohio State by Prof. Roger Crawfis.
Unstructured Volume Rendering Jian Huang, CS 594, Spring 2002 This set of slides reference slides developed by Prof. Torsten Moeller, SFU, Canada.
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.
Radiosity Jian Huang, CS594, Fall 2002 This set of slides reference the text book and slides used at Ohio State.
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.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CHAPTER 10 VOLUME VISUALIZATION. OUTLINE 3D (volumetric) scalar fields Slice plane and isosurfaces techniques are limited in showing only a subset of.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
CDS 301 Fall, 2008 From Graphics to Visualization Chap. 2 Sep. 3, 2009 Jie Zhang Copyright ©
Computer Graphics: Illumination
Volume Visualization Chap. 10 November 20 , 2008 Jie Zhang Copyright ©
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).
Lighting.
Volume Rendering Lecture 21.
Volume Rendering.
(c) 2002 University of Wisconsin
GR2 Advanced Computer Graphics AGR
Presentation transcript:

Direct Volume Rendering (DVR): Ray-casting Mengxia Zhu Fall 2007

Light: bouncing photons Lights send off photons in all directions Model these as particles that bounce off objects in the scene Each photon has a wavelength and energy (color and intensity) When photon bounce, some energy is absorbed, some reflected, some transmitted If we can model photon bounces we can generate image Techniques: follow each photon from the light source until All of its energy is absorbed (after too many bounces) It departs the known universe It strikes the image and its contribution is added to appropriate pixel

Forward Ray Tracing Rays are the path of these photons This method of rendering by following photon path is called ray tracing Forward ray tracing follows the photon in direction that light travels (from the source) Big problem with this approach: Only a tiny fraction of rays will reach the image Extremely slow Ideal Scenario: We’d like to magically know which rays will eventually contribute to the image, and trace only those Direct: No conversion to surface geometry

Backward Ray Tracing The solution is to start from the image and trace backwards Start from the image and follow the ray until the ray finds or fail to find a light source

Backward Ray Tracing Basic ideas: Each pixel gets light from just one direction- the line through the image point and focal point Any photon contribute to that pixel’s color has to come from this direction So head in that direction and find what is sending light this way If we hit a light source-we’re done If we find nothing-we’re done At the end we’ve done forward ray tracing, but only for rays that contribute to the image

Basic Idea: Ray Casting Based on the idea of ray tracing Only consider Primary Ray Trace from eat each pixel as a ray into object space Compute color value along the ray, composite 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

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 At each sampling location, a sample is interpolated / reconstructed from the grid voxels popular filters are: nearest neighbor (box), trilinear (tent), Gaussian, cubic spline Classification: map from density to color, opacity Composite colors and opacities along the ray path

Basic Idea of Ray-casting Pipeline

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

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

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

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

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

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

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

Raycasting volumetric compositing color opacity object (color, opacity)

Trilinear - Interpolation

Classification/Transfer Function Maps raw voxel value into presentable entities: color, intensity, opacity, etc. Raw-data  material (R, G, B, a, Ka, Kd, Ks, .) Region of interest: high opacity (more opaque) no interest: translucent or transparent Often use look-up tables (LUT) to store the transfer function

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

Levoy - Shading Phong Shading + Depth Cueing Cp = color of parallel light source ka / kd / ks = ambient / diffuse / specular light coefficient k1, k2 = fall-off constants d(x) = distance to picture plane L = normalized vector to light H = normalized vector for maximum highlight N(xi) = surface normal at voxel xi

Compositing Front-to-back back-to-front It is the accumulation of colors weighted by opacities Front-to-back back-to-front Advantage: early ray termination Advantage: object approach suitable for hardware implementation

Ray Traversal Schemes Intensity Max Average Accumulate First Depth

Ray Traversal - First Intensity First Depth

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

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

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

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

VTK Ray Casting Example The given data represents a mummy preserved for a long time. So the skin is dried and not very crisp when compared to the data set given in Project 3. The  dried skins iso value was found to be around 70 to 90. The skull iso value was around 100 to 120. In order to visualize this data set a opacity transfer function and a color transfer function are constructed. The opacity for values ranging from 0 - 50 is chosen to be 0.0 and 55 - 80 is chosen to be 0.1 (semi translucent) and finally the bone values ranging from 90 - 120 is given a complete opaque value of 1.0. The colors are chosen in such a way that the skin range has a light blue and the bone has a complete white and all other values have a color value of 0.0. www.cs.utah.edu/.../sci_vis/prj4/REPORT.html

VTK Ray Casting Example create the maximum intensity projection of the image. This looks more like an x-ray of the mummy. I used the inbuilt method in VTK called vtkVolumeRayCastMIPFunction . The opacity transfer function plays a major role in this technique and the color transfer function is used to adjust the contrast and get good looking images. www.cs.utah.edu/.../sci_vis/prj4/REPORT.html

Adaptive Termination The goal of adaptive termination is to quickly identify the last sample along a ray that significantly changes the color of the ray. We define a significant color change as one in which C_out – C_in > Epsilon for some small Epsilon > 0. Thus, Once opacity first exceeds 1-Epsilon, the color will not change significantly. This is the termination criteria. Higher values of Epsilon reduce rendering time, while lower values of Epsilon reduce image artifacts producing a higher quality image.

Four Steps Summary The volume ray casting algorithm comprises : Ray casting. For each pixel of the final image, a ray of sight is shot ("cast") through the volume. At this stage it is useful to consider the volume being touched and enclosed within a bounding primitive, a simple geometric object — usually a cuboid — that is used to intersect the ray of sight and the volume. Sampling. Along the part of the ray of sight that lies within the volume, equidistant sampling points or samples are selected. As in general the volume is not aligned with the ray of sight, sampling points usually will be located in between voxels. Because of that, it is necessary to trilinearly interpolate the values of the samples from its surrounding voxels. Shading. For each sampling point, the gradient is computed. These represent the orientation of local surfaces within the volume. The samples are then shaded, i. e. coloured and lighted, according to their surface orientation and the source of light in the scene. Compositing. After all sampling points have been shaded, they are composited along the ray of sight, resulting in the final colour value for the pixel that is currently being processed. The composition is derived directly from the rendering equation and is similar to blending acetate sheets on an overhead projector. http://en.wikipedia.org/wiki/Volume_ray_casting

Exercises

References This set of slides references slides used by Prof. Torsten Moeller (Simon Fraser), Prof. Han-Wei Shen (Ohio State), Prof. Jian Huang (UTK). Prof. Karki at Louisiana State University Prof. Frank Pfenning at Carnegie Mellon University