Volume Ray Casting Neslisah Torosdagli

Similar documents
Volume Rendering - Introduction. Markus Hadwiger Visual Computing Center King Abdullah University of Science and Technology

Scalar Data. CMPT 467/767 Visualization Torsten Möller. Weiskopf/Machiraju/Möller

Scalar Data. Visualization Torsten Möller. Weiskopf/Machiraju/Möller

Optical Models of Direct Volume Rendering by Nelson Max

Volume Rendering. Lecture 21

Previously... contour or image rendering in 2D

Volume Graphics Introduction

Volume Rendering. Computer Animation and Visualisation Lecture 9. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Raycasting. Ronald Peikert SciVis Raycasting 3-1

Volume Visualization

Data Visualization (CIS/DSC 468)

lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces

3/29/2016. Applications: Geology. Appliations: Medicine. Applications: Archeology. Applications: Klaus Engel Markus Hadwiger Christof Rezk Salama

CS 5630/6630 Scientific Visualization. Volume Rendering I: Overview

Volume Visualization. Part 1 (out of 3) Volume Data. Where do the data come from? 3D Data Space How are volume data organized?

Volume Illumination. Visualisation Lecture 11. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Direct Volume Rendering

CIS 467/602-01: Data Visualization

Data Visualization (DSC 530/CIS )

Volume Illumination & Vector Field Visualisation

Data Visualization (DSC 530/CIS )

Mirrored LH Histograms for the Visualization of Material Boundaries

Display. Introduction page 67 2D Images page 68. All Orientations page 69 Single Image page 70 3D Images page 71

Volume Illumination and Segmentation

Volume Rendering with libmini Stefan Roettger, April 2007

First Steps in Hardware Two-Level Volume Rendering

Fast Volumetric Data Exploration with Importance-Based Accumulated Transparency Modulation

Real-time Graphics 10. GPU Volume Graphics

Direct Volume Rendering

Interactive Methods in Scientific Visualization

Lecture overview. Visualisatie BMT. Transparency. Transparency. Transparency. Transparency. Transparency Volume rendering Assignment

The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard):

cs6630 November TRANSFER FUNCTIONS Alex Bigelow University of Utah

Light scattering is an important natural phenomenon, which arises when the light interacts with the particles distributed in the media.

Multidimensional Transfer Functions in Volume Rendering of Medical Datasets. Master thesis. Tor Øyvind Fluør

GPU Ray Casting. Ricardo Marques Dep. Informática, Universidade do Minho VICOMTech

The Rendering Equation. Computer Graphics CMU /15-662

Direct Volume Rendering. Overview

Overview. Direct Volume Rendering. Volume Rendering Integral. Volume Rendering Integral Approximation

GPU-Accelerated Deep Shadow Maps for Direct Volume Rendering

Towards Supporting Volumetric Data in FurryBall GPU Renderer

Shear-Warp Volume Rendering. Volume Rendering Overview

Scalar Data. Alark Joshi

Computer Graphics. - Volume Rendering - Philipp Slusallek

Raytracing CS148 AS3. Due :59pm PDT

COMPUTER GRAPHICS AND INTERACTION

Lecture 18: Primer on Ray Tracing Techniques

Interactive Boundary Detection for Automatic Definition of 2D Opacity Transfer Function

Polyhedra with Spherical Faces and Quasi-Fuchsian Fractals

Visualization Challenges for Large Scale Astrophysical Simulation Data. Ultrascale Visualization Workshop

Indirect Illumination

Volume visualization. Volume visualization. Volume visualization methods. Sources of volume visualization. Sources of volume visualization

Advanced Distant Light for DAZ Studio

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers

Introduction to Scientific Visualization

Computer Graphics. Shadows

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

Indirect Illumination

Global Illumination The Game of Light Transport. Jian Huang

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

CS 5625 Lec 2: Shading Models

RAYTRACING. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION. HPCViz, KTH Royal Institute of Technology, Sweden

Shadows. COMP 575/770 Spring 2013

Medical Visualization - Volume Rendering. J.-Prof. Dr. Kai Lawonn

Visualization of the Marked Cells of Model Organism

Visualization Computer Graphics I Lecture 20

Today. Participating media. Participating media. Rendering Algorithms: Participating Media and. Subsurface scattering

Emissive Clip Planes for Volume Rendering Supplement.

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

Enhanced material contrast by dual-energy microct imaging

Volume rendering for interactive 3-d segmentation

CS452/552; EE465/505. Intro to Lighting

LECTURE 37: Ray model of light and Snell's law

Irradiance Gradients. Media & Occlusions

Phys 1020, Day 18: Questions? Cameras, Blmfld Reminders: Next Up: digital cameras finish Optics Note Final Project proposals next week!

Ch. 4 Physical Principles of CT

Advanced Shading I: Shadow Rasterization Techniques

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

POINT-BASED COLOR BLEEDING WITH VOLUMES. A Thesis. Presented to. the Faculty of California Polytechnic State University.

LIGHTING - 1. Note. Lights. Ambient occlusion

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Computer Graphics 10 - Shadows

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Clipping. CSC 7443: Scientific Information Visualization

Volume Illumination, Contouring

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

11/1/13. Visualization. Scientific Visualization. Types of Data. Height Field. Contour Curves. Meshes

Visualization. CSCI 420 Computer Graphics Lecture 26

MITOCW MIT6_172_F10_lec18_300k-mp4

CPSC GLOBAL ILLUMINATION

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Ray Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University

Lecture 7 - Path Tracing

Motion Estimation. There are three main types (or applications) of motion estimation:

CS 563 Advanced Topics in Computer Graphics Film and Image Pipeline (Ch. 8) Physically Based Rendering by Travis Grant.

Models and Architectures

Real-Time Volume Graphics

Dynamic Reconstruction for Coded Aperture Imaging Draft Unpublished work please do not cite or distribute.

Transcription:

Volume Ray Casting Neslisah Torosdagli

Overview Light Transfer Optical Models Math behind Direct Volume Ray Casting Demonstration Transfer Functions Details of our Application References

What is Volume Ray Casting? Volume Ray Casting is construction of 3D volume using stack of 2D slices. Since now in Ray Tracing course, when a ray hits to a surface, ray tracing stops for that ray. In Volume Ray Casting, ray tracing accumulates information until bounding volume is exited or certain stopping criteria holds.

Light Transfer Optical Models Light traveling thru a medium is affected by: Emission Absorption Scattering The volume is assumed to consist of particles that emit light. The volume is assumed to consist of black particles that absorb light. In-Scattering Out-Scattering Light reaching to a volume particle which is scattered from other particles in the volume. Light scattered from volume particle. In direct volume rendering, Emission-Absorption Optical Model is sufficient in quality, scattering is complex and neglected.

Light Transfer Optical Model - Emission & Absorption Assume that each voxel is a light source, covered with a s e m i - t r a n s p a r e n t m e m b r a n e. A n d a l s o assume only 50% of radiant energy of each voxel can pass to the next voxel in ray direction. 1/4 blue + 1/2 purple + green 1/4 green + 1/2 purple + blue http://www.ledmuebles.com/en/led-cube/347-led-glowing-cube-chair-for-seating.html

Radiant Energy Reaching the Camera If there is no absorption in the ray direction:

Radiant Energy Reaching the Camera Some portion of the radiant energy at a point x(n) is lost while passing thru the volume towards the camera due to absorption.

Radiant Energy Reaching the Camera Absorption along the ray segment from x(n) to x(0)

Extinction - Absorption Extinction (Optical Depth) Absorption Coeffcients : Small values of optical depth point to transparent mediums, while large values refer to opaque mediums. A form of measure of how long light may travel before it is absorbed completely. Absorption at certain position in the medium. Absorption along the line segment 0 to t :

Radiant Energy Reaching the Camera If there are more than one radiant energy sources, the total radiant energy arriving to the camera is the summation of radiant energies arrived to the camera.

Ray Integration Radiant Energy reaching eye from any ray direction is integration of radiant energy at each point along the ray that reached the camera.

Ray Integration Discretization Since volume data is discrete, integrations can be approximated with Reimann Sum as follows:

Ray Integration Discretization Since volume data is discrete, integrations can be approximated with Reimann Sum as follows:

Discrete Extinction

Opacity of each Slice Absorption

Discrete Ray Integration

How to apply this formula?

Discrete Ray Integration If I worked on blue slices and currently working on purple slice, purple slice s contribution to final radiance is reduced in proportion with multiplication of opacities of blue slices.

Front-to-Back Volume Ray Casting

Front-to-Back Volume Ray Casting Algorithm vec4 fronttobackraycast() { vec4 src = vec4(0.0); vec4 dst = vec4(0.0); for (int idx=0;idx<max_steps;idx++) { vec3 ijs = currentpos * RAStoIJSRatio; float value = sampleas3dtexture(uvolumesampler, ijs).r; src.rgb *= src.a; dst += ((1.0 - dst.a) * src); currentpos += stepszscaledraydirection; } if ((dst.a >= 0.95) ((len-=stepsz) < stepsz)) { break; } } return (dst);

Back-to-Front Volume Ray Casting

Back-to-Front Volume Ray Casting Algorithm vec4 backtofrontraycast() { vec4 src = vec4(0.0); vec4 dst = vec4(0.0); for (int idx=0;idx<max_steps;idx++) { vec3 ijs = currentpos * RAStoIJSRatio; float value = sampleas3dtexture(uvolumesampler, ijs).r; src.rgb *= src.a; dst = src + ((1.0 - src.a) * dst); currentpos += stepszscaledraydirection; } if ((len-=stepsz) < stepsz) { break; } } return (dst);

Cons of Back-to-Front Volume Ray Casting Information about back face of the volume is included in the rendering, which may be unrelated and may have negative impact on quality of the rendering. Early ray termination cannot be applied, as whatever alpha value is computed, first slice should be included in the rendering.

Cons of Back-to-Front Volume Ray Casting Alpha and RGB values usually exceed 1.0 when the raytracing loop is completed, they should be normalized. Since relative values are not known a-priori, normalization of the whole rendering, requires an extra step to compute max value computed, and normalization with respect to this max value.

Does each voxel in each slice have the same contribution?

Emission & Absorption Coefficients In the first part of this class, we assumed that emission and absorption coefficients are known a-priori. However, in real life we are provided just slices of images of some gray values. There is no natural way to obtain these coefficients. In stead, the user should decide how different structures in the data should look by assigning emission and absorption coefficients according to data values. For instance, the user may decide that soft tissues such as muscles may be 50% transparent while hard tissues such as bones may be 80% opaque.

Emission & Absorption Coefficients If we know which region of the volume is soft-tissue and which region is hard-tissue, or we know how to recognize regions in a volume before the user sets their mapping, there is no issue. However, regions in a volume are not known either.

Transfer Functions Transfer function can be simply described as setting opacities for each voxel in such a way that both emission (by premultiplication of rgb values by opacity) and absorption for a voxel can be computed. Design of transfer function which leads to a high quality and informative rendering is a difficult process.

Demonstration

Transfer Functions What can be used to define the mapping: Voxel Properties are as follows: grayscale Value histogram First Derivative Second Derivative In 1D, it is a simple lookup table mapping such as set opacity of grayscale values equal to g to o. Usually just grayscale value is not sufficient to differentiate different regions of a volume with same grayscale value.

Transfer Functions Tooth data surrounded by a circle of dark gray. In the first four samples, there is a black color region inside the tooth. Then 1D mapping of black color to opacity 0, will fail for inner black regions. For this sample, the question is how to differentiate boundary from inner details of the tooth?

1D Transfer Functions Furthermore, 1D Transfer functions cause artifacts due to sharp changes between consecutive grayscale values.

Derivatives First and second derivatives of voxels is a good measure of edges in a volume. Kindlemann utilized edge information for semi-automatic generation of transfer functions. He assigned automatically maximum applicable opacity to edges and smoothly assign closer opacities to voxels close in spatial domain to the edge voxel.

Transfer Functions 2D, 3D Transfer Functions are much useful to differentiate different regions with the same grayscale value.

2D Levoy Transfer Function In order to compute 2D Transfer Function as Levoy suggested, A set of (grayscale, alpha) values should be inputted. Thus, the user should specify approximate transparency of certain grayscale values. After inputting these tuples, following formula is used to compute the 2D Transfer Function: * formulas are taken from original paper.

2D Levoy Transfer Function For 8 bit data, for each grayscale value in domain 0 to 255, and for each gradient value in domain 0 to 128, alpha value is computed using inputed tuples (αv, fv) by the user. * formulas are taken from original paper.

2D Levoy Transfer Function * chart is taken from original paper. U s i n g, L e v o y 2 D Transfer Function, a smoother rendering is obtained. Not only, specified grayscales are set to specified alpha values, but also according to gradient o f t h e v o x e l i n q u e s t i o n, c l o s e r surfaces are assigned to closer alpha values. Thus, sharp changing artifacts are avoided.

2D Barthel Transfer Function For 8 bit data, for each grayscale value in domain 0 to 255, and for each gradient value in domain 0 to 128, Compute gradienthistogram initialize transfer function 2D to: 1-3 * Math.pow(histValGrad[i][j] / maxhist, 0.22) Multiply transfer function 2D with user inputted 1D transfer function.

2D Transfer Functions

UCF Graphics Lab Web-Based Real-Time Volume Rendering Application In our application, we used Levoy and Barthel 2D Transfer functions computed using grayscale values and 1st derivatives.

UCF Graphics Lab Web-Based Real-Time Volume Rendering Application Technologies: Javascript WebGL Medical File Parser (XTK) D3

Some Sample Renderings

Some Sample Renderings

UCF Graphics Lab Web-Based Real-Time Volume Rendering Application Video

UCF Graphics Lab Application Link of the application is : http://graphics.cs.ucf.edu/tools/volren/

References 1.Engel, Klaus, Markus Hadwiger, Joe M. Kniss, Christof Rezk-Salama, and Daniel Weiskopf. Real-time Volume Graphics. Wellesley, Mass.: K Peters, 2006. Print. 2.Levoy, M. "Display of Surfaces from Volume Data."IEEE Computer Graphics and Applications (1987): 29-37. Print. 3.Gordon Kindlmann, James W. Durkin, Semi-automatic generation of transfer functions for direct volume rendering, Proceedings of the 1998 IEEE symposium on Volume visualization, p.79-86, October 19-20, 1998, Research Triangle Park, North Carolina. 4.Barthel, Kai-Uwe : Automatic generation of volumetric transfer functions. In: ImageJ User and Developer Conference 2012, S. 104-107, Luxemburg, 2012, ISBN 2-919941-18-6.