interpolation - faculty.jacobs-university.de filevolume rendering pipeline ii 1. shoot rays through...
Post on 24-Oct-2019
7 Views
Preview:
TRANSCRIPT
320322: Graphics and Visualization 730
Visualization and Computer Graphics LabJacobs University
Interpolation
• The samples along the ray will, in gerenal, not coincidewith the grid points that sample our scalar field f.
• In general, the sample position will lie in the interiorof a cell.
• As for cutting planes, we determine the cell and weuse trilinear interpolation within the cell to determinethe function value at the ray sample.
320322: Graphics and Visualization 731
Visualization and Computer Graphics LabJacobs University
Transfer function
• To the interpolated function values, we assign colorand opacity values.
• The function that maps the range of function valuesto RGBA color values is called the transfer function.
• The transfer function determines the visibility and hence the display of the resulting image.
• For example, a boundary surface rendering of an object is obtained by assigning A=1 to all interiorpoints and A=0 to all exterior points.
• The light intensity integration is performed for eachcolor channel independently.
320322: Graphics and Visualization 732
Visualization and Computer Graphics LabJacobs University
Volume rendering pipeline
1. Shoot rays through all pixels to the viewpoint.2. Sample the ray within the bounding box of the
volume with a given step size.3. At each ray sample, compute the function using
trilinear interpolation.4. Assign the transfer function to compute color and
opacity at each ray sample.5. Use back-to-front compositing to accumulate the
color intensities along the ray.6. Write the accumulated color to the pixel.
320322: Graphics and Visualization 733
Visualization and Computer Graphics LabJacobs University
Volume rendering pipeline II
1. Shoot rays through all pixels to the viewpoint.2. Sample the ray within the bounding box of the
volume with a given step size.3. Assign the transfer function to compute color and
opacity at each grid point.4. At each ray sample, compute color and opacity using
trilinear interpolation.5. Use back-to-front compositing to accumulate the
color intensities along the ray.6. Write the accumulated colot to the pixel.
320322: Graphics and Visualization 734
Visualization and Computer Graphics LabJacobs University
Classification
• The process of assigning color and opacity values to function values is also referred to as classification.
• The process of interpolating function values to obtain a continuous field is also referred to as reconstruction.
• The first pipeline is referred to as post-classification, as classification is executed after reconstruction.
• The second pipeline is referred to as pre-classification, as classification is executed before reconstruction.
320322: Graphics and Visualization 735
Visualization and Computer Graphics LabJacobs University
Surface rendering
320322: Graphics and Visualization 736
Visualization and Computer Graphics LabJacobs University
Semi-transparent regions
320322: Graphics and Visualization 737
Visualization and Computer Graphics LabJacobs University
Transparent surfaces
320322: Graphics and Visualization 738
Visualization and Computer Graphics LabJacobs University
Foggy regions
320322: Graphics and Visualization 739
Visualization and Computer Graphics LabJacobs University
Semi-transparent regions
320322: Graphics and Visualization 740
Visualization and Computer Graphics LabJacobs University
Pre- vs. post-classification
320322: Graphics and Visualization 741
Visualization and Computer Graphics LabJacobs University
Pre- vs. post-classification
• Pre- and post-classification are, in general, notproducing the same result.
• Classification and reconstruction are onlycommutative, if the transfer function is constant.
• Pre-classification can lead to less crisp images whenthe transfer function has fine details.
• Post-classification can lead to false colors wheninterpolating function values across discontinuities.
320322: Graphics and Visualization 742
Visualization and Computer Graphics LabJacobs University
9.4 Flow visualization
320322: Graphics and Visualization 743
Visualization and Computer Graphics LabJacobs University
Flow visualization
• Up to now, function f described a scalar field, i.e., itsrange was one-dimensional.
• Some fields are not scalar, but vector-valued.• Flow fields are vector fields, where the range has the
same dimension as the domain.• Flow fields frequently describe velocities.• Velocity v is given by its magnitude |v| and its
direction v / |v|.
320322: Graphics and Visualization 744
Visualization and Computer Graphics LabJacobs University
Direct flow visualization
• Direct flow visualizations locally depict the velocitiesby rendering glyphs in form of arrows or similar.
• They are of use to understand local phenomena.• The global flow phenomena are not captured well with
direct flow visualization methods.
320322: Graphics and Visualization 745
Visualization and Computer Graphics LabJacobs University
Arrow Plots
320322: Graphics and Visualization 746
Visualization and Computer Graphics LabJacobs University
Arrow Plots
320322: Graphics and Visualization 747
Visualization and Computer Graphics LabJacobs University
Motivation
• How can we understand the global flow behavior?• Particle traces!
320322: Graphics and Visualization 748
Visualization and Computer Graphics LabJacobs University
Approach
• Feature extraction:Trace the path of particles under the influence of the vector field.
• Displaying the feature:Render a finite number of the paths as curves.
• Interaction:Allow for manual seeding of the particles.
320322: Graphics and Visualization 749
Visualization and Computer Graphics LabJacobs University
Particle tracing
• Let p be a point in the domain D of vector field f.• The temporal derivative of v(p)= dp/dt is the velocity
at point p.• If we insert a particle at point p = p0, the particle will
move in direction v(p0).
• Velocity v(p) is induced by the vector field or flowfield f.
seed pointvelocity
flow field
path
320322: Graphics and Visualization 750
Visualization and Computer Graphics LabJacobs University
Flow integration
• The position of the particle at time t is obtained byfollowing the path from seed point p0 at seed time t0over the period from t0 to t.
• The path of the particle released at position p0 and time t0 is computed by integrating over the velocityalong the path:
• This equation assumed the motion of a mass-lessparticle.
320322: Graphics and Visualization 751
Visualization and Computer Graphics LabJacobs University
Interpolation
• Again, we have the situation that the points on thepath do, in general, not coincide with the grid pointsof the flow field.
• In order to determine the velocity at any position, wedetect the cell containing the current position and apply bilinear (in 2D) or trilinear (in 3D) interpolation.
• The interpolation can be executed component-wise on each component of the flow field f.
320322: Graphics and Visualization 752
Visualization and Computer Graphics LabJacobs University
Discretization
• The computation of the particle‘s position at a time t is an initial-value problem (ordinary differential equation).
• Discretizing the time with step size ∆t, it can besolved numerically using Euler‘s method:
320322: Graphics and Visualization 753
Visualization and Computer Graphics LabJacobs University
Discretization
• Using Euler‘s scheme, numerical errors can be ratherhigh.
• Stability is only guaranteed when using a sufficientlysmall step size ∆t.
• Better approximations can be obtained using higher-order schemes like the second- or fourth-orderRunge-Kutta scheme.
320322: Graphics and Visualization 754
Visualization and Computer Graphics LabJacobs University
Streamlines
• The resulting path is approximated by a piece-wiselinear approximation in form of a sequence of connected line segments.
• This geometric representation of the path is called a streamline.
• The flow field can be visualized by rendering a finite set of streamlines.
320322: Graphics and Visualization 755
Visualization and Computer Graphics LabJacobs University
Streamlines
320322: Graphics and Visualization 756
Visualization and Computer Graphics LabJacobs University
Seeding strategy
• The main challenge for 2D streamline visualizations isto find appropriate seed points.
• Streamlines tend to come close together in attractingregions.
• This leads to clutter.
320322: Graphics and Visualization 757
Visualization and Computer Graphics LabJacobs University
Cluttering
320322: Graphics and Visualization 758
Visualization and Computer Graphics LabJacobs University
Seeding strategy
• A trivial solution is to leave the seeding stretegy to the user by providing him with an interaction tool to choose regions of seeding.
• An automatic solution would randomly seed points and stop the flow integration step when the streamlinecomes too close to already existing streamlines.
• More sophisticated solutions try to pick longstreamlines.
320322: Graphics and Visualization 759
Visualization and Computer Graphics LabJacobs University
Seeding strategy
320322: Graphics and Visualization 760
Visualization and Computer Graphics LabJacobs University
Volume data
• All computation steps apply to 2D as well as 3D datasets.
• Streamlines can also be used to visualize volumetricflow fields.
• The main additional problem is occlusion.• Occlusion problems can be alleviated to a certain
extent by using good seeding strategies.• A better solution is to combine it with transfer
functions that keep streamlines within certain areas.• Such areas could, for example, be areas of high
velocity magnitude (scalar field).
320322: Graphics and Visualization 761
Visualization and Computer Graphics LabJacobs University
3D streamlines
320322: Graphics and Visualization 762
Visualization and Computer Graphics LabJacobs University
3D streamlines
video
top related