Download presentation
Presentation is loading. Please wait.
Published byAsher French Modified over 9 years ago
1
Fast High Accuracy Volume Rendering Thesis Defense May 2004 Kenneth Moreland Ph.D. Candidate Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL85000.
2
Fast High Accuracy Volume Rendering 2May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
3
Fast High Accuracy Volume Rendering 3May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
4
Fast High Accuracy Volume Rendering 4May 2004 Problem Description Given: A 3D field of scalar information, typically represented as: –A finite set of points in three space with associated scalar values. –A connectivity graph.
5
Fast High Accuracy Volume Rendering 5May 2004 Problem Description Goal: Transform scalars to colors/opacities, render 3D model. Transfer Function Scalars Colors Opacities
6
Fast High Accuracy Volume Rendering 6May 2004 What Is Available Traditional/commodity 3D graphics hardware –Fast, powerful, and now flexible. –Only (directly) support 0, 1, and 2 dimensional primitives (i.e. points, lines, and polygons). Special purpose volume rendering hardware –Constrained functionality; rectilinear grids only. –Smaller economy of scale. Development/fabrication costs distributed less. Longer time span between generations.
7
Fast High Accuracy Volume Rendering 7May 2004 Using Commodity Graphics Hardware Naïve approach: render cell faces as translucent polygons.
8
Fast High Accuracy Volume Rendering 8May 2004 Using Commodity Graphics Hardware Naïve approach: render cell faces as translucent polygons. Result: “unrealistic” hollow cells.
9
Fast High Accuracy Volume Rendering 9May 2004 Why is it Wrong? 2D polygons only capture surfaces. –Volumes absorb/emit light differently.
10
Fast High Accuracy Volume Rendering 10May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
11
Fast High Accuracy Volume Rendering 11May 2004 Light Transport
12
Fast High Accuracy Volume Rendering 12May 2004 Light Transport
13
Fast High Accuracy Volume Rendering 13May 2004 A Light Transport Model The Particle Model –Sabella, 1988
14
Fast High Accuracy Volume Rendering 14May 2004 A Light Transport Model Ultimately, as light passes though a disk of size d, some percentage energy is absorbed, while some fixed amount is added.
15
Fast High Accuracy Volume Rendering 15May 2004 The Volume Rendering Equation
16
Fast High Accuracy Volume Rendering 16May 2004 The Volume Rendering Equation This equation must be solved for every pixel. –In practice, we do piecewise integration, so we may have to solve 100’s of times or more per pixel. Has no closed form. –Must solve for specific L and functions.
17
Fast High Accuracy Volume Rendering 17May 2004 Solution: Linear We can do a first order approximation through cells with linear interpolation. The volume rendering equation can be solved with linear functions for L and , but…
18
Fast High Accuracy Volume Rendering 18May 2004 Solution: Linear
19
Fast High Accuracy Volume Rendering 19May 2004 Solution: Linear
20
Fast High Accuracy Volume Rendering 20May 2004 Solution: Linear
21
Fast High Accuracy Volume Rendering 21May 2004 Solution: Linear Three CasesMany Terms Numerically Unstable
22
Fast High Accuracy Volume Rendering 22May 2004 Linear “Approximation” Plug in average luminance and attenuation.
23
Fast High Accuracy Volume Rendering 23May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
24
Fast High Accuracy Volume Rendering 24May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
25
Fast High Accuracy Volume Rendering 25May 2004 Transfer Function In the real world, a cloud is parameterized with material properties (luminance and density). In scientific visualization, a volume can parameterized by any number of scalars (pressure, temperature, vorticity, density, etc.). These scalars are mapped to material properties via a transfer function. The scalar ( f ) often varies linearly, but the transfer function ( T L and T ) does not.
26
Fast High Accuracy Volume Rendering 26May 2004 Transfer Function Sampling We cannot solve the volume rendering integral for general transfer functions, so we sample. 00.51 0 1
27
Fast High Accuracy Volume Rendering 27May 2004 Transfer Function Sampling We cannot solve the volume rendering integral for general transfer functions, so we sample. 00.51 0 1
28
Fast High Accuracy Volume Rendering 28May 2004 Transfer Function Sampling We cannot solve the volume rendering integral for general transfer functions, so we sample. 00.51 0 1 (0.5)
29
Fast High Accuracy Volume Rendering 29May 2004 Transfer Function Sampling We cannot solve the volume rendering integral for general transfer functions, so we sample. 00.51 0 1 (0.5) 0 0.5 1 (0.5)
30
Fast High Accuracy Volume Rendering 30May 2004 Transfer Function Aliasing
31
Fast High Accuracy Volume Rendering 31May 2004 Adaptive Transfer Function Sampling Constrain the transfer function to be piecewise linear [Williams98]. The function has linear segments joined at control points. Between the control points, the properties change linearly.
32
Fast High Accuracy Volume Rendering 32May 2004 Adaptive Transfer Function Sampling If none of the scalars in a cell are a control point of the transfer function, then the transfer function varies linearly. Solution: clip cells at control points. –When the scalars vary linearly, the locus of points for a given scalar is a plane. Rather than clip cells geometrically, clip ray fragments.
33
Fast High Accuracy Volume Rendering 33May 2004 Adaptive Transfer Function Sampling Clipping parameters can be determined from the surface scalars relative to the isosurface scalar.
34
Fast High Accuracy Volume Rendering 34May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
35
Fast High Accuracy Volume Rendering 35May 2004 Linear Luminance A common approach for finding a closed form for the volume rendering integral [Max90, Shirley90] is to hold the luminance constant. This simplifies the equation, but introduces error in the color. Instead, let us analyze the volume rendering integral with linearly varying luminance.
36
Fast High Accuracy Volume Rendering 36May 2004 Linear Luminance
37
Fast High Accuracy Volume Rendering 37May 2004 Linear Luminance After lots of calculus…
38
Fast High Accuracy Volume Rendering 38May 2004 Linear Luminance After lots of calculus… Notice the Repetition
39
Fast High Accuracy Volume Rendering 39May 2004 Substitute Now we just need to solve for and . Let
40
Fast High Accuracy Volume Rendering 40May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
41
Fast High Accuracy Volume Rendering 41May 2004 , linear Easy enough to solve. –Not too bad to compute.
42
Fast High Accuracy Volume Rendering 42May 2004 , linear Not so easy to solve/compute. But, we can build a 3D table. –Calculate values for all applicable (D, b, f ) triples.
43
Fast High Accuracy Volume Rendering 43May 2004 Smaller Tables 3D tables work, but –take lots of space –are not very cache coherent We could afford much more fidelity in a 2D table. Consider what happens when we change the limits of the integrals to range from 0 to 1.
44
Fast High Accuracy Volume Rendering 44May 2004 Smaller Tables Next, we distribute D within the inner integral. Notice that this is an algebraic manipulation, not an approximation.
45
Fast High Accuracy Volume Rendering 45May 2004 Partial Pre-Integration Because part of the equation is stored in a table, I dub this technique partial pre-integration. Problem: The domain is infinite. goes to zero as b D or f D goes to , but not fast enough.
46
Fast High Accuracy Volume Rendering 46May 2004 Partial Pre-Integration Solution: change the variables used to index .
47
Fast High Accuracy Volume Rendering 47May 2004 Partial Pre-Integration Average Partial Pre-Integration [Williams98]
48
Fast High Accuracy Volume Rendering 48May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
49
Fast High Accuracy Volume Rendering 49May 2004 Linear Attenuation is Not Always Best A user-intuitive transfer function editor presents opacity in the range from completely transparent to completely opaque. –But attenuation ranges from 0 to infinity. It also allows the user to vary the visible opacity linearly. –But linear changes in attenuation result in exponential changes in visible opacity.
50
Fast High Accuracy Volume Rendering 50May 2004 Attenuation versus Opacity Attenuation relates to the density of the volume. Opacity is the fraction of light the volume occludes. The relationship between the two [Wilhelms91]:
51
Fast High Accuracy Volume Rendering 51May 2004 , linear Solving results in an unwieldy equation. Rather than try to compute , use approximation.
52
Fast High Accuracy Volume Rendering 52May 2004 , linear That’s really close, but there is a tapering at the corners. A cross section reveals a parabola-like structure. Fit a parabola to it to get really close.
53
Fast High Accuracy Volume Rendering 53May 2004 , linear with linear has no closed form. Approximate with average .
54
Fast High Accuracy Volume Rendering 54May 2004 , linear That’s good, but we can do better. If f is greater than b, should be smaller. –Weight accordingly.
55
Fast High Accuracy Volume Rendering 55May 2004 Linear Approximations AverageInitial Approx Improved Approx
56
Fast High Accuracy Volume Rendering 56May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
57
Fast High Accuracy Volume Rendering 57May 2004 Results, Speed
58
Fast High Accuracy Volume Rendering 58May 2004 Results, Accuracy AveragePartial Pre-Integration[Williams98] D = 0.001 D = 0.1 D = 1
59
Fast High Accuracy Volume Rendering 59May 2004 Results, Accuracy AverageApprox 1Approx 2 D = 0.001 D = 0.1 D = 1
60
Fast High Accuracy Volume Rendering 60May 2004 Spatial Visualization Uniform errors are unlikely to make a difference in visual perception.
61
Fast High Accuracy Volume Rendering 61May 2004 Spatial Visualization Spatial transitions in color are very noticeable. - + + +
62
Fast High Accuracy Volume Rendering 62May 2004 Cell Boundaries At cell boundaries, approximation errors can change when the color does not.
63
Fast High Accuracy Volume Rendering 63May 2004 Results, Cell Boundaries Uniform Attenuation Back Opaque Front Opaque AveragePartial Pre-Integration[Williams98] Uniform Luminance Back Lit Front Lit
64
Fast High Accuracy Volume Rendering 64May 2004 Results, Cell Boundaries Uniform Attenuation Back Opaque Front Opaque Uniform Luminance Back Lit Front Lit Average Approx 1 Approx 2
65
Fast High Accuracy Volume Rendering 65May 2004 Overview Problem Description Previous Work Contributions –Adaptive Transfer Function Sampling –Linear Luminance –Partial Pre-Integration –Linear Opacity Results Conclusions
66
Fast High Accuracy Volume Rendering 66May 2004 Conclusions Adaptive transfer function sampling functional but slower than expected. –Due to heavy reliance on fragment processor. –Still competitive with other rendering solutions. Partial pre-integration works well. –Visually indistinguishable from [Williams98]. –Over 10X faster. Approximations for linear opacity work well. –Nearly as fast as [Wilhelms91]. –No visual artifacts.
67
Fast High Accuracy Volume Rendering 67May 2004 fin
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.