All SceneObjects require a flag that defines how it is treated during the Umbra 3 Optimizer computation and how it affects the the visibility of a given scene. The different possible flags are SceneObject::OCCLUDER, SceneObject::TARGET, SceneObject::GATE and SceneObject::VOLUME. The flags are used as bitmask so any combination of flags can be defined by OR'ing them together. For example, if an object is both an occluder and a target set the flag as "Umbra::SceneObject::OCCLUDER | Umbra::SceneObject::TARGET". The flags are set during object creating when calling Scene::insertObject().
OCCLUDER objects are used to hide other geometry. Occluders should be opaque and ideally defined so that they actually block the visibility between different areas of the scene. The number of occluders in a Scene does not have an impact on the resulting occluder data size.
Having a “bad occluder” (one that doesn’t end up actually occluding much, like a small teapot on the table) should be OK from Umbra’s point of view. Thus, a good rule of thumb is simply to have everything marked as an occluder (obviously apart from transparent objects), and then just remove the occluder flag from objects which seem to cause artifacts. These are typically ones that have holes smaller than “smallest hole” but through which you can still see in the game if they end up very close, such as grating, fences and some such.
TARGET objects can be hidden by occluders. All objects of whose visibility the user is concerned, should be marked as targets, as Umbra 3 visibility queries return lists of target objects.
GATE objects can be opened and closed runtime so that their effect on visibility changes. Typically windows and doors are tagged as gates. Closed gate object also block the spatial connectivity queries so they can be for example to simulate audio occlusion.
See the below image for an illustration how the gate is used to block visibility between two areas in a game scene.
A gate being used to open and close visibility between two areas.
VOLUME objects have a solid interior as well as a solid surface. This is useful for large target objects that may contain the camera, such as lighting volumes. A query will show a large volume target object as visible for a camera in the inside even if the line of sight to the object's surface is occluded, while a similar non-volume target may be occluded. Due to the way the inside volume of the object is determined, volume objects should always have models that have no holes in their surface and have all surface polygons facing towards the outside of the object. If possible, volume object models should be convex.