Interactive Methods in Scientific Visualization

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

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Lighting and Shading

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Global Illumination The Game of Light Transport. Jian Huang

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

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

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

COMP371 COMPUTER GRAPHICS

Sung-Eui Yoon ( 윤성의 )

Global Illumination. COMP 575/770 Spring 2013

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Lecture 18: Primer on Ray Tracing Techniques

The Rendering Equation. Computer Graphics CMU /15-662

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

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

The Rendering Equation and Path Tracing

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Introduction to 3D Graphics

Shading and Illumination

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

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Illumination Algorithms

Virtual Reality for Human Computer Interaction

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

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

CS5620 Intro to Computer Graphics

Deferred Rendering Due: Wednesday November 15 at 10pm

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

6. Illumination, Lighting

Lighting and Materials

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

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Intro to Ray-Tracing & Ray-Surface Acceleration

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

13 Distribution Ray Tracing

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

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Lecture 7 - Path Tracing

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

CS354R: Computer Game Technology

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

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

Homework #2. Shading, Ray Tracing, and Texture Mapping

The Rendering Equation & Monte Carlo Ray Tracing

Complex Shading Algorithms

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

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

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

Real-Time Voxelization for Global Illumination

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

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

CPSC GLOBAL ILLUMINATION

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Volume Illumination, Contouring

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Photon Mapping. Due: 3/24/05, 11:59 PM

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

Photon Mapping. Michael Doggett Department of Computer Science Lund university

The Traditional Graphics Pipeline

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

Ray-Tracing. Misha Kazhdan

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

782 Schedule & Notes

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Chapter 7 - Light, Materials, Appearance

Stochastic Path Tracing and Image-based lighting

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

The Traditional Graphics Pipeline

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CPSC 314 LIGHTING AND SHADING

INFOGR Computer Graphics. Jacco Bikker - April-July Lecture 14: Grand Recap. Welcome!

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz

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

Volume Graphics Introduction

Raycasting. Ronald Peikert SciVis Raycasting 3-1

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Review for Ray-tracing Algorithm and Hardware

MITOCW MIT6_172_F10_lec18_300k-mp4

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

CHAPTER 1 Graphics Systems and Models 3

Transcription:

Interactive Methods in Scientific Visualization

GPU Volume Raycasting Christof Rezk-Salama University of Siegen, Germany

Volume Rendering in a Nutshell Image Plane Eye Data Set Back-to-front iteration Front-to-back iteration

Volume Rendering Object order approach: Data Set Image Plane Eye For each slice { calculate contribution to the image }

Object Order Approach Proxy geometry (Polygonal Slices)

Volume Rendering Image order approach: Image Plane Data Set Eye For each pixel { calculate color of the pixel }

GPU Volume Raycasting Easy to implement Everybody knows how to draw a box: glbegin(gl_quads); { glvertex3d(0.0,0.0,0.0); glvertex3d(0.0,0.0,1.0); glvertex3d(0.0,1.0,1.0); glvertex3d(0.0,1.0,0.0); } glend();

GPU Volume Raycasting Simple Shader for Texture Mapping float3 main( float3 worldpos : TEXCOORD0, float3 viewvec : TEXCOORD1, { uniform sampler3d volumetex ) : COLOR float4 color = tex3d(volumetex, float4(0.0, 0.0, 0.0, worldpos); 0.0); for( int i = 0; i < NUM_STEPS; i++) { } float4 sample = tex3d(volumetex, worldpos); color += (1 - color.a) * sample; if (color.a > 0.99) break; worldpos += STEPSIZE * viewvec; Original Vertex Position in World Space Viewing Vector in World Space 3D Texture return color; }

GPU Raycasting vs. Texture Slicing GPU Raycasting is easier to impoment and also more efficient, because: No Alpha Blending! avoid successive read/write operations to the frame buffer Early Ray Termination provided you have an up-to-date GPU

Local Illumination Surface lighting: Light is reflected at surfaces Volume lighting: Light is scattered at isosurfaces Isosurfaces Isosurface extraction not required! We only need the normal vector Normal vector of isosurface is equal to (normalized) gradient vector

Gradient Estimation The gradient vector is the first-order derivative of the scalar field partial derivative in x-direction partial derivative in y-direction partial derivative in z-direction We can estimate the gradient vector using finite differencing schemes

Finite Differences Taylor expansion: Forward Difference: Backward Difference:

Finite Differences Central Difference: Gradient Approximation using Central Differences:

On-the-fly Gradient Estimation

Examples Local Illumination

On-the-fly Gradient Estimation Drawbacks: Each additional texture sample is expensive! Central Differences: 7 Texture Samples Forward/Backward Differences: 4 Texture Samples Advantages: Low memory requirements Gradient estimation at floating point precision! Gradient estimation can be omitted in FP (using a conditional branch)

Advanced Illumination cheetah skull big brown bat pterosaur skull Data sets available at the UTCT data archive, DIGIMORPH http://utct.tacc.utexas.edu

Translucency

Scattering Effects When a photon hits a surface, it changes both direction and energy Single Scattering: Light is scattered once before it reaches the eye Local illumination model Multiple Scattering Soft shadows Translucency Color bleeding

Surface-Like Reflection: The BRDF Bidirectional Reflectance Distribution Function Hemisphere BRDF Elevation Angle

Volume Scattering: The Phase Function Example: Henyey Greenstein Sphere Phase Function Probability of a photon changing ist direction by a given angle Rotation invariant ( no normal vector ) Anisotropy parameter

The BSDF Bidirectional Scattering Distribution Function Sphere BSDF Elevation Angle Scattering with orientation (surface-like) Phase function notation:

A Practical Model Surface-like scattering (BSDF) at high gradients Henyey-Greenstein at low gradients

A Practical Model

Math Notation Mathematical Model integrates over the entire sphere/hemisphere Integral must be solved for every intersection point Fredholm Equation (cannot be solved analytically)

Numerical Integration Equidistant Sampling Approximation integral by a Riemann sum Stochastic Sampling Uniformly distributed samples Approximation by sum

Cons: Slower convergence than Riemann sum Stochastic Sampling Pros: Better Scalability for multidimensional functions: increase number of samples in arbitrary steps Noise instead of Aliasing Independent of sampling grid: Clever placement of samples will improve the convergence!

Blind Monte-Carlo Sampling Example: Filtering an Environment Map (i.e. photograph: fisheye or mirror ball) For each pixel of the irradiance map: Determine n random directions on the hemisphere Sample the Environment Map and Average the results (incl. cos-term) LDR Sample

Rendering Calculate the radiance of a point depending on the incoming light on the sphere/hemisphere depending on the phase function/brdf Deterministic Uniform sampling of the sphere/hemisphere. High computational load good approximation Blind Monte-Carlo Randomized sampling of the sphere/hemisphere. Visually better images for fewer samples, slow convergence Importance Sampling Place samples where contribution is high Faster!

Importance Sampling Stochastic Sampling Non-uniformly distributed samples Approximation by sum Clever placement of samples Many samples where function is high Few samples where function is low Probability Distribution Function (PDF)

Sampling a Specular Lobe Simple Approach Specular term Non-optimal, but easy to implement Precompute random unit vectors Idea: with uniform PDFdistribution of directions restricted to a cone Randomly pick one vector Negate vector, if Blend with vector and normalize Blend weight controls the size of the specular highlight and can be calculated from shininess

Literature: Importance Sampling

GPU Ray-Casting Calculate First Intersection with Isosurface Rasterize the front faces of the bounding box For each fragment, cast a ray Find first intersaction point with isosurface by sampling along the ray interval bisection Store the intersection point in render target 0 Estimate the gradient vector using central differences Store the gradient vector in render target 1

First Render Pass MRT0: xyz-coordinates of first intersection point with isosurface MRT1: xyz-components of gradient vector (color coded)

High Quality Isosurface

Single Scattering (no shadows) Diffuse term: Sample irradiance cube using gradient direction Specular term: Calculate random directions on the specular lobe Sample environment cube Weight each sample with its BRDF/phase function and its probability distribution Deferred Shading

High Quality Isosurface Why not use a prefiltered environment map for the specular term as well? You can, but it only works for one specular exponent per object Variable shininess may be used to visualize additional surface properties (e.g. gradient magnitude)

Approximate indirect light Accessibility term: Ambient Occlusion How easy can a surface point be reached? Ambient Occlusion: Calculate random directions on the specular lobe Cast a ray and sample only a few steps in each direction Count the rays that do not intersect the isosurface again

High Quality Isosurface Single Ambient Scattering Occlusion

Single Scattering Example

Single Scattering Example

Multiple Scattering Mathematical Model integrates over the entire sphere/hemisphere Integral must be solved for every intersection point Fredholm Equation (cannot be solved analytically) Numerical Solution: Number of rays grows exponentially Much workload spent for little contribution

Multiple Scattering Mathematical Model integrates over the entire sphere/hemisphere Quantum Optics Trace the path of single photons Photons are scattered randomly Probability of scattering direction given by BRDF/phase function Monte Carlo path tracing

Phase Function Model Scattering of light at every point inside the volume Too expensive (extremely slow convergence) Not practicable. Controlling the visual appearance is difficult Idea: Restrict scattering events to a fixed number of isosurfaces only. non-refractive refractive

GPU Ray-Casting Scattering Pass Start at first isosurface and trace inwards Account for absorption along the rays Proceed until next isosurface Calculate scattering event Sample the environment on exit

Scattering Pass GPU Ray-Casting Simplifying Assumption: Absorption on the way in is same as on the way out Abort the ray inside the volume square the absorption and sample irradiance map Not very accurate but good visual results

Scattering Pass preview in real-time final version in ½-1 seconds

Final Composite Multiply Blend using Fresnel term

Primary rays: 1 Secondary rays: 64 Path Tracing Primary rays: 8 Secondary rays: 8 Primary rays: 64 Secondary rays: 1

Examples Different scattering cone angles for the inward-looking (transmissive) Phong-lobe refractive