3D Scenes internals

From EECH Central
Revision as of 21:07, 17 July 2011 by Firebird (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There are several implicit rules used in the Lightwave Scenes to reflect EE scenes internals.

  • root objects
Objects of the scene compose objects hierarchy. Only one root object (i.e. object without parent) is allowed. Usually it is the greatest object in the scene (for example, body). Special objects (described below) are treated separately and actually are out of hierarchy.
  • named objects
Every object (except the root one) can be "named". If an item has a label assigned it can be used in the game to search for this sub object and control it manually then.

For example, compass direction is controlled by the game manually. To show correct arrow heading it is required to find it and then set its position parameters respectively to internal state.

The list of such names can be found in OBJECT_3D_SUB_OBJECT_INDEX_NUMBERS enum (OBJECT_3D_SUB_OBJECT_ prefix must be skipped). If you want to add another search name, you should modify that enum. No converter changes or repeat of conversion procedure are required though.

  • keyframe animation limits
Keyframe animation consists of change of 9 parameters (position, rotation and scale, 3 scalars per each). Those are set separately in key frames. Interpolation is used to calculate actual values in intermediate frames. Explicit interpolation function with parameters is used for it.

It is obligatory to use the only interpolation function (with the same parameters) for each animation. Only Linear and TCB are supported by the engine.

  • non-timed animation
Animation may be used in non-timed manner.

For example, if we have a speed gauge and a needle, we may have animation translating current speed into needle's position.

  • rotation limits
It is possible to set limits for heading, pitch and bank for some subobject.

Either all three should be set or none of them.

  • shadow objects
EECH supports two types of shadow objects. Either it is a specific non-null object or it's just a LOD (LODs) of the root object.

Usage of Lightwave object marked with SHADOW_OBJECT label is used as a shadow for the scene. A scene may have no such object. Its position makes no effect.

If a specific object must be used it is specified directly.

If a LOD (LODs) must be used the NullObject is used and its name is composed as NullObject (L2) where 2 is the starting LOD number for shadow.

  • collision objects
The non-null object marked with COLLISION_OBJECT label is used as a shadow for the scene.

A scene may have no such object. Its position makes no effect.

  • link objects
Null objects with LINK_OBJECT names (not labels!) can be used for defining links to other scenes.

The labels of such objects must hold correct scenes names.

For scenes names please address to OBJECT_3D_INDEXS enum (without OBJECT_3D_ prefix) If you want to add another scene, you should modify that enum. No converter changes or repeat of convertion procedure are required though.

  • cameras
Cameras names must be ones of defined in OBJECT_3D_CAMERA_INDEX_NUMBERS enum (without OBJECT_3D_CAMERA_ prefix).

The parent object of the camera is always the root object. Camera may have a target object.

If you want to add another camera name, you should modify that enum. No converter changes or repeat of convertion procedure are required though.

See also