Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

mesh_anim

aheadley edited this page Jan 17, 2014 · 1 revision

Format for mesh animation files.

\

Mesh animations, as discussed in this document will refer to animations scripted in Lightwave that apply to the hierarchical members of a mesh. These are not to be confused with procedural animations such as articulating gun meshes in the game currently.

\

Mesh animation files will be a simplified version of .NIS files. They will have a set of keyframes for a number of objects. Unlike NIS’s, these animations can be hierarchical and are designed to be used with mesh bindings, like the turret animation bindings currently in the game. They will not have camera animations, and will have multiple animation sequences (**) within a single file. They will have the extension .MAD.

\

First, a few notes on this format. Pointers are considered to be offsets from the start of the files, unless they are string pointers in which case, they are offsets from the start of the string block.

\

Now, on with the file format. It will start with a pretty familiar-looking header:

Name

Type

Purpose

Identifier

char[8]

Compared to “Mellonn” to verify file type

Version

Float

File version, starting with 1.0

StringBlockLength

Sdword

Length of string block.

StringBlock

Char *

Pointer to string block which will be used for fixing up bindings.

Length

Float

Length (in seconds) of all animations.

Nobjects

Sdword

Number of objects in animations

NkeyFrames

Sdword

Number of keyframes for all animations

Nanimations

Sdword

Number of separate animations in this file.

Times

Pointer to floats

List of times for keyframes.

Paths[6]

Pointers to lists of floats

Keyframes for the animation in the order of x, y, z, h, p, b

Animation

Array of structures

Animation information blocks

\

\

\

\

The format for animations is similar to the spaceobjpath structures used in .NIS files. It contains information on the length of the separate animations in the file.

\

Name

Type

Purpose

Name

Char *

Pointer to name of the object.

StartTime

Float

Time (seconds) of the start of the animation.

EndTime

Float

Time (seconds) of the end of the animation.

StartKeyFrame

Sdword

Index of starting keyframe

EndKeyFrame

Sdword

Index of last keyframe

\

\

\

\

The overall format of this file will be as follows:

  1. Header, including animation info structures

  2. Times data

  3. Keyframe arrays

  4. String data block

\

That’s it

Clone this wiki locally