Computational Strategies

Similar documents
Assignment #5: Scalar Field Visualization 3D: Direct Volume Rendering

Texture Mapping. Mike Bailey.

Assignment #3: Scalar Field Visualization 3D: Cutting Plane, Wireframe Iso-surfacing, and Direct Volume Rendering

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Lecture 22 Sections 8.8, 8.9, Wed, Oct 28, 2009

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.

CS212. OpenGL Texture Mapping and Related

GRAFIKA KOMPUTER. ~ M. Ali Fauzi

Lecture 19: OpenGL Texture Mapping. CITS3003 Graphics & Animation

Lecture 07: Buffers and Textures

CS335 Graphics and Multimedia. Slides adopted from OpenGL Tutorial

Volume Rendering. Lecture 21

Hardware-Assisted Visibility Ordering for Point-Based and Volume Rendering

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

A SURVEY ON 3D RENDERING METHODS FOR MRI IMAGES

Textures. Texture Mapping. Bitmap Textures. Basic Texture Techniques

Direct Volume Rendering

OpenGL Texture Mapping. Objectives Introduce the OpenGL texture functions and options

Computer Graphics. Bing-Yu Chen National Taiwan University

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

CSE 167: Introduction to Computer Graphics Lecture #7: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Computer Graphics. Three-Dimensional Graphics VI. Guoying Zhao 1 / 73

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Grafica Computazionale

Direct Volume Rendering

Texture Mapping and Sampling

Texture Mapping CSCI 4229/5229 Computer Graphics Fall 2016

Direct Volume Rendering

Lecture 5 3D graphics part 3

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CT5510: Computer Graphics. Texture Mapping

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #9: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Point based Rendering

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Objectives. Texture Mapping and NURBS Week 7. The Limits of Geometric Modeling. Modeling an Orange. Three Types of Mapping. Modeling an Orange (2)

CMSC 425: Lecture 12 Texture Mapping Thursday, Mar 14, 2013

Texture mapping. Computer Graphics CSE 167 Lecture 9

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

Shear-Warp Volume Rendering. Volume Rendering Overview

INF3320 Computer Graphics and Discrete Geometry

Point-Based Rendering

CHAPTER 1 Graphics Systems and Models 3

Direct Volume Rendering. Overview

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

High-Quality Splatting on Rectilinear Grids with Efficient Culling of Occluded Voxels

CS452/552; EE465/505. Texture Mapping in WebGL

Applications of Explicit Early-Z Culling

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

Visualization. CSCI 420 Computer Graphics Lecture 26

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline

Visualization Computer Graphics I Lecture 20

Buffers. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

The Traditional Graphics Pipeline

+ = Texturing: Glue n-dimensional images onto geometrical objects. Texturing. Texture magnification. Texture coordinates. Bilinear interpolation

Cap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre

Volume Graphics Introduction

Using image data warping for adaptive compression

GPU-Accelerated Deep Shadow Maps for Direct Volume Rendering

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

Texture Mapping and Special Effects

CISC 3620 Lecture 7 Lighting and shading. Topics: Exam results Buffers Texture mapping intro Texture mapping basics WebGL texture mapping

VGP352 Week March-2008

Data Visualization (CIS/DSC 468)

CS 432 Interactive Computer Graphics

Volume Visualization

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

ก ก ก.

Post-Convolved Splatting

OpenCL / OpenGL Texture Interoperability: An Image Blurring Case Study

CS4621/5621 Fall Basics of OpenGL/GLSL Textures Basics

CSE 167: Lecture #17: Volume Rendering. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Texture and other Mappings

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

Computer Graphics. Shadows

Texturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica

Most device that are used to produce images are. dots (pixels) to display the image. This includes CRT monitors, LCDs, laser and dot-matrix

CIS 467/602-01: Data Visualization

Previously... contour or image rendering in 2D

Computer Graphics

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

COMPUTER GRAPHICS COURSE. Rendering Pipelines

Image Base Rendering: An Introduction

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Forward Image Mapping

A Survey of Volumetric Visualization Techniques for Medical Images

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

CSL 859: Advanced Computer Graphics. Dept of Computer Sc. & Engg. IIT Delhi

Particle-Based Volume Rendering of Unstructured Volume Data

Texturing. Slides done bytomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

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

Department of Computer Sciences Graphics Spring 2013 (Lecture 19) Bump Maps

Models and Architectures

Visualization Computer Graphics I Lecture 20

CSC 240 Computer Graphics. Fall 2015 Smith College

QUESTION 1 [10] 2 COS340-A October/November 2009

Introduction to 3D Graphics

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

3D Rasterization II COS 426

Transcription:

Computational Strategies How can the basic ingredients be combined: Image Order Ray casting (many options) Object Order (in world coordinate) splatting, texture mapping Combination (neither) Shear warp, Fourier

Object Order Render image one voxel at a time for each voxel... -get color/opacity - determine image contribution -composite

Object Order Render image one voxel at a time for each voxel... -get color/opacity - determine image contribution -composite

Splatting literature Lee Westover Vis 1989; SIGGRAPH 1990 Object order method Front To Back or Back To Front Main idea: Throw voxels to the image Many improvements since then! Crawfis 93: textured splats Swan 96, Mueller 97: anti aliasing Mueller 98: image aligned sheet based splatting Mueller 99: post classified splatting Huang 00: new splat primitive: FastSplats

Splatting Instead of asking which data samples contribute to a pixel value, ask, to which pixel values does a data sample contribute? Ray casting: pixel value computed from multiple data samples Splatting: multiple pixel values (partially) computed from a single data sample

Splatting Instead of asking which data samples contribute to a pixel value, ask, to which pixel values does a data sample contribute? Ray casting: pixel value computed from multiple data samples Splatting: multiple pixel values (partially) computed from a single data sample Idea: contribute every voxel to the image projection from voxel: splat composite in image space

Splatting Instead of asking which data samples contribute to a pixel value, ask, to which pixel values does a data sample contribute? Ray casting: pixel value computed from multiple data samples Splatting: multiple pixel values (partially) computed from a single data sample Idea: contribute every voxel to the image projection from voxel: splat composite in image space Props & Cons: high quality relatively costly >relatively slow

Splatting Footprint Process from closest voxel to furthest voxel (front to back) The first step is splat. A biggest problem: determination of voxel s projected area called its footprint

Splatting Footprint Draw each voxel as a cloud of points (footprint) that spreads the voxel contribution across multiple pixels A natural way to compute the footprint is to add a filter kernel, which determines how much contribution this voxel makes to those pixels nearby the projected pixel corresponding to the center of the voxel. Different pixels receive different amount of contribution computed as the multiplication of some weight with the original color or other value.

Splatting Footprint Footprint geometry Orthographic projection: footprint is independent of the view point Perspective projection: footprint is elliptical Pre integration of footprint For perspective projection: additional computation of the orientation of the ellipse

Splatting Footprint Footprint geometry Orthographic projection: footprint is independent of the view point Perspective projection: footprint is elliptical Pre integration of footprint For perspective projection: additional computation of the orientation of the ellipse Importance of choosing footprint size! Larger footprint increases blurring and used for high pixel to voxel ratio

Splatting Footprint Volume = field of 3D interpolation kernels One kernel at each grid voxel Each kernel leaves a 2D footprint on screen Voxel contribution = footprint (C, opacity) Weighted footprints accumulate into image voxel kernels screen footprints = splats screen

Splatting Footprint Volume = field of 3D interpolation kernels One kernel at each grid voxel Each kernel leaves a 2D footprint on screen Voxel contribution = footprint (C, opacity) Weighted footprints accumulate into image voxel kernels screen footprints = splats screen

Splatting Footprint Volume = field of 3D interpolation kernels One kernel at each grid voxel Each kernel leaves a 2D footprint on screen Voxel contribution = footprint (C, opacity) Weighted footprints accumulate into image voxel kernels screen footprints = splats screen

Splatting Compositing Voxel kernels are added within sheets Sheets are composited front to back Sheets = volume slices most parallel to the image plane (i.e., base plane!) volume slices z y volume slices x image plane at 30 image plane at 70

Volume Splatting Implementation volume slices image plane sheet buffer compositing buffer

Splatting Implementation Add voxel kernels within first sheet volume slices image plane sheet buffer compositing buffer

Splatting Implementation Transfer to compositing buffer volume slices (Color*opacity) image plane sheet buffer compositing buffer

Splatting Implementation Add voxel kernels within second sheet volume slices image plane sheet buffer compositing buffer

Splatting Implementation Composite sheet with compositing buffer volume slices (Color*opacity) image plane sheet buffer compositing buffer

Splatting Implementation Add voxel kernels within third sheet volume slices image plane sheet buffer compositing buffer

Splatting Implementation Composite sheet with compositing buffer volume slices (Color*opacity) image plane sheet buffer compositing buffer

Problems Early Implementation Axis Aligned Splatting Inaccurate compositing, result in color bleeding and popping artifacts Part of this voxel gets composited before part of this voxel

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Image Aligned Sheet Buffer Slicing slab cuts kernels into sections Kernel sections are added into sheet buffer Sheet buffers are composited image plane sheet buffer compositing buffer

Splatting Simple extension to volume data without grids Scattered data with kernels Example: SPH (smooth particle hydrodynamics) Needs sorting of sample points

Splatting Images

Splatting Conclusion Pros: high quality easy to parallelize works for anisotropic data (dz > dx = dy) perspective projection possible adaptive rendering possible Cons: relatively slow yields somewhat blurry images (in original)

Splatting vs Ray Casting Splatting: Object order: FOR each voxel (x,y,z) DO sample volume at (x,y,z) using filter kernel project reconstruction result to x y image plane (leaving footprint) FOR each pixel (x,y) DO: composite (color, opacity) result of all footprints Ray Casting: Image order: FOR each pixel (x,y) DO cast ray into volume FOR each sample point along ray (x,y,z) Sample volume at (x,y,z) using filter kernel composite (color, opacity) in image space at pixel (x,y)

Texture based Volume Rendering Volume rendering by 2D texture mapping: use planes parallel to base plane (front face of volume which is "most orthogonal" to view ray). This is an axis aligned approach! draw textured rectangles, using bilinear interpolation filter render back to front, using α blending for the α compositing

Texture in Graphics Texture mapping can large enhance the reality of the 3D objects How does it work? Image source: google image [EuroGraphics 2006 Tutorial]

In OpenGL Setting texture environment in the initialization before drawing gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP ); gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP ); Wrapping gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter ); gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter ); Filter gltexenvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE ); Environment Put this setting before the code you do the texture mapping!

OpenGL Texturing Define the texture wrapping parameters. This will control what happens when a texture coordinate greater than 1.0 or less than 0.0 is encountered: gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap ); gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap ); where wrap is GL_REPEAT or GL_CLAMP GL_CLAMP GL_REPEAT

OpenGL Texturing Define the texture filter parameters. This will control what happens when a texture is scaled up or down: gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); gltexparameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); where wrap is either GL_NEAREST or GL_LINEAR GL_NEAREST GL_LINEAR

OpenGL Texturing Define the texture environment properties. gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, mode ); where mode is either GL_REPLACE GL_MODULATE specifies that the 3 component texture will be applied as an opaque image on top of the polygon, replacing the polygon s specified color specifies that the 3 component texture will be applied as piece of colored plastic on top of the polygon. The polygon s specified color shines through the plastic texture. This is very useful for applying lighting to textures: paint the polygon white with lighting and let it shine up through a texture.

OpenGL Texturing glbegin(gl_polygon); gltexcoord2f(s0, t0); glnormal3f (nx0, ny0, nz0); glvertex3f (x0, y0, z0); gltexcoord2f(s0, t0); glnormal3f (nx0, ny0, nz0); glvertex3f (x0, y0, z0); glend(); In your Display() function: 1. If you are using multiple textures, set the current texture using glteximage2d( )or by binding the correct one 2. Enable texture mapping glenable(gl_texture_2d); 3. Draw your polygons, specifying texture coordinate (s,t) before each vertex 4. Disable texture mapping gldisable(gl_texture_2d);

Texture based Volume Rendering Volume rendering by 3D texture mapping: use the voxel data as the 3D texture render an arbitrary number of slices (eg. 100 or 1000) parallel to image plane (3 to 6 sided polygons) back to front compositing as in 2D texture method Limited by size of texture memory.

Slicing color opacity object (color, opacity) 1.0 Similar to ray-casting with simultaneous rays

Effect of the Sample Rate Slices 1 slice View direction 5 slices 20 slices 45 slices 85 slices 170 slices

Slice Based Problems? Does not perform correct Illumination Accumulation but can get close Can not easily add correct illumination and shadowing See the Van Gelder paper for their addition for illumination Stored in LUT quantized normal vector directions

Computational Strategies How can the basic ingredients be combined: Image Order (in sreen coordinate) Ray casting (many options) Object Order (in world coordinate) splatting, texture mapping Combination (neither) Shear warp, Fourier

Additional Reading For Ray casting Marc Levoy: Display of Surfaces from Volume Data in IEEE Computer Graphics & Applications, Vol. 8, No. 3, June 1988 Data Visualization, Principles and Practice, Chapter 10 Volume Visualization, by A. Telea, AK Peters, 2008 For splatting, please see, Data Visualization, Principles and Practice, Chapter 9, Image Visualization, by A Telea, AK Peters 2008 Footprint Evaluation for Volume Rendering, by Lee Westover, in ACM Computer Graphics Volume 24, Number 4, August 1990, pages, 367 376 For shear warp factorization, please see, Philippe Lacroute and Marc Levoy, Fast Volume Rendering Using a Shear Warp Factorization of the Viewing Transformation, Proc. SIGGRAPH '94, Orlando, Florida, July, 1994, pp. 451 458

Acknowledgment Thanks for materials from Prof. Charles D. Hansen, SCI, University of Utah Prof. Ronald Peikert (ETH) Prof. Robert Laramee, Swansea University Prof. Markus Hadwiger, KAUST Prof. Jian Huang, University of Tennessee Prof. Mike Bailey, Oregon State University