Vis 2 Demo  1.0
Technical illustration type real-time rendering of geometry
 All Classes Namespaces Files Functions Variables Typedefs Macros
Vis 2 Demo Documentation

Program Description

This program produces real-time technical illustrations of complex polygon-based geometrical objects that enhance
understanding of the spatial relationships within and between them.


start program

view code
Navigation:
ROTATE:
PAN:
ZOOM:
SHOW HIDDEN OBJECT:
HIDE OBJECT:

left mouse button click and drag
mouse wheel click and drag
mouse wheel scroll
right mouse button click inside contour
right mouse button click outside contour





Step 1. Render all contents as solid color:


The objects in the scene description file are in three categories:
shell (outer layer of the heart), contents (chambers and vessels),
and separators (valves). In this pass only the contents are rendered.
Every geometric object has a color. Objects with the same color
build one logical entity (e.g. the left ventricle consists of two meshes).
A right-click with the mouse determines the selection.
This render pass builds the basis for the edge detection in the next step.


Step 2. Edge detection:


Based on the result from the previous pass a Sobel edge detection
filter is applied - once horizontally, once vertically.
A Gaussian smoothing filter removes aliasing artifacts.


Step 3. Masking of the selected color:


Based on the result from the 1. pass we find the color of the
selected object and calculate a mask for it. This means that all
objects of the same color (i.e. the same logical entity) are
involved as well. We subsequently blur the mask.


Step 4. Detection and masking of neighbors:


Based on the result from the 1. pass we find the neighbor colors of
the selected color and calculate a mask for them.


Step 5. Depth peeling of the outer layers:


For correct rendering of the transparent outer layers (the objects
of category shell) we perform classical depth peeling. Here
the third layer of all shell objects is depicted alongside the
result of the blending of all layers.


Step 6. Blending:


In the last step the results of the previous passes are combined into
a final image. All objects of category contents and separators
that are in the selected color are rendered and blended with the transparent
shell objects by applying the mask from Step 3 as alpha source. All
contents objects in the colors that are neighbors of the selected one
are blended with the result as a solid white color by using the mask from
Step 4 as alpha source. The edges are added last.