MDL file

From Wiki

Jump to: navigation, search
(testing)
Line 1: Line 1:
 +
{| class="collapsible"
 +
|-
 +
|LF:||leadflags||''perhaps bitwise flags''
 +
|-
 +
|HA:||hardanims||''JointMIMe-like animation (PSOne)''
 +
|-
 +
|SA:||softanims||''Vertex/normalMIMe-like animation''
 +
|-
 +
|TB:||timblocks||''Textures (PSOne TIM image format)''
 +
|-
 +
|PC:||primchans||''one or more required (meshes)''
 +
|-
 +
|U0:||unknown00||''perhaps always one''
 +
|-
 +
| -16-
 +
|-
 +
|PCSZ:||primchanwords||''dword anims block offset (could be 32bit)''
 +
|-
 +
| -16-
 +
|-
 +
|HASZ:||hardanimwords||''dword sizeof anims block''
 +
|-
 +
|SASZ:||softanimwords||''dword sizeof diffs block''
 +
|}
 
__TOC__
 
__TOC__
 
<fieldset class="spec">
 
<fieldset class="spec">

Revision as of 05:50, 26 March 2011

LF: leadflags perhaps bitwise flags
HA: hardanims JointMIMe-like animation (PSOne)
SA: softanims Vertex/normalMIMe-like animation
TB: timblocks Textures (PSOne TIM image format)
PC: primchans one or more required (meshes)
U0: unknown00 perhaps always one
-16-
PCSZ: primchanwords dword anims block offset (could be 32bit)
-16-
HASZ: hardanimwords dword sizeof anims block
SASZ: softanimwords dword sizeof diffs block

<legend class="caps">

Header

</legend>

LF HA SA TB PC U0 -16- PCSZ -16- HASZ SASZ

<ifieldset class="spec"> <legend> swordofmoonlight.h </legend>

LF: leadflags perhaps bitwise flags
HA: hardanims JointMIMe-like animation (PSOne)
SA: softanims Vertex/normalMIMe-like animation
TB: timblocks Textures (PSOne TIM image format)
PC: primchans one or more required (meshes)
U0: unknown00 perhaps always one
-16-
PCSZ: primchanwords dword anims block offset (could be 32bit)
-16-
HASZ: hardanimwords dword sizeof anims block
SASZ: softanimwords dword sizeof diffs block

</ifieldset>

LF

This byte is not super well understood. It is either a straight value, or a bitwise combination of flag values. Known values are 0, 1, and 4. For not animated, Tinman style animation, and Scarecrow style animation respectively.

HA/SA

These bytes are the number of hard and soft (aka. Tinman/Scarecrow) animations contained within the file.

TB

This byte is the number of PlayStation TIM images embedded within the file. These images are used as textures. It seems that the EneEdit tool somehow overrides the use of the embedded images, in favor of external TXR images which it is able to generate (please note that the author himself is uncertain the accuracy of this claim!!)

PC

This byte is the number of sub headers in the file, of which there is one of per each separate section of geometry (a MDL may include many such sections.)

PCSZ/HASZ/SASZ

These three 16bit values indicate the size of the first three data blocks. The units are in 32bit intervals. In other words, a value of 4, indicates 16 bytes. Each block begins after the previous block, therefore it is necessary to sum the preceding blocks in order to arrive at the offset to any given block. There is a fourth block, which runs to the end of the file. The four blocks respectively pertain to 3D geometry, Tinman animation, Scarecrow animation, and TIM images. The TIM images themselves can consecutively be thought of as 4th, 5th, and so on blocks. It's a matter of personal interpretation.

<legend class="tech">1st PRIMITIVE CHANNEL

Primitive channels

</legend>

<legend>⋯</legend>

<legend>Nth PRIMITIVE CHANNEL</legend>

<legend class="tech">3D PRIMITIVES BLOCK

3D primitives

</legend>

<legend class="tech">PER VERTEX LOCATION BLOCK

Per vertex location

</legend>

<legend class="tech">PER VERTEX LIGHTING BLOCK

Per vertex lighting

</legend>

<legend class="tech">Tinman ANIMATIONS BLOCK

Tinman animations

</legend>

<legend class="tech">Scarecrow ANIMATIONS BLOCK

Scarecrow animations

</legend>

<legend class="tech">1st PlayStation .TIM IMAGE

TIM imaging

</legend>

<legend>⋯</legend>

<legend>Nth PlayStation .TIM IMAGE</legend>