Volume Rendering utilizing Design Equipment.


115 views
Uploaded on:
Category: People / Lifestyle
Description
Volume Rendering utilizing Design Equipment Travis Gorkin GPU Programming and Engineering, June 2009 Motivation Volume Rendering Foundation Volumetric Information Optical Model Amassing Comparisons Volume Rendering on the CPU Raymarching Calculation Volume Rendering on Representation Equipment
Transcripts
Slide 1

Volume Rendering utilizing Graphics Hardware Travis Gorkin GPU Programming and Architecture, June 2009

Slide 2

Agenda Volume Rendering Background Volumetric Data Optical Model Accumulation Equations Volume Rendering on the CPU Raymarching Algorithm Volume Rendering on Graphics Hardware Slice-Based Volume Rendering Stream Model for Volume Raycasting Volume Rendering in CUDA

Slide 3

Volume Rendering Definition Generate 2D projection of 3D information set Visualization of medicinal and exploratory information Rendering common impacts - liquids, smoke, fire Direct Volume Rendering (DVR) Done without extricating any surface geometry

Slide 4

Volumetric Data 3D Data Set Discretely tested on standard framework in 3D space 3D exhibit of tests Voxel – volume component One or more steady information values Scalars – thickness, temperature, darkness Vectors – shading, typical, inclination Spatial directions controlled by position in information structure Trilinear introduction Leverage representation equipment

Slide 5

Transfer Function Maps voxel information qualities to optical properties Glorified shading maps Emphasize or group elements of enthusiasm for the information Piecewise straight capacities, Look-up tables, 1D, 2D GPU – basic shader capacities, composition lookup tables

Slide 6

Volume Rendering Optical Model Light collaborates with volume ‘particles’ through: Absorption Emission Scattering Sample volume along review beams Accumulate optical properties

Slide 7

Volume Ray Marching Raycast – once per pixel Sample – uniform interims along beam Interpolate – trilinear add, apply exchange capacity Accumulate – coordinate optical properties

Slide 8

Ray Marching Accumulation Equations Accumulation = Integral Color Transmissivity = 1 - Opacity Total Color = Accumulation (Sampled Colors x Sampled Transmissivities)

Slide 9

Ray Marching Accumulation Equations Discrete Versions Accumulation = Sum Color Opacity Transmissivity = 1 - Opacity

Slide 10

CPU Based Volume Rendering Raycast and raymarch for every pixel in scene Camera (eye) area: For Each Pixel Look Direction: Cast Ray Along: Accumulate Color Along Line

Slide 11

CPU Based Volume Rendering Sequential Process Minutes or Hours per outline Optimizations Space Partitioning Early Ray Termination

Slide 12

Volumetric Shadows Light constricted as goes through volume ‘Deeper’ tests get less brightening Second raymarch from test point to light source Accumulate enlightenment from sample’s perspective Same collection comparisons Precomputed Light Transmissivity Precalculate light for each voxel focus Trilinearly interject at render time View free, scene/light source subordinate

Slide 13

GPU Based Volume Rendering GPU Gems Volume 1: Chapter 39 “Volume Rendering Techniques” Milan Ikits, Joe Kniss, Aaron Lefohn, Charles Hansen IEEE Visualization 2003 Tutorial “Interactive Visualization of Volumetric Data on Consumer PC Hardware” “Acceleration Techniques for GPU-Based Volume Rendering” J. Krugger and R. Westermann, IEEE Visualization 2003

Slide 14

Slice-Based Volume Rendering (SBVR) No volumetric primitive in design API Proxy geometry - polygon primitives as cuts through volume Texture polygons with volumetric information Draw cuts in sorted request – back-to-front Use part shader to perform compositing (mixing)

Slide 15

Volumetric Data Voxel information sent to GPU memory as Stack of 2D surfaces 3D composition Leverage representation pipeline Instructions for setting up 3D surface in OpenGL http://gpwiki.org/index.php/OpenGL_3D_Textures

Slide 16

Proxy Geometry Slices through 3D voxel information 3D voxel information = 3D composition on GPU Assign surface direction to each cut vertex CPU or vertex shader

Slide 17

Proxy Geometry Object-Aligned Slices Fast and basic Three heaps of 2D surfaces – x, y, z standard headings Texture stack swapped taking into account nearest to perspective

Slide 18

Proxy Geometry Issues with Object-Aligned Slices 3x memory utilization Data recreated along 3 guideline bearings Change in perspective results in stack swap Image popping ancient rarities Lag while downloading new surfaces Sampling separation changes with perspective Intensity varieties as camera moves

Slide 19

Proxy Geometry View-Aligned Slices Slower, yet more memory productive Consistent testing separation

Slide 20

Proxy Geometry View-Aligned Slices Algorithm Intersect cutting planes with jumping box Sort coming about vertices in (counter)clockwise request Construct polygon primitive from centroid as triangle fan

Slide 21

Proxy Geometry Spherical Shells Best duplicates volume beam throwing Impractical – complex intermediary geometry

Slide 22

Sliced-Based Volume Rendering Steps

Slide 23

Rendering Proxy Geometry Compositing Over administrator – back-to-front request Under administrator – front-to-delay purchase.:

Slide 24

Rendering Proxy Geometry Compositing = Color and Alpha Accumulation Equations Easily executed utilizing equipment alpha mixing Over Source = 1 Destination = 1 - Source Alpha Under Source = 1 - Destination Alpha Destination = 1

Slide 25

Simple Volume Rendering Fragment Shader void main( uniform float3 emissiveColor, uniform sampler3D dataTex, float3 texCoord : TEXCOORD0 , float4 shading : COLOR ) { float a = tex3D (texCoord, dataTex);/Read 3D information surface shading = a * emissiveColor;/Multiply by opac }

Slide 26

Fragment Shader with Transfer Function void main( uniform sampler3D dataTex, uniform sampler1D tfTex, float3 texCoord : TEXCOORD0 , float4 shading : COLOR ) { float v = tex3d (texCoord, dataTex);/Read 3D information shading = tex1d (v, tfTex);/exchange capacity }

Slide 27

Local Illumination Blinn-Phong Shading Model Resulting = Ambient + Diffuse + Specular

Slide 28

Local Illumination Blinn-Phong Shading Model Requires surface typical vector Whats the ordinary vector of a voxel? Coming about = Ambient + Diffuse + Specular

Slide 29

Local Illumination Blinn-Phong Shading Model Requires surface ordinary vector Whats the typical vector of a voxel? Slope Central contrasts between neighboring voxels Resulting = Ambient + Diffuse + Specular

Slide 30

Local Illumination Compute on-the-fly inside of part shader Requires 6 composition brings for every figuring Precalculate on host and store in voxel information Requires 4x composition memory Pack into 3D RGBA composition to send to GPU

Slide 31

Local Illumination Improve impression of profundity Amplify surface structure

Slide 32

Volumetric Shadows on GPU Light lessened from light’s perspective CPU – Precomputed Light Transfer Secondary raymarch from test to light source GPU Two-pass calculation Modify intermediary geometry cutting Render from both the eye and the light’s POV Two distinctive edge supports

Slide 33

Two Pass Volume Rendering with Shadows Slice pivot set somewhere between perspective and light bearings Allows every cut to be rendered from eye and light POV Render request for light – front-to-back Render request for eye – (a) front-to-back (b) back-to-front

Slide 34

First Pass Render from eye Fragment shader Look up light shading from light cushion bound as composition Multiply material shading * light shading

Slide 35

Second pass Render from light Fragment shader Only mix alpha qualities – light transmissivity

Slide 36

Volumetric Shadows

Slide 37

Scattering and Translucency General disseminating impacts excessively complex for intuitive rendering Translucency aftereffect of dispersing Only need to consider approaching light from cone in course of light source

Slide 38

Scattering and Translucency Blurring operation See GPU Gems Chap 39 for points of interest

Slide 39

Performance and Limitations Huge measure of section/pixel operations Texture access Lighting estimation Blending Large memory use Proxy geometry 3D surfaces

Slide 40

Volume Raycasting on GPU “Acceleration Techniques for GPU-Based Volume Rendering” Krugger and Westermann, 2003 Stream model taken from work in GPU Raytracing Raymarching executed in piece project Cast beams of sight through volume Accumulate shading and obscurity Terminate when haziness achieves edge

Slide 41

Volume Raycasting on GPU Multi-pass calculation Initial passes Precompute beam headings and lengths Additional passes Perform raymarching in parallel for every pixel Split up full raymarch to check for ahead of schedule end

Slide 42

Step 1: Ray Direction Computation Ray course processed for every pixel Stored in 2D surface for utilization in later steps Pass 1: Front appearances of volume bouncing box Pass 2: Back countenances of volume jumping box Vertex shading segments encode article space guideline headings

Slide 43

Step 1: Ray Direction Computation Subtraction mix two compositions Store standardized course – RGB segments Store length – Alpha segment

Slide 44

Fragment Shader Raymarching DIR[x][y] – beam heading composition 2D RGBA values P – per-vertex float3 positions, front of volume bouncing box Interpolated for section shader by illustrations pipeline s – consistent step size Float esteem d – aggregate raymarched separation, s x #steps Float esteem

Slide 45

Fragment Shader Raymarching DIR[x][y] – beam bearing composition 2D RGBA values P – per-vertex float3 positions, front of volume bouncing box Interpolated for section shader by design pipeline s – steady step size Float esteem d – aggregate raymarched separation, s x #steps Float esteem Parametric Ray Equation r – 3D surface directions used to test voxel information

Slide 46

Fragment Shader Raymarching Ray traversal method split into vari

Recommended
View more...