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

Similar documents
Volume Graphics Introduction

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

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

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

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

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

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

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

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

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

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

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

Texture mapping. Computer Graphics CSE 167 Lecture 9

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

TSBK03 Screen-Space Ambient Occlusion

First Steps in Hardware Two-Level Volume Rendering

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Volume Rendering. Lecture 21

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

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

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

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Interactive Methods in Scientific Visualization

CIS 467/602-01: Data Visualization

GPU-based Volume Rendering. Michal Červeňanský

3D Rasterization II COS 426

Texture Mapping. Mike Bailey.

Computer Graphics. Shadows

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

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

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

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

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

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

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

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

Computer Graphics 10 - Shadows

The Rasterization Pipeline

Textures. Texture Mapping. Bitmap Textures. Basic Texture Techniques

Computergrafik. Matthias Zwicker. Herbst 2010

Data Visualization (CIS/DSC 468)

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CS 432 Interactive Computer Graphics

CT5510: Computer Graphics. Texture Mapping

CS 464 Review. Review of Computer Graphics for Final Exam

CSE 167: Introduction to Computer Graphics Lecture #5: Visibility, OpenGL

CS 4620 Midterm, March 21, 2017

Data Visualization (DSC 530/CIS )

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

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Render all data necessary into textures Process textures to calculate final image

Screen Space Ambient Occlusion TSBK03: Advanced Game Programming

Level of Details in Computer Rendering

GigaVoxels Effects In Video Games

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Topics and things to know about them:

CS 354R: Computer Game Technology

CSE 167: Lecture #15: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Direct Rendering of Trimmed NURBS Surfaces

Data Visualization (DSC 530/CIS )

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

Lecture 07: Buffers and Textures

General Purpose computation on GPUs. Liangjun Zhang 2/23/2005

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

TDA361/DIT220 Computer Graphics, January 15 th 2016

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

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University

Wednesday, 26 January 2005, 14:OO - 17:OO h.

AMCS / CS 247 Scientific Visualization Lecture 10: (GPU) Texture Mapping. Markus Hadwiger, KAUST

Problem Max. Points Total 80

-=Catmull's Texturing=1974. Part I of Texturing

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

Lecture 19: OpenGL Texture Mapping. CITS3003 Graphics & Animation

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

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 1. Prof Emmanuel Agu

CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

EE 4702 GPU Programming

Point based Rendering

CSE 167: Lecture #17: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Computer Graphics. Lecture 9 Environment mapping, Mirroring

CEng 477 Introduction to Computer Graphics Fall 2007

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

CS193P - Lecture 19. iphone Application Development. OpenGL ES

Medical Image Processing: Image Reconstruction and 3D Renderings

CS354R: Computer Game Technology

Computational Strategies

Octree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research

Direct Volume Rendering

Deferred Rendering Due: Wednesday November 15 at 10pm

Visualization. Images are used to aid in understanding of data. Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [chapter 26]

CS 130 Final. Fall 2015

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Hidden surface removal. Computer Graphics

Transcription:

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

Announcements Thursday, Dec 13: Final project presentations in EBU-3B room 1202, 3-6pm Midterms Verify total score on front sheet is sum of individual scores Cross-check total score with Ted If exam kept past end of today s office hour, cannot dispute grade later 2

Midterm Statistics Midterm 1 Midterm 2 # Submissions 53 49 Average score 70.5 69.9 Median score 72.5 69.5 Highest score 95 98 Lowest score 39.5 26 Standard Deviation 14.2 13.3 3

Lecture Overview Volume Rendering SSAO 4

Applications: Medicine CT Human Head: Visible Human Project, US National Library of Medicine, Maryland, USA CT Angiography: Dept. of Neuroradiology University of Erlangen, Germany 5 This and some of the following slides are from a Eurographics 2006 course by Dr. Christof Rezk Salama, Computer Graphics and Multimedia Group, University of Siegen, Germany

Translucent Objects Source: GPU Gems 6

Methods of Representation Polygonal - Triangle Mesh Freeforms - parametric curves, patches... Solid Modelling - CSG (Constructive Solid Geometry) Direct Volume Rendering 7

Why Direct Volume Rendering? Pros Natural representation of CT/MRI images Transparency effects (Fire, Smoke ) High quality Cons Huge data sets Computationally expensive Cannot be embedded easily into polygonal scene 8

Volume Rendering Outline Data Set 3D Rendering Classification in real-time on commodity graphics hardware 9

Rendering Methods There are two categories of volume rendering algorithms: 1. Ray casting algorithms (Object Order) Basic ray-casting Using octrees 2. Plane Composing (Image Order) Basic slicing with 2D textures Shear-Warp factorization Translucent textures with image-aligned 3D textures 10

Ray Casting Software Solution Image Plane Eye Data Set Numerical Integration Resampling High Computational Load 11

Rendering Methods There are two categories of volume rendering algorithms: 1. Ray casting algorithms (Object Order) Basic ray-casting Using octrees 2. Plane Composing (Image Order) Basic slicing with 2D textures Shear-Warp factorization Translucent textures with image-aligned 3D textures 12

Ray Casting Software Solution Image Plane Eye Data Set Numerical Integration Resampling High Computational Load 13

Plane Compositing Proxy geometry (Polygonal Slices) 14

Compositing Maximum Intensity Projection No emission/absorption Simply compute maximum value along a ray 15 Emission/Absorption Maximum Intensity Projection

2D Textures Draw the volume as a stack of 2D textures Bilinear Interpolation in Hardware Decompostition into axis-aligned slices 3 copies of the data set in memory 16

2D Textures: Drawbacks Sampling rate is inconsistent d d d Emission/absorption slightly incorrect Super-sampling on-the-fly impossible 17

3D Textures R For each fragment: interpolate the texture coordinates (barycentric) G B Texture-Lookup: interpolate the texture color (trilinear) R G B A 18

3D Textures 3D Texture: Volumetric Texture Object Trilinear Interpolation in Hardware Slices parallel to the image plane One large texture block in memory 19

Comparison of 2D with 3D Texturing Left: 2D textures, right: 3D textures [Lewiner2006] 20

Resampling via 3D Textures Sampling rate is constant d d Supersampling by increasing the number of slices 21

Transfer Functions 1D transfer function: maps RGBA to each data value (see a and c below). 2D transfer function: maps RGBA to each combination of data value and gradient magnitude (see b and d below). 22 From GPU Gems

Shadows Volume rendering with shadows (from GPU Gems) 23

Implementation: Loading a 3D Texture // init the 3D texture glenable(gl_texture_3d_ext); glgentextures(1, &tex_glid); glbindtexture(gl_texture_3d_ext, tex_glid); // texture environment setup gltexparameteri( GL_TEXTURE_3D_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); gltexparameteri( GL_TEXTURE_3D_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); gltexparameteri( GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE ); gltexparameteri( GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); gltexparameteri( GL_TEXTURE_3D_EXT, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); // load the texture image glteximage3dext(gl_texture_3d_ext, // target 0, // level GL_RGBA, // color storage (int) tex_ni(), // width (int) tex_nj(), // height (int) tex_nk(), // depth 0, // border GL_COLOR_INDEX, // format GL_FLOAT, // type _texture ); // allocated texture buffer glpixeltransferi(gl_map_color, GL_FALSE); 24

Videos Human head, rendered with 3D texture: http://www.youtube.com/watch?v=94_zs_6amqw GigaVoxels: http://www.youtube.com/watch?v=hscyurhgejw 25

Demo: DeskVox Created at IVL/Calit2 http://ivl.calit2.net/wiki/index.php/vox_and_virvo 26

Lecture Overview Volume Rendering SSAO 27

Screen Space Ambient Occlusion Screen Space Ambient Occlusion = SSAO Rendering technique for approximating ambient occlusion in real time Developed by Vladimir Kajalin while working at Crytek First use in 2007 PC game Crysis 28 SSAO component

SSAO Demo Screen Space Ambient Occlusion (SSAO) in Crysis http://www.youtube.com/watch?v=ifdailhtczk 29

Basic SSAO Algorithm Copy frame buffer to texture Pixel shader samples depth values around current pixel and tries to compute amount of occlusion Occlusion depends on depth difference between sampled point and current point Nvidia s documentation: http://developer.download.nvidia.com/sdk/10.5/direct3d/sourc e/screenspaceao/doc/screenspaceao.pdf SSAO shader code from Crysis: http://69.163.227.177/forum.php?mod=viewthread&tid=772 Another implementation: 30 http://www.gamerendering.com/2009/01/14/ssao/

SSAO With Normals First pass: render depth information in a texture s alpha channel and scene normals in the RGB channels Use this information to render SSAO in a render target It uses the normals and pixel depth to compute the occlusion between current pixel and several samples around that pixel, chosen by sampling texels from depth map around it. 31 No SSAO With SSAO

SSAO Discussion Advantages: Independent from scene complexity. No pre-processing, no memory allocation in RAM Works with dynamic scenes Works in the same way for every pixel No CPU usage: executed completely on GPU Disadvantages: Local and view-dependent (dependent on adjacent texel depths) Hard to correctly smooth/blur out noise without interfering with depth discontinuities, such as object edges 32