×
Menu

NiBillboardNode NDL help (EN)


NiBillboardNode (страница из оригинальной справки. NDL Gamebryo 1.1)
 
Description
NiBillboardNode objects automatically adjust their local rotation matrices to cause their children to "face" the camera at rendering time. They may either rotate freely to point towards the camera, or may be constrained to rotate about the NiBillboardNode's model-space-up-vector, which is defined to be [0,1,0]. Note that this vector is the model-space "up" vector only -- Gamebryo makes no requirements as to the world-space "up" vector used by an application.
 
Billboard Rotation Modes
The following rotation modes are supported by Gamebryo; note that rotation mode names are declared at the scope of NiBillboardNode, and must be qualified accordingly.
 
ALWAYS_FACE_CAMERA: Causes the model-space z-vector to be in line with the camera's view plane normal. In other words, any plane of constant Z in model space will have its normal parallel to the camera's direction vector. Each frame, the rotation required to re-establish this orientation is minimized. As a result, this mode may differ from RIGID_FACE_CAMERA.
 
ROTATE_ABOUT_UP: Causes the model-space z-vector of the billboard to be as close as possible to the camera's direction vector while only allowing rotation about the billboard's model-space up-axis [0,1,0]. This mode is useful for simulating cylindrically symmetric objects, such as light posts and trees, using a single cross-sectional flat image.
 
RIGID_FACE_CAMERA: The billboard has a normal that is always parallel to the camera's direction vector and the billboard and camera coordinate frames change rigidly together.
 
ALWAYS_FACE_CENTER: Causes the model-space z-vector to point at the camera center. Each frame, the rotation required to re-establish this orientation is minimized. As a result, this mode may differ from RIGID_FACE_CENTER.
RIGID_FACE_CENTER: Causes the model-space z-vector to point at the camera center while the billboard orientation is aligned with the camera coordinate frame.
 
Billboard Nodes and Rotations
Note that the local SetRotate and GetRotate for a billboard will not set or retrieve the rotated-to-camera model-space transform. This action is done externally from the billboard's own local rotation, and allows the billboard to be rotated independently of the rotate-to-camera transform. Note that the model-space rotate and all other parent transforms happen to the left (i.e. closer to world-space) of the billboard's rotate-to-camera transform.