Integrating Interactive Selection
Work in progress
Case History: K-3D
K-3D (http://www.k-3d.org) is an open-source artists' tool that has some striking similarities to ParaView - in particular, it is based on an implicit, demand-driven pipeline architecture where users make connections between sources, filters, and sinks to manipulate their data. Geometric data moves through the pipeline using a heterogeneous data structure which is roughly comparable to unstructured grids in ParaView. Geometric data can include arbitrary Of course, there are significant differences, too: K-3D isn't client-server, nor is it parallel. The bulk of the functionality revolves around interactive modelling (creation) of 3D datasets, rather than working with existing experimental or simulated data. Data tends to be orders of magnitude smaller - a typical 3D character model using subdivision surfaces or NURBS will number points and elements in the thousands to tens-of-thousands range, although this is offset in other areas - large bitmap textures play important roles in adding visual complexity.
Use Cases
Typically, users tend to go through an additive process where they begin with a simple geometric source (cube, sphere, cylinder, etc) and add complexity through a set of select/modify/repeat operations. For example:
- Create a cube.
- Select one face on the cube.
- Apply the extrude filter, which extrudes just the selected face.
- Select some of the points created by the extrude filter.
- Move the selected points around some.
- Select another face.
- Apply a split filter to split the face into two faces.
- ...
In K-3D, the above operations would result in a pipeline that looks like:
CubeSource -> Extrude -> TweakPoints -> Split -> Actor/Mapper
Terminology
K-3D makes an explicit distinction between selection state, selection set, and selection delta structures:
- A selection state is the actual state (selected versus not selected) of a collection of gprims. The state is stored in arrays that are part of the geometric data set, and thus move through the pipeline like any other variable.
- A selection set represents a set membership where gprims (points, edges, polygons, etc) are either inside or outside the set. The selection set stores a hierarchical list of IDs for gprims that are contained within the set.
- A selection delta stores a change between two selection states. It encapsulates the change as a set of explicit modifications to ranges of IDs - for example "select IDs 10 - 20", "deselect IDs 103 - 243", etc. The use of ranges makes it possible to represent "select all" and "deselect all" compactly, with a single range [0, MaxId].
When the user performs interactive selection (picking, rubber-bands, etc) in a 3D window, the end-result of that operation is a selection set representing what the user picked.
Most filters are "selection aware", meaning that they refer to the selection state of individual gprims and alter their operation accordingly. Filters may also modify the selection state as it passes through the pipeline: broadly speaking, some filters are selection filters, whose sole purpose is to alter / replace the selection state, while other filters modify the selection as a convenient side-effect of their true purpose.
A laundry list of selection filters:
Some filters that alter the selection as a side-effect: