Hank Childs, University of Oregon November 15 th, 2013 Volume Rendering, Part 2.

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
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Hank Childs, University of Oregon Nov. 25th, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 15: animation, transparency.
VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Pre-Integrated Splatting (Stefan Roettger)
Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
3D Graphics Rendering and Terrain Modeling
Ray-casting in VolumePro™ 1000
Hank Childs, University of Oregon November 6 th, 2013 Spatial-Based and Variable-Based Selections.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Hank Childs, University of Oregon December 6 th, 2013 Meshes, Fields, and Interpolation, Part 2.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Information Visualization.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Introduction to Volume Rendering Presented by Zvi Devir.
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
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.
RAY TRACING WITH DISPERSION CSS552 – Topics in Rendering Winter 2011 Final Project by: Kohei Ueda Shivani Srikanteshwara Mary Ann Chiramattel Kunjachan.
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.
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.
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
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
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
Unstructured Volume Rendering Jian Huang, CS 594, Spring 2002 This set of slides reference slides developed by Prof. Torsten Moeller, SFU, Canada.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
Hank Childs, University of Oregon October 3, 2014 CIS 441/541: Intro to Computer Graphics Lecture 2: The Scanline Algorithm.
Hank Childs, University of Oregon Oct. 10, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 4: Interpolating Colors and the Z-buffer.
Game Programming 06 The Rendering Engine
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
Hank Childs, University of Oregon Lecture #3 Fields, Meshes, and Interpolation (Part 2)
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
Computer Graphics II University of Illinois at Chicago Volume Rendering Presentation for Computer Graphics II Prof. Andy Johnson By Raj Vikram Singh.
3-D Data cs5984: Information Visualization Chris North.
Computer Graphics Blending CO2409 Computer Graphics Week 14.
Hank Childs, University of Oregon Lecture #10 CIS 410/510: Isosurfacing.
Lynwood Dunn ( ) Visual effects pioneer Acme-Dunn optical printer.
Hank Childs, University of Oregon Unstructured Grids.
Hank Childs, University of Oregon Volume Rendering, Part 3.
Hank Childs, University of Oregon Volume Rendering Primer / Intro to VisIt.
Hank Childs, University of Oregon Volume Rendering, pt 1.
UniS CS297 Graphics with Java and OpenGL Blending.
Bounding Volume Hierarchy. The space within the scene is divided into a grid. When a ray travels through a scene, it only passes a few boxes within the.
3-D Information cs5764: Information Visualization Chris North.
CS 445 / 645: Introductory Computer Graphics Review.
RENDERING : Global Illumination
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
Hank Childs, University of Oregon
Week 7 - Monday CS361.
CIS 410/510: Isosurfacing (pt 2)
Volume Visualization Chap. 10 November 20 , 2008 Jie Zhang Copyright ©
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Volume Visualization Chap. 10 December 3 , 2009 Jie Zhang Copyright ©
Real-Time Volume Graphics [06] Local Volume Illumination
Hank Childs, University of Oregon
Hank Childs, University of Oregon
© University of Wisconsin, CS559 Spring 2004
Computer Graphics Module Overview
GR2 Advanced Computer Graphics AGR
Presentation transcript:

Hank Childs, University of Oregon November 15 th, 2013 Volume Rendering, Part 2

Announcements Final project – Proposals due today Worth 0% of your grade – ½ credit if late – No proposals for pre-defined project … just available – Two prompts: Volume rendering Make a movie – VTK –VisIt

Upcoming Schedule 11/15: Volume rendering part 2 11/20: VisIt 11/22: uncertainty visualization (KP) 11/27: alternate lecture (force directed layouts) – 11/21 & 12/2 12/4: medical visualization (Eric Anderson) 12/6: unstructured grids Faculty fireside (parallel visualization): – Week of 12/2 or week of 12/9 Final: Thurs 12/12, 3:15PM, Rm 220?

Volume rendering Technique for rendering entire volume at one time Image order: iterate over pixels (via rays) Object order: iterate over data Typical method of determining color: – Compositing (use transfer function) But there are alternatives to compositing

Volume rendering overview (ray casting + compositing) Camera Pixels on the screen 3D data Ray casting game plan: For every pixel on the screen, Find ray for that pixel Intersect volume with ray Calculate color from intersection Assign color to pixel Ray casting game plan: For every pixel on the screen, Find ray for that pixel Intersect volume with ray Calculate color from intersection Assign color to pixel Which of these 4 steps will be easy? Which will be hard?

Outline Find Ray For That Pixel Intersect Volume With Ray Calculate Color From Intersection Assign Color To Pixel

From: Zhang, CSUSM, Introduction to Ray Tracing From Pixels to Rays This answers the “find ray for this pixel” question

Outline Find Ray For That Pixel Intersect Volume With Ray Calculate Color From Intersection Assign Color To Pixel

Ray-Volume Intersection: sampling Camera Pixels on the screen 3D data x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x Sampling is the most common method for “ray-casting” volume rendering Do we know how to do this sampling?

How to sample quickly Multiple strategies. For now, similar as before: – Find first cell intersected Intersection is at a face – Find where ray exits that cell Are there samples within the cell? Then sample them!! – Go to next cell (which shares a face) and repeat – Keep going until you exit the volume, one cell at a time, and see what samples it covers Approximately how many samples will we calculate?

Outline Find Ray For That Pixel Intersect Volume With Ray Calculate Color From Intersection Assign Color To Pixel

Transfer Function

“Alpha Channel” Represents opacity – 1.0 or 255: fully opaque – 0: fully transparent Stored alongside RGB – Referred to as RGBA Floating point (1.0) vs byte (255): – Precision vs uniformity with RGB & performance

Transparency Quiz: If you have a red square that is 50% opaque in front of a black background, what color would you see? – Represent your answer in terms of (R, G, B) Answer: (128, 0, 0)

Representing Colors Two ways of representing colors – Pre-multiplication – Straight RGBA (non-premultiplied) Slides use straight RGBA. – Will describe pre-multiplication afterwards Wikipedia page is great reference: Wikipedia page is great reference:

Formula For Transparency Front = (Fr,Fg,Fb,Fa) Back = (Br,Bg,Bb,Ba) Equation = (Fa*Fr+(1-Fa)*Br, Fa*Fg+(1-Fa)*Bg, Fa*Fb+(1-Fa)*Bb, Fa+(1-Fa)*Ba) Alpha component is important! Any observations?

Transparency If you have an 50% transparent red square (255,0,0,128) in front of an opaque blue square (0,0,255,255), what color would you see (in RGB)? – (128,0,64) If you have an 50% transparent blue square (0,0,255,128) in front of an opaque red square (255,0,0,255), what color would you see (in RGB)? – (64,0,128)

Calculating Color SampleScalar Value RGBA Equation = (Fa*Fr+(1-Fa)*Br, Fa*Fg+(1-Fa)*Bg, Fa*Fb+(1-Fa)*Bb, Fa+(1-Fa)*Ba) Apply this equation over and over until you run out of samples (then use background color) Apply this equation over and over until you run out of samples (then use background color)

Opacity Adjustment Consider ray with this profile Distance along ray Opacity from transfer function 50% 100% x x x What is the opacity of these three samples together?

Opacity Adjustment Consider ray with this profile Distance along ray Opacity from transfer function 50% 100% x x x x x What is the opacity of these five samples together? New interpretation: opacity is for a range, not a point. If you double the sampling, then the range is reduced. Typically think of opacity for a given sampling rate and then adjust as sampling rate changes. New interpretation: opacity is for a range, not a point. If you double the sampling, then the range is reduced. Typically think of opacity for a given sampling rate and then adjust as sampling rate changes.

Outline Find Ray For That Pixel Intersect Volume With Ray Calculate Color From Intersection Assign Color To Pixel

Allocate a buffer for storing RGB values – Buffer should have one RGB for every pixel on the screen. As you calculate color for a ray, assign that color to its corresponding buffer entry When you have all of the colors, put that image up on the screen, as if you had rendered it using graphics cards.

Volume rendering overview Camera Pixels on the screen 3D data Ray casting game plan: For every pixel on the screen, Find ray for that pixel Intersect volume with ray Calculate color from intersection Assign color to pixel Ray casting game plan: For every pixel on the screen, Find ray for that pixel Intersect volume with ray Calculate color from intersection Assign color to pixel Which of these 4 steps were easy? Which were hard?

Volume rendering Technique for rendering entire volume at one time Image order: iterate over pixels (via rays) Object order: iterate over data Typical method of determining color: – Compositing (use transfer function) But there are alternatives to compositing

Splatting Turn every point into a disk (aligned to the camera) – Color and transparency vary Render the splats from back to front using graphics hardware.

Transparent Planes Strategy: – Slice the volume by many planes ( ) – Apply transfer function to each vertex on the plane Result: plane with variation in color and transparency – Render the planes from back to front These can be quickly rendered using “2D textures” or “3D textures”. Image from VTK book

Volume rendering Technique for rendering entire volume at one time Image order: iterate over pixels (via rays) Object order: iterate over data Typical method of determining color: – Compositing (use transfer function) But there are alternatives to compositing

Ray functions: compositing Image from VTK book

Ray functions: maximum Image from VTK book

Ray functions: average value Image from VTK book

Ray functions: distance to value Image from VTK book

Volume rendering More on volume rendering – Shading – Multi-variate volume rendering – Optimizations – Combinations with surfaces

Shading surfaces This is done by calculating surface normal and then calculating light reflection (or lack of light reflection from light source)

Shading volumes Want to do all the same lighting equations, but we need a surface normal … for a volume. What to do? Answer: use gradient of field for “surface” normal

Volume rendering More on volume rendering – Shading – Multi-variate volume rendering – Optimizations – Combinations with surfaces

Multi-variate volume rendering Simplest form temperature density 32F 212F 122F 167F 77F

Multi-variate transfer functions From cs.utah.edu/~jmk

Multi-variate transfer functions From cs.utah.edu/~jmk

Volume rendering More on volume rendering – Shading – Multi-variate volume rendering – Optimizations – Combinations with surfaces

Optimizing Volume Rendering Big topic: – How to find samples quickly? – How to use advanced HW (GPUs) efficiently? Early ray termination – Just stop going when opacity gets greater than some threshold.

Volume rendering More on volume rendering – Shading – Multi-variate volume rendering – Optimizations – Combinations with surfaces

Surface Rendering + Volume Rendering How was this picture made?

And now… You know everything I think you should know after having taken a sci-vis class. I am proud of this class. Next few weeks should be fun lectures. Projects will hopefully be fun too.