ODT Object File Format
V1.2
24th May 1997.
© Themekit Ltd., 1997

Licence, Copyright, and Usage Limitation:

This file format document is released for use by MindRender VREK owners only. The purpose of supplying these format details is to allow proprietary conversion utilities to be built. It is strictly forbidden to distribute any utilities, competitive to Themekit products, which make use of this format.

Version Information

Version 1.2 of this object format is compatible with version V1.1 of the MindRender VR Explorer Kit (VREK). More specifically this includes:

File Format

This document specifies the MindRender object file syntax. This file is a text format.

The ODT file extension is used for MindRender object architecture files.

The filename prefix is currently limited to a maximum of 8 characters.

Any Questions?

If you have any questions arising from this format specification, please email to

techsupport@themekit.com

We will endeavour to answer your questions and to keep this format specification up to date as clear as possible.

Scope Of ODT File Contents

The ODT file specifies object architecture and also animation node topology. Future versions of this format may remove the animation node topology information to a separate animation skeleton file thereby allowing generic use of animation skeleton information.

Note regarding Labels

In the following descriptions, optional labels are defined as being any string of alphanumeric characters bracketed between the { and } curly brace characters. Any standard alphanumeric characters may be used including spaces as the label text. For example:

{This is a label}

{Thisisalsoalable}

{OK! This is my 3rd label.}

A space character should follow the closing brace before continuing with following parameters.

Object File Format (.ODT)

The following numbered sections apply to the sequence in which the fields occur. Examples of object files occur at the end of this document.

(0) MindRender version identifier line (text)

#MINDRENDER 1.2

Note that the # character should be the first character of the file.

The version specified in the example above is 1.2 and is compatible with the VREK V1.1 release (MindFormer V2.0).

(1) Level Of Detail (LOD) Usage flag (Integer)

0=Does not use LOD

1=LOD specified

If LOD is specified then the line will read:

<LOD object name> <switching distance>

If the LOD object name is '*' then this specifies that the object is to be disabled at the switching distance.

Example 1: No LOD

0

Example 2: LOD with 100 unit cutoff (no LOD object).

1

* 100

Example 3: LOD replacement with replacement with LODOBJ.ODT object at 1230.45 units

1

LODOBJ 1230.45

(2) Number of textures used

If not zero then the next 'n' lines are texture map descriptions:

<BITMAP FILE PREFIX> <A_flags> <background flag> <B_flags> <p1> <p2>

A_flags:

bit 0 : Truecolour flag

bit 1 : Quick texture flag background flag: B_flags:

bit 0 : tiled flag

bit 1 : animated flag p1 :if tiled then this is the POWER of 2 for the repeat width. p2 : if tiled then this is the POWER of 2 for the repeat height. If this is an animated texture then the following parameters are also required:

<number_of_frames> <animation_type> <frame_rate_type> <frame_rate>

number_of_frames is the number of frames into which the source bitmap should be vertically divided.

animation_type is:

0= no animation

1= loop forwards

2= loop backwards

3= ping pong (start forwards)

4= ping pong (start backwards)

frame_rate_type is always 0 at present (indicating number of rendered frames per anim frame).

frame_rate currently represents the number of rendered frames per animated texture frame.

This allows for MindRender to update the animation frame every 'n' render frames.

Future upgrades will allow for frequency specified frame rates.

Example 1: No textures

0

Example 2: Two textures, the first tiled every 32x32 pixels.

2

CASTLE3 0 0 1 5 5

CHECK2 0 0 0 0 0

Example 3: One animated texture…

With 6 frames in a loop forward animation. Frame stepping is every 40 render frames.

1

5SECS 1 0 2 0 0 6 1 0 40

(3) Flag for precalculated orientation (integer)

Note: For VREK, always use 0.

For your information:

If the flag is 0 then the object will have the local orientation calculated at scene processing time.

If the flag is 1 then the orientation is read from the scene file and processed into the local coordinates of the object as part of scene precalculation and therefore is not orientated locally at scene processing time.

(4) Flag for precalculated translation (integer)

Note: For VREK, always use 0.

For your information:

If the flag is 0 then the object will have the local translation calculated at scene processing time.

If the flag is 1 then the translation is read from the scene file and processed into the local coordinates of the object as part of scene precalculation and therefore is not translated locally at scene processing time.

(5) Flag for precalculated bounding sphere (integer).

Note: For VREK, always use 0.

For your information:

If the flag is 0 then the centroid and radius of the object bounding sphere is calculated at scene processing time.

If the flag is 1 then the centroid and radius are precalculated and applied at scene processing time with the appropriate orientation and translation.

(6) Object type (integer)

Note: For VREK, always use 0.

For your information:

0 = normal polygonal object

1 = vertex field (object should be displayed as points only)

in this case the following integers in the scene file represent

the colour of the points (R G B (0..255))

Example 1 : Vertex field object (greeny-blue colour)

1 0 128 200

(7) Number of vertices (integer)

(8) Vertices (see below).

(9) Number of surfaces (integer)

(10) Surfaces (see below).

(11) Number of nodes (integer).

(12) Nodes (see below).

Vertices Description.

(1) Each vertex is represented as the series of parameters described below.

{optional_label} <float x> <float y> <float z> <float u> <float v> [i <delta intensity>]

X,Y and Z are the local coordinates of the vertex.

U and V are the texture map coordinates for that vertex.

delta intensity (optional) is in range -32..+32 and is an integer.

Example 1: A simple non-labelled vertex at X=10,Y=20,Z=33. UV coordinates are U=32,V=126.5

10 20 33 32 126.5

Example 2: An origin vertex with label and delta intensity of +15

{This is a vertex at the origin} 0 0 0 0 0 i +15

Surfaces Description.

Each surface is represented as follows:

(1) Optional label.

(2) Node index to which surface is attached (integer).

0 = no nodal attachment.

<n> = index into the list of nodes in the node list (see later).

(3) Phong specular highlight enabled on surface (0|1).

0 = no hightlights.

1 = hightlights.

(4) Surface render type (integer).

This field allows for individual surfaces of an object to be rendered in particular ways independent of the actual polygons contained within the surface.

0 = solid polygons

1 = wireframe representation

2 = pixel field

3 = transparent (solid tint)

4 = transaparent (pattern tinted)

(5) Number of polygons in surface (integer).

(6) Polygons (see below).

Example 1 : Simple surface with 6 polygons:

0 0 0

6

Example 2 : Labelled surface with 6 polygons:

{cube surface tapered at top} 0 0 0

6

Example 3 : Phong specified surface with 16 polygons:

0 1 0

16

Polygons Description.

Each polygon is represented as follows:

(1) Optional label.

(2) Texture map flags.

This is a parameter indicating texture mapping options, arranged as a bitfield. Bit 0 represents the least significant bit.

Bit 0 : background flag

Bit 1 : texture hint flag Bit 2 : Environment map flag (3) Polygon rendering flags (integer).

This field represents all other options regarding the polygon, arranged as a bitfield. Bit 0 represents the least significant bit.

Bit 0 : shaded

1 : tinted 2 : vector 3 : double sided 4 : reserved

5 : texture background flag

6 : texture method 7 : invisible polygon 8 : polygon not selectable 9 : tint type 10: pattern tinting phase 11: environment mapping 12: disable phong specular highlights 13: true colour (4) Colour of polygon. Represents the base colour of the polygon.

Three integers (0..255) represent red green blue components of the polygon. NB: For non-truecolour polygons the colour is matched as well as possible with the current palette.

(5) Number of vertices (integer). - only present with non-vector polygons.

(6) List of vertices (integers).

Each vertex is listed as the index into the vertex list specified for this object (starting at 0). Vertices are described in an anticlockwise direction when facing the visible side of the polygon.

(7) UV coordinates for the vertices in the polygon specified in the same order as the vertices.

Specified as U V pairs delimited by space character.

Example 1: Simple 4-sided polygon

0 0 252 252 0 4 0 1 5 4

Example 2: Labelled polygon

{left (-ve x)} 0 0 252 252 0 4 0 1 5 4

Example 3: Textured polygon (using 3rd texture in list)

3 0 0 0 0 252 4 56 57 61 60 12.545854 12.163811 12.545854 12.163811 12.545854 117.386658 12.545854 117.386658

Example 4: Tinted polygon (pattern tint)

0 514 0 0 252 4 32 33 37 36

Nodes Descriptions.

Each node is represented as follows:

(1) Node label (mandatory)

(2) Parent node index (integer).

0 = this node is attached to the main body of the object.

<n> = this node is attached to node <n> where n is indexed from the start of this list (1 is the first node in the list).

Example 1: No nodes

0

Example 2: A heirarchy for a humanoid skeleton:

13

root1 0

root2 1

root3 2

body 3

lefthip 3

leftknee 5

righthip 3

rightknee 7

leftshoulder 4

leftelbow 9

rightshoulder 4

rightelbow 11

head 4

EXAMPLES

Here are a few example object files in the MindRender ODT format (V1.2) The examples include the following objects:

ODTEX1.ODT

ODTEX2.ODT ODTEX3.ODT ODTEX4.ODT ODTEX5.ODT