Doxy
Doxy Documentation
- no title specified

Interactive Cutaway Illustrations - Visualisierung 2

 

Code Documentation

Code Documentation

Binaries

Sources

 

The paper „Interactive Cutaway Illustrations of Complex 3D Models“ by Wilmont Li et.al introduces a system that enables users to create viewing presentations with different types of cuts. This allows to visualize complex models and coherent parts other than simply being limited to binary plane partitioning.

 

This application, realized during the course Visualisierung 2 implements a subset of the functionality presented in the paper to give a similar experience in modifying the presentation of 3D models with a set of cutting techniques.

 

Screenshot

 

 

Features

 

Core functionality relies on constraint tests in the OpenGL shader pipeline, in which a set of cut parameters is translated to a range comparison for projected positions. The user sets the parameter space UVW and an offset for 3D position to produce a cutout on vertex based 3D Model.

 

Models can be loaded from Wavefront (obj) files, with corresponding mtl files for material /textures. The model is rendered with a Blinn-Phong shader with one lightsource (eye-direction)

 

To create a cut, the user can either type in parameter values in the top right window and play around with values by increasing/decreasing buttons, click and drag on the value to increase it by mouse-movement or by clicking the Select Cut button to enable a drag and drop style selection of a cut-size on the model. By clicking Select Cut, an arrow picker is enabled, which is rendered along the model.

Cuts and views can be saved in a list, and either be recalled on demand, or enabled or disabled.

 

Multiple cuts are allowed. Saving a cut and keeping it enabled renders the cut next to consecutive cutaways.

 

The user interface allows to change face colors of the model to single color, material, texture, a checkered pattern and the values of normals.

 

Controls

 

User controls GUI driven. 3 freely arrangable windows are provided to interact with the application

 

 

 

 

Each numbered parameter can also be manipulated by a +/- sign in the text box next to the number or by clicking the label, drag the mouse and „roll“ the value up or down.

 

NOTE: UVW values can be negative, which is useless for Box or Ball cutaways, but is necessary to set plane parameters properly.

 

Camera controls

 

Camera can be controlled by mouse drag and drop:

 left click:  rotate around projection center

 right click: zoom camera

 mouse3 click  pan camera

 scrollwheel: zoom

 

Cutaway Selection:

 

The mouse can be used to draw a cut on the surface area of the model. Press C or click Select Cut in the Cut Settings window and move the cursor position to the model surface. On the surface you can then see a small 3d curser that stands perpendicular to the surface area. Clicking sets cut position to clicked area, drag and drop manipulates UVW parameters, too.

Implementation

 

The actual implementation differs from the method presented in the paper, in which a CSG based library is used to define parameters for simple geometry and ranges of complex polygon chains to define a cut. The implementation for this prototype are inspired by methods used in typical 3D software called boolean modifiers and boolean modeling in a simplified form.

User parameters are send to a glsl shader program which performs a range test on each 3D coordinate of a drawn point and if a cut condition is met (e.g transformedPoint.x < box.x) in the Fragment/Pixelshader stage, the pixel will either be discarded (other points with bigger z value will be drawn instead) or the alpha channel will be set to a user value, rendering the point transparent.

 

S