generalization to 3d · 320322: graphics and visualization 726 visualization and computer graphics...

20
320322: Graphics and Visualization 725 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D Coming back to our original problem of extracting isosurfaces, we can apply the idea of the marching squares algorithm to volumetric cells. We still compute the intersection of edges with the isocontour (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.

Upload: others

Post on 22-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 2: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 3: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 4: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

320322: Graphics and Visualization 728

Visualization and Computer Graphics LabJacobs University

Reduced marching cubes case table

Page 5: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a 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.

Page 6: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 7: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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

Page 8: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

320322: Graphics and Visualization 732

Visualization and Computer Graphics LabJacobs University

Tunnel case

Page 9: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 10: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

320322: Graphics and Visualization 734

Visualization and Computer Graphics LabJacobs University

Marching Cubes

Page 11: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

320322: Graphics and Visualization 735

Visualization and Computer Graphics LabJacobs University

9.3 Direct Volume Rendering

Page 12: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 13: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 14: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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).

Page 15: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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

Page 16: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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

Page 17: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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

Page 18: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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)

Page 19: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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.

Page 20: Generalization to 3D · 320322: Graphics and Visualization 726 Visualization and Computer Graphics Lab Jacobs University Generalization to 3D • We can still establish a case table

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).