About Group Nodes

Group nodes are one of the most important hierarchy nodes. A group node is the most basic "container" node that can contain any other type of node as a child. Since the root node is derived from group, every single element in the database is contained inside at least one group. Groups separate the hierarchy at all levels. A large scene might initially be separated into four groups, each containing additional four groups, and those groups could contain other groups and meshes. Grouping creates granules of scenery the runtime software can quickly traverse.

The primary purpose of a group is to provide a name and bounding box. This bounding box is tested against the view volume once per rendered frame. If the group's bounding box overlaps the view volume, then the bounding boxes of its children are tested against the view volume. Any nodes that do not overlap the view volume are not added to the rendering list.

Groups and the parent-child relationships allow hierarchical culling. A group's children are only tested and rendered if their parent group is visible.

Figure 1.1. The following image shows a group bounding box containing a set of spatially related cubes. All these objects are culled when the group bounding box [shown as red lines] does not intersect the view volume. When the parent bounding box is off-screen, none of the child bounding boxes is tested. This doesn't make much difference with just a few objects, but it certainly makes a difference in a database with several hundred or several thousand objects.

View volume culling.

Figure 1.2. The following graphic shows the bounding box partially outside the view volume. Since this group is partially on-screen, the bounding boxes of its children (the cubes) are tested. The mesh bounding boxes are tested and several are found to be off-screen. The off-screen meshes are not added to the rendering list. (Meshes have all group properties because they too must be subject to hierarchical culling for optimum performance.) Without the parent group in this example, each mesh would have to be tested every time the scene was rendered - or once per frame. Again, this doesn't make much difference with just a few objects, but it can make a big difference in a database with several hundred thousand nodes.

Hierarchy Image

Should I Use A Group Or A Mesh?

Groups cannot store polygonal geometry. Thus you must use meshes to store geometry. Technically, you can store groups inside empty meshes but little is gained from such structure.

Freezing Bounding Boxes

Bounding box recalculations can be performance intensive. Performing the occasional recalculation is not a very big performance problem. However, imagine a model of a missile traveling through space. The missile emits alpha-blended smoke polygons to increase realism. The bounding box of the missile should be frozen so that each smoke polygon [and there might be several thousand as the missile roars through the sky] does not require a bounding box recalculation. The same analogy might be true for a gun and its bullets or a character and any blood splatters. Another option would be to detach the smoke polygons from the missile hierarchy.

Recalculating Bounding Boxes

Every once in a while, the bounding box of a group node or any group-derived nodes [group, mesh, and so on] becomes invalid. This presents itself as a bounding box that is too large or is a singularity. [A singularity takes up no space whatsoever.] Dragging and dropping any of the child nodes back over the group forces bounding box recalculation and corrects this problem. This is a known bug.

Group Collisions

The group flag collisions [described below] do not enable collision-detection for groups. Groups cannot be collided with, only meshes have that capability. However, the collisions flag determines whether or not collision detection is globally enabled or disabled for any child nodes. Do not alter group collision parameters unless you know exactly what you are doing or have been instructed to do so.

Group Visibility

During modeling, group visibility is often changed to hide database contents so that contents of the database do not obscure modeling or drawing operations. The group command, ToggleVisible, toggles group visibility. More specific visibility commands include HideAll and UnhideAll. These commands hide everything but the selected node or nodes, making it quite easy to reduce visual clutter in complex databases.

Transformations

Transforming a group affects all its children. This is absolute. There are three types of transformations that can be applied to groups: position, orientation, and scale. Group nodes with transformations reflect their transformed state by using a different icon.

Finally

Culling, collisions, bounding box freeze, and transformation locking options should not be tampered with unless you know exactly what you are doing.

Registration

Class registration and implementation information is as follows:

Category TypeInformation
ImplementationC++
ModuleGEOMETRY.DLL
CoreYes
Class HierarchyNode » Group
Outgoing DependenciesNone