generalization to 3d · 320322: graphics and visualization 726 visualization and computer graphics...
TRANSCRIPT
320322: Graphics and Visualization 725
Visualization and Computer Graphics LabJacobs University
Generalization to 3D
• Coming back to our original problem of extractingisosurfaces, we can apply the idea of the marchingsquares algorithm to volumetric cells.
• We still compute the intersection of edges with theisocontour (now isosurface).
• The intersection points on the edges are obtained as a linear combination as before.
• The intersection points are connected by triangles.• Connectivity becomes more complicated.
320322: Graphics and Visualization 726
Visualization and Computer Graphics LabJacobs University
Generalization to 3D
• We can still establish a case table with all thepossible configuration for inside/outside-properties.
• As each cell has 8 vertices, we obtain 28 = 256 cases.• The cells are cubes (or cuboids).• Hence, the 3D algorithm is called Marching Cubes.
320322: Graphics and Visualization 727
Visualization and Computer Graphics LabJacobs University
Example cases
• Due to (rotational and inside-outside) symmetries, wecan reduce the case table from 256 cases to 15 cases.
320322: Graphics and Visualization 728
Visualization and Computer Graphics LabJacobs University
Reduced marching cubes case table
320322: Graphics and Visualization 729
Visualization and Computer Graphics LabJacobs University
Ambiguous faces
• Do ambiguous faces occur?
• Yes, in 6 of the 15 reduced cases.• Solution: Use asymptotic decider on each ambiguous
face.
320322: Graphics and Visualization 730
Visualization and Computer Graphics LabJacobs University
Ambiguous faces
• If we want to have a fast solution, can we just pick anyof the two choices?
• One has to make sure that the picking is doneconsistently such that a manifold surface is generated.
• This can be achieved using a case table with 256 cases.
320322: Graphics and Visualization 731
Visualization and Computer Graphics LabJacobs University
Ambiguous cells
• Is there also something like an ambiguous cell?
No ambiguous face Still, there is a second possibility
This is called a tunnel case
320322: Graphics and Visualization 732
Visualization and Computer Graphics LabJacobs University
Tunnel case
320322: Graphics and Visualization 733
Visualization and Computer Graphics LabJacobs University
3D asymptotic decider
• The same observation as in 2D can be done in 3D using a trilinear interpolation within the cube.
• One computes the intersection of the asymptotes of the hyperboloid and evaluates the function valuethere.
• Then, the analogous decision can be made.
320322: Graphics and Visualization 734
Visualization and Computer Graphics LabJacobs University
Marching Cubes
320322: Graphics and Visualization 735
Visualization and Computer Graphics LabJacobs University
9.3 Direct Volume Rendering
320322: Graphics and Visualization 736
Visualization and Computer Graphics LabJacobs University
Direct volume rendering
• Direct volume rendering is an alternative to surfaceextraction for visualizing volumetric shapes.
• Direct volume rendering does not extract anygeometry but directly displays the visible volumefrom a given viewpoint.
• This saves the surface extraction step.• On the other hand, it is view-dependent, i.e., the
entire computation needs to be executed again aftereach transformation step.
320322: Graphics and Visualization 737
Visualization and Computer Graphics LabJacobs University
Generalization of color mapping
• Direct volume rendering can be regarded as a generalization of color mapping.
• Again, the range of the scalar field f is mapped to color values.
• However, now it is done for all the samples within thevolume.
• In order to decide, what parts of the volume arevisible, we also need to assign opacities.
• Hence, the color mapping is extended from the rangeof f to RGBA values.
320322: Graphics and Visualization 738
Visualization and Computer Graphics LabJacobs University
Approach
• Feature extraction:Define opaque (and semi-transparent) regions.
• Displaying the feature:Render the opaque regions visible from the viewpoint.
• Interaction:Allow for viewing transformations and for changingthe color mapping (including opacity values).
320322: Graphics and Visualization 739
Visualization and Computer Graphics LabJacobs University
Ray casting
• The most famous direct volume rendering approach isobtained by casting rays to the viewpoint through anypixel of the viewing plane:
viewerviewing plane
bounding box of volume
ray
pixel
320322: Graphics and Visualization 740
Visualization and Computer Graphics LabJacobs University
Ray casting
• Light with intensity I0 enters the volume at some entry point.• The light traverses the volume and loses intensities depending
on the property of the traversed medium.• The denser the medium, the more light is absorbed.• Density is regulated using the assigned opacities.• The light that exits the volume is what is observed by the
viewer.
viewerviewing plane
bounding box of volume
ray
pixel
light I0
entry into volumeexit from volume
320322: Graphics and Visualization 741
Visualization and Computer Graphics LabJacobs University
Ray casting
• In order to determine, how much light arrives on a point on the ray, one needs to integrate the light attenuation from the entry into the volume (position0 on the ray) to the current position L.
light I0
320322: Graphics and Visualization 742
Visualization and Computer Graphics LabJacobs University
Ray casting• The attenuation is described by an exponential
decrease.• Hence, the intensity I(L) at distance L from the ray‘s
entry into the volume is described by
where μ(t) describes the density at position t alongthe ray.
I0I(L)
320322: Graphics and Visualization 743
Visualization and Computer Graphics LabJacobs University
Ray casting
• The attenuation term comprises light absorption and light scattering.
• For light scattering, light is not absorbed but deflected.• On the other hand, light that arrives the ray at position
L from a different direction, may be reflected into thedirection of the viewer.
320322: Graphics and Visualization 744
Visualization and Computer Graphics LabJacobs University
Ray casting
• Taking this incoming scattering effect into account, wemodify the light intensity computation at point L to
• We integrate the incoming light C(s) along the ray fromits entry s=0 to the position s=L.
• How much of the incoming light is scattered depends on the density μ(s) at position s.
• From position s to position L, the incoming scattered light C(s) μ(s) is again attenuated (exponential decrease).