DO/M3D

From Dark Omen Wiki

< DO(Difference between revisions)
Jump to: navigation, search
(Changed raw text to wiki table by using advanced Regedit-Fu)
m (Reverted edits by Ugaxygihydo (Talk) to last version by Mikademus)
 

Current revision as of 13:27, 20 November 2010

Note: this is old, partly incorrect and very incomplete information. This page will be rewritten sometime.

Contents

The M3D 3D Object File Layout

The M3D format used by Dark Omen is a raw-data binary format to save a model consisting of a non-hierarchal array of meshes. It is intended for forward-parsing and do not contain block meta-data.

Render flags

M3D stored basic instructions on how the model is intended to be rendered in its filename.

//=====================================================================
 
// Render flags
 
// ------------
 
//
 
// Render flags for a model are provided, believe it or not, in
 
// the model<nowiki>’</nowiki>s filename. If the leading character is an underline
 
// then the following is a hash for a binary attribute map where
 
//
 
//  00000 ( 0) = no flags
 
//  00001 ( 1) = translucency (colour blending?)
 
//  00010 ( 2) = animate texture UV coordinates
 
//  00100 ( 4) = transparency (alpha blending?)
 
//  10000 (16) = colour key transparency
 
//
 
// The hash depends on character
 
//
 
//  <nowiki>’</nowiki>0<nowiki>’</nowiki>..<nowiki>’</nowiki>9<nowiki>’</nowiki>: flag <nowiki>|</nowiki>= char - 48 (==<nowiki>></nowiki> 0 .. 9)
 
//  <nowiki>’</nowiki>A<nowiki>’</nowiki>..<nowiki>’</nowiki>Z<nowiki>’</nowiki>: flag <nowiki>|</nowiki>= char - 55 (==<nowiki>></nowiki> 10 .. 35)
 
//  <nowiki>’</nowiki>a<nowiki>’</nowiki>..<nowiki>’</nowiki>z<nowiki>’</nowiki>: flag <nowiki>|</nowiki>= char - 87 (==<nowiki>></nowiki> 10 .. 35)
 
//
 
// The most common filename prefixes (actually, the only ones
 
// present in Dark Omen) are:
 
//
 
//   "_4": 00000100 (transparency)
 
//   "_6": 00000110 (transparecy and animated texture coordinates)
 
//   "_7": 00000111 (translucency, animated texture coordinates, and transparency)
 
//   "_K": 00010100 (transparency and colour keying)
 
//
 
//===============================================================

General layout

0 24   File header
24 96 * n   Texture description
      Sub-object description

File header:

0 4 Long File ID
4 4 Long Magic
8 4 Long Version
12 4 Long CRC
16 4 Long NOT CRC
20 2 Short # textures
22 2 Short # sub-objects

Texture description entry

0 64 Char[64] Filepath (ignored)
64 32 Char[32] Texture filename

3D Sub-object Description

 
	char		name[32];	// object name
	short		parent;		// parent index
	M3DPOINT	pivot;		// origin for heirarchy
	short		vertices;	// number of verts.
	short		faces;		// number of faces
	long		flags;
	long		spare1;
	long		spare2;


Geometry

Geometry header List of faces List of vertices |-

List of all M3D models used by battles

Some scenery is also integrated into the Base.M3D map, that will have to be separated to use on other maps

SPARE9
B1_01
1 _4BARREL.M3D
2 _4HUT.M3D
3 _7WATER.M3D
4 _KHUT1_D.M3D
5 _KHUT2_D.M3D
6 _KHUT3_D.M3D
7 _KTREBSH.M3D
8 _KTREGE1.M3D
9 _KTREMD1.M3D
10 BASE.M3D
B1_02
1 _4WINDM2.M3D
2 _KTREBSH.M3D
3 _KTREGE1.M3D
4 _KTREMD1.M3D
5 _KWNDM_D.M3D
6 BASE.M3D
B1_03
1 _4GYGAT1.M3D
2 _4GYGAT2.M3D
3 _4TOMB.M3D
4 _7WATER.M3D
5 _KGRAVE.M3D
6 _KGRAVE2.M3D
7 _KGYWALE.M3D
8 _KGYWALL.M3D
9 _KHOUS1D.M3D
10 _KHOUS2D.M3D
11 _KHOUS3D.M3D
12 _KHOUS4D.M3D
13 _KHOUSE1.M3D
14 _KHOUSE2.M3D
15 _KHOUSE3.M3D
16 _KHOUSE4.M3D
17 _KTREBSH.M3D
18 _KTREGE1.M3D
19 _KTREMD1.M3D
20 BASE.M3D
B1_04
1 _KLNG1_D.M3D
2 _KLNG2_D.M3D
3 _KLONGH1.M3D
4 _KLONGH2.M3D
5 _KTREBSH.M3D
6 _KTREGE1.M3D
7 _KTTREMD1.M3D
8 BASE.M3D
B1_05
1 _4CORNER.M3D
2 _4CORNS2.M3D
3 _4CORNS3.M3D
4 _4ENDHS1.M3D
5 _4ENDHS2.M3D
6 _4HOUSE.M3D
7 _4INN.M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M3D
9 _4FRMHS3.M3D
10 _4RNDL_D.M3D
11 _4ROUNDL.M3D
12 _4SBARND.M3D
13 _4SMLBRN.M3D
14 _4STABL2.M3D
15 _4STABL3.M3D
16 _4STABLE.M3D
17 _4WALCAP.M3D
18 _4WALL.M3D
19 _KGATE.M3D
20 _KRAN_D.M3D
21 _KGRANAR.M3D
22 _KHAYSTK.M3D
23 _KHSTK_D.M3D
24 _KTREBSH.M3D
25 _KTREGE1.M3D
26 _KTREMD1.M3D
27 _KTREORG.M3D
28 BASE.M3D
B4_05
1 _4SSTONE.M3D
2 _7WATER.M3D
3 _KTREBSH.M3D
4 _KTREGE1.M3D
5 _KTREMD1.M3D
6 BASE.M3D
B4_06
1 _7WATER.M3D
2 _KTREBSH.M3D
3 _KTREGE1.M3D
4 _KTREMD1.M3D
5 BASE.M3D
B4_08
1 _4MAGSTN.M3D
2 _KTREBSH.M3D
3 _KTREGE1.M3D
4 _KTREMD1.M3D
5 _4CIRCLE.M3D
6 BASE.M3D
B4_09
1 _4RNDL_D.M3D
2 _4ROUNDLM3D
3 _KTREBSH.M3D
4 _KTREGE1.M3D
5 _KTREMD1.M3D
6 _KWINDML.M3D
7 _KWNDMLD.M3D
8 _KWTWR_D.M3D
9 BASE.M3D
B4_10
1 _4CRY1_D.M3D
2 _4CRYPT1.M3D
3 _4CRYPT2.M3D
4 _4CRYPT3.M3D
5 _4CRYPT4.M3D
6 _4CRYPT5.M3D
7 _4MOUSS.M3D
8 _KTREBSH.M3D
9 _KTREGE1.M3D
10 _KTREMD1.M3D
B5_01
1 _4JEWEL.M3D
2 _7GLOW.M3D
3 BASE.M3D
B5_01B
1 BASE.M3D
2 TEMPFURN.M3D
1 _KTREBSH.M3D
2 _KTREGE1.M3D
3 _KTREMD1.M3D
Personal tools
communication