Because VRML files can contain a multitude of objects ViewBSP tries to separate these objects as a whole without splitting any polygons or intermingling polygons of different objects. During this process a bounding box hierarchy is built and a BSP tree of these bounding boxes is generated without looking at polygons at all. If two or more objects cannot cleanly be separated using their bounding boxes these objects will be merged and considered as a single object from then on. After the bounding box BSP tree has been built, all objects contained in these bounding boxes are BSP compiled on their own.
At this stage of compilation there are many BSP trees: First, there is the tree for objects as a whole (that is, their bounding boxes). Second, this tree potentially contains many BSP trees for all these objects which are attached to each of its leaves. For simplicity all these trees will be incorporated into a single structure after compilation has finished. The result is a BSP tree with two different types of nodes: Nodes that are separator planes only, without any attached polygons, and nodes containing one or more polygons.
The most important output format of ViewBSP is the *.bsp file. This (text-)file contains scene geometry and a description of the entire BSP tree. Optionally, explicit plane coefficients and bounding boxes can be calculated for every tree node and written to this output file. Bounding box information can be used for culling entire subtrees against the viewing frustum, for instance.
ViewBSP's BSP compiler can be configured via the options panel. The most important option is probably the selection of splitter heuristic. This determines how the compiler selects polygons along which to split. It can always try all polygons and choose the best (in terms of how few other polygons it splits), try the first n polygons (n can be set by the user), try n randomly selected polygons, or just take the first polygon that comes along. Another important option is the capability to insert trace vertices into edges. These are important to completely eliminating edge-tracing problems (pixel dropouts) with T-junctions.
Although ViewBSP is currently not able to display textures, texture coordinates are converted to affine mappings specified via three point-correspondences and written into the output file.
BSP tree compilation of entire scenes with no restriction on number of
primitives
Separation of spatially separable objects via special BSP tree nodes
Objects can be merged into single object if standard BSP tree desired
Rendering of scenes using OpenGL's depth-buffer or an already compiled
BSP tree
BSP tree view allowing to step through the tree and examine node polygons
Selection of four different splitter heuristics
Automatic insertion of trace-vertices to avoid pixel dropouts at T-junctions
Bounding boxes and explicit separator planes for each node if desired
VRML V1.0 input
Automatic tessellation of VRML primitives (cube, cylinder, cone, sphere)
2.
Input and Output Formats
This section looks in detail
at the proprietary formats ViewBSP is able to read and write, that is *.aod
and *.bsp files, and touches on several issues pertaining to VRML scene
graph nodes. It also looks at some parsing and object-representation issues.
3.
Menu Structure
This section describes all
available menu options except the compiler options panel which is described
in its own section.