Node masks used on the OSG scene graph in OpenMW-CS.
- Note
- See the respective file in OpenMW (apps/openmw/mwrender/vismask.hpp) for general usage hints about node masks. Node masks used for controlling visibility of game objects.
- Any node in the OSG scene graph can have a node mask. When traversing the scene graph,
- the node visitor's traversal mask is bitwise AND'ed with the node mask. If the result of this test is 0, then the node and all its child nodes are not processed.
- Important traversal masks are the camera's cull mask (determines what is visible),
- the update visitor mask (what is updated) and the intersection visitor mask (what is selectable through mouse clicks or other intersection tests).
- In practice, it can be useful to make a "hierarchy" out of the node masks - e.g. in OpenMW,
- all 3D rendering nodes are child of a Scene Root node with Mask_Scene. When we do not want 3D rendering, we can just omit Mask_Scene from the traversal mask, and do not need to omit all the individual element masks (water, sky, terrain, etc.) since the traversal will already have stopped at the Scene root node.
- The comments within the VisMask enum should give some hints as to what masks are commonly "child" of
- another mask, or what type of node this mask is usually set on.
- Note
- The mask values are not serialized within models, nor used in any other way that would break backwards compatibility if the enumeration values were to be changed. Feel free to change them when it makes sense.
Enumerator |
---|
Mask_UpdateVisitor |
|
Mask_Reference |
|
Mask_Pathgrid |
|
Mask_Water |
|
Mask_Fog |
|
Mask_Terrain |
|
Mask_ParticleSystem |
|
Mask_Lighting |
|
Mask_CellMarker |
|
Mask_CellArrow |
|
Mask_CellBorder |
|