So, this is complete-regardless of type file format for HODs ( and the one which CFHodEd uses, heyhey )
Code:
##########################################################################################################################
---- format ----
FORM
-> Version FORM
FORM
-> NAME FORM
FORM
-> HVMD FORM
-> -> LITE form
-> -> for each material, STAT FORM
-> -> for each textured material, LMIP FORM
-> -> VARY FORMS for each object
-> -> NRML FORM
-> -> -> BGLT FORM
-> -> FORM
-> -> -> BGMS FORM
-> -> -> -> Basic MeSHes form
-> -> SIMP FORM, for each SIMPle mesh
-> -> NRML FORM
-> -> -> MULTi-Mesh Form
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD0)
-> -> -> -> -> -> For each material used, a polygonal object.
-> -> -> -> -> -> -> Face Strips (if needed)
-> -> -> -> -> -> -> Face List for misc faces (usually this is ALWAYS present)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD1)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD2)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD3)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD4)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD5)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD6)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD7)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD8)
-> -> -> -> "NRML" Form
-> -> -> -> -> Basic MeSH Form (LOD9)
-> -> "NRML" form
-> -> -> GOBlin-Group Form ( same as MULT, except that doesn't have "Number of LoDs" paramter in its Basic MeSH )
-> -> -> -> Basic MeSH Form
-> -> -> "GOBS" -> Out dated and not used
-> -> -> "GOBD" -> Out dated and unused
-> -> FORM
-> -> -> BackGround Star Group FORM [Only for Backgrounds]
FORM
-> DTRM Form
-> -> HEIRarchy Form
-> -> Engine Trail SHape Form
-> -> engine GLOW Form
-> -> engine BURN Form
-> -> NAVigation Lights Form
-> -> DAMaGe points Form -> (seems obsolete)
-> -> DOCKing paths Form
-> -> HARDpoints Form -> Not used now
-> -> MaRKeRs Form (may contain ANiMation forms)
-> -> STaR Fields form [Only for Backgrounds]
-> -> BouNDary Values Form
-> -> COLlision Detection meshes Form
-> -> Battle Scar Ref Mesh Form (NOT for Backgrounds)
-> -> -> "DESC" Form
-> -> -> Bounding BOX Form.
-> -> -> Boundary SPHere Form
-> -> -> "TRIS" Form (probably)
-> -> -> Vertex NoRMals Form
-> -> -> Spatial SUBdivision Form
FORM
-> INFO Form
[if needed]
-> -> WARN Form
-> -> -> Form Length
-> -> ERRR Form
-> -> -> Form Length
[usually always present]
-> -> OWNR Form
-> -> -> Form Length
---- End ----
##########################################################################################################################
---- Version FORM ----
"FORM"
<length, in bytes, big endian> {ulong}
"VERS"
<version, always HEX:[00020000], ie 512, LittleEndian>
--- End ----
---- NAME FORM ----
"FORM"
<length, in bytes, big endian> {ulong}
"NAME"
<type of file. Can be as follows:
"Homeworld2 Multi Mesh File"
"Homeworld2 Simple Mesh File"
"Homeworld2 Wireframe Mesh File">
--- End ----
---- HVMD FORM ----
(seems to be a non-deterministic section of data)
"FORM"
<length, in bytes, big endian> {ulong}
"HVMD"
LITE chunks for each light.
STAT chunks for each material.
LMIP chunks for materials.
MULT\GOBG chunks for objects.
---- end ----
---- LITE FORM ----
"LITE"
<length of this FORM, in bytes, big endian> {ulong}
<no of lights, little endian> {ulong}
for each light
--
<length of light's name, in bytes, little endian> {ulong}
<name of light> {char}
<type of light: 0 = Ambient Light
1 = Area Light
2 = Directional Light
3 = Point Light
4 = Spot Light
5 = Volume Light, little endian> {ulong}
<X Y Z co-ords, LE> {float, ie single}
<R G B Colour, LE> {float, ie single}
<R G B Specularity, LE> {float, ie single}
<Attenuation, LE> {ulong}
<Attenuation Distance, LE> {float, ie single}
--
---- end ----
---- STAT FORM ----
"STAT"
HEX:[000003E9] <- always next to stat, like an identifier. It's the version!!!
<length of material's name, in bytes, little endian> {ulong}
<name of the material> {char}
<length of shader's name, in bytes, little endian> {ulong}
<no of layers for this material, little endian> {ulong}
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT if zero, next chunk won't exist, end of STAT
HEX: [0500000004000000] <--- Looks like a identifer for a material with texture.
TTTTTTTTTTTTTTTT <--- Yes. This is an identifier for a textured material
<layer number, globally, for this 'parameter', little endian> {ulong}
<length of layer('parameter')'s name, little endian> {ulong}
<name of layer('parameter')> {char}
---- end ----
---- LMIP FORM ----
"LMIP"
<length of this LMIP chunk, in bytes, big endian> {ulong}
<length of file name with path, in bytes, little endian> {ulong}
<file name\path> {char}
<type of file> {char}
<no of mips, little endian> ulong
<width, little endian> ulong
<height, little endian> ulong
<data stream for picture>
---- end ----
---- VARY FORM ----
"VARY"
<length of this chunk, in bytes, big endian> {ulong}
<length of name of this mesh, Little Endian> {ulong}
<name of this mesh> {char}
<length of name of the joint, which this mesh is attached to, Little Endian> {ulong}
<name of the joint this mesh is attached to> {char}
<number of vertices, LE>, {ulong}
<number of wedges, LE>, {ulong}
<number of faces, LE>, {ulong}
<number of collapses (?), LE>, {ulong}
<number of uv sets, always 1, LE>, {ulong}
for each vertex
<X Y Z position of the vert., LE>, {ulong}
for each wedge
<vertex number, LE>, {ulong}
<X Y Z position, LE>, {ulong}
<U V co-ords., LE>, {ulong}
<colour, LE>, {ulong}
for each face
<material used, LE>, {ulong}
<wedge used, LE>, {ulong}
<face (?), LE>, {slong (!)}
for each collapse
<number of fix-ups, LE>, {ulong}
for each fix-up
<type of fix, LE>, {ulong}
<data0, LE>, {ulong}
<data1, LE>, {ushort}
<data2, LE>, {ushort}
---- end ----
---- BGLT FORM ----
"NRML"
<length of this chunk, in bytes, big endian> {ulong}
"BGLT"
<length of this chunk, in bytes, always ZERO???, big endian> {ulong}
---- end ----
---- BGMS FORM ----
"NRML"
<length of this chunk, in bytes, big endian> {ulong}
"BGMS"
<Basic MeSHes for different parts, usually 16>
---- end ----
---- SIMP FORM ----
"SIMP"
<length of this chunk, in bytes, big endian> {ulong}
<length of name of this mesh, this is zero for wire-frame(s) and single SIMP exists (!), Little Endian> {ulong}
<name of this mesh> {char}
<number of vertices, LE>, {ulong}
<vertex data...>
<num face lists\strips, this is zero in wire-frame(s) LE>, {ulong}
<face list data..., note: this is LONGs instead of SHORTs in the usual format (!)>
---- end ----
---- MULT FORM ----
(mult = multi mesh, for ships, somewhat like simple meshes)
"NRML"
<form length, BE> {ulong}
"MULT" or "GOBG"
<version, of this MultiMesh
Note: This should ALWAYS be 1400 (for MULT) or 1000 (for GOBG), big endian(BE)> {ulong}
<length of name of this mesh, Little Endian> {ulong}
<name of this mesh> {char}
<length of name of the joint, which this mesh is attached to, Little Endian> {ulong}
<name of the joint this mesh is attached to> {char}
<number of BMSH forms in this MM form, LE, not present for "GOBG" chunks> {ulong}
BMSH forms, for each lod...
---- end -----
---- BMSH FORM ----
"NRML"
<num bytes for this form>, {ulong}
"BMSH"
<version, of this BasicMesh.
Note: This should ALWAYS be 1400 (type doesn't matter), big endian(BE)> {ulong}
<lod of the mesh(es), Little Endian(LE)> {ulong}
<number of mesh(es) in this BMSH form, LE> {ulong}
<STAT(material) number used, probably LE> {ulong}
<vertex mask, this is 27 for Normal MULTi-meshes, and 11 if the vertex data only has X Y Z co-ords (no normals, UVs, of Colours) (ie not a background), LE > {ulong} ???
<num vertices in this part, LE> {ulong}
<vertex data...>
<num face lists\strips, LE>, {ulong}
<face list data...>
---- vtxd ----
<co-ords, LE> {float, ie single}
<filler1, always 1, LE> {float, ie single}
<vertex normal, LE> {float, ie single}
<filler2, always 1, LE> {float, ie single}
<uv coords> {float, ie single}
---- end ----
---- facd ----
<type of facelists, 514( (optimized?) strips) OR 518(lists), LE>, {ulong}
<number of faces this this list, not faces, but entries,
for lists, this is numFaces * 3, for strips, this is, should be, numFaces - 2, LE>, {ulong}
<face list, in triplets, LE>, ushort (Important!!! This starts from zero! wOBJ starts from 1!)
(Strips are a bit... different that lists, Stay Sharp)
---- end ----
---- HEIR FORM ----
"HEIR"
<num bytes for this form>, {ulong}
<number of joints, LE>, {ulong}
- for each joint -
<length of name of joint, LE>, {ulong}
<name of joint>, {char}
<length of name of parent, LE>, {ulong}
<name of parent>, {char} <- note, this CAN be null, and above one zero...
<position in X,Y,Z axis, LE>, float
<rotation in X,Y,Z axis, this is radians, LE>, float
<scale in X,Y,Z axis, LE>, float
<axis of this joint, ie 0,0,0 is normal, 0,180,0 means reverse Z-axis,
ie maybe this is applied to it's children after rotation. again, this is
in radians, not degrees, LE>, float
<freedom, in X, Y, Z axis, this is zero for 'EngineNozzle's
note: in Maya, children joints\objects can be rotated if deg. of freedom is
off. This may not be true in game, Also, it is POSSIBLE to give rotation
even when deg. of freedom is false, or zero... LE>, {bool}
- next joint -
---- end ----
---- ETSH FORM ----
"ETSH"
<num bytes for this form>, {ulong}
<length of name of this mesh, Little Endian> {ulong}
<name of this mesh> {char}
<length of name of the joint, which this mesh is attached to, Little Endian> {ulong}
<name of the joint this mesh is attached to> {char}
<number of vertices, LE>, {ulong}
<vertices, (these are usually in form of QUADs) position at X Y Z axis ONLY, LE>, {float}
---- end ----
---- GLOW FORM ----
"FORM"
<num bytes for this form>, {ulong}
"GLOW"
<"INFO":
<version, always 1000, BE>, unlong
<length of name of this mesh, LE> {ulong}
<name of this mesh> {char}
<length of name of the joint, which this mesh is attached to, LE> {ulong}
<name of the joint this mesh is attached to>, {char}
<LoD of this mesh, LE>, {ulong} >
<BMSH Forms for LoD>
---- end ----
---- BURN FORM ----
"BURN"
<num bytes for this form>, {ulong}
<length of name of this mesh, Little Endian> {ulong}
<name of this mesh> {char}
<length of name of the joint, which this mesh is attached to, Little Endian> {ulong}
<name of the joint this mesh is attached to> {char}
<number of vertices, LE>, {ulong}
<nurbs count, this should be one, LE>, {ulong}
<vertices, position at X Y Z axis ONLY, LE>, {float}
note: these are usually a NURBS Curve, but are points,
later points have higher Z position, X,Y deviation is possible
---- end ----
---- NAVL FORM ----
"NRML"
<num bytes for this form>, {ulong}
"NAVL"
<version, LE>, {ulong}
<number of NavLights, LE>, {ulong}
-- for each NavLight --
<length of name of this navlight, LE>, {ulong}
<name of navlight>, {char}
<section, LE>, {ulong}
<size, LE>, {float}
<phase, LE>, {float}
<frequency, LE>, {float}
<length of style name> {ulong}
<style> {char}
<colour, RGBA, normalized, LE>, {float}
<distance of light casting, LE>, {float}
<sprite is visible>, {bool}
<light casted on high-end systems only>, {bool}
-- next Navlight --
---- end ----
---- DOCK FORM ----
"DOCK"
<num bytes for this form>, {ulong}
<num of paths, LE>, {ulong}
-- for each path --
<length of name of this path, LE>, {ulong}
<name of path>, {char}
<length of name of parent of this path, LE>, {ulong}
<name of parent, >, {char}
note: that unlike joints, this is world, instead of null, and usually this IS
world, instead of joint>, {char}
<number of properties, global for this path, this is SIX, LE>, {ulong}
<number of properties, for point on the path, this is TEN, LE>, {ulong}
<is this a exit path?, LE>, {ulong}
<is this a latch path?, LE>, {ulong}
<global tolerence, this is obsolete and should ALWAYS be zero, LE>, {float}
<length of name of dockable families, LE>, {ulong}
<dockable families>, {char}
<use animations?, LE>, {ulong}
<length of name of linked paths, LE>, {ulong}
<linked paths>, {char}
<number of frames, LE>, {ulong}
-- for each frame --
<X Y Z position at this frame, LE>, {float}
<X Y Z orientation at this frame, again, this is in radians, LE>, {float}
<use rotation?, LE>, {ulong}
<point tolerance, LE>, {float}
<drop focus?, LE>, {ulong}
<max speed, LE>, {float}
<check rotation before proceeding?, LE>, {ulong}
<force close behaviour, LE>, {ulong}
<player is in control?, LE>, {ulong}
<queue origin?, LE>, {ulong}
<use clip plane?, LE>, {ulong}
<clear reservation?, LE>, {ulong}
-- next frame --
-- next path --
---- end ----
---- MRKR FORM ----
"FORM"
<num bytes for this form>, {ulong}
"MRKR"
"NRML"
<num bytes for this sub-form>
-- -- -- --
"HEAD"
<version, for this sub sub-form, this is ONE for MARKERS, BE>, {ulong}
<length of name, LE>, {ulong}
<name>, {char}
<length of name of parent, LE>, {ulong}
<name of parent>, {char}
<start keyframe time, this is 24fps, LE>, {float}
<end keyframe time, this is 24fps, LE>, {float}
<X Y Z position, LE>, {double}
<X Y Z rotation, this is in radians, LE>, {double}
-- -- -- --
"KEYF"
<num bytes for this sub-form>
"ANIM"
<version, for this sub sub-form, this is ONE here, LE>, {ulong}
<length of name of curve, LE>, {ulong}
<name of curve>, {char}
<number of keyframes, LE>, {ulong}
-- for each keyframe --
<time, LE>, {double}
<Value, LE>, {double}
<inTangentX, LE>, {float}
<inTangentY, LE>, {float}
<outTangentX, LE>, {float}
<outTangentY, LE>, {float}
-- next keyframe --
<Pre-infinity, LE>, {ulong}
<Post-infinity, LE>, {ulong}
---- end ----
--- BGSG FORM ----
"FORM"
<length of this chunk, in bytes, big endian> {ulong}
"BGSG"
<length of name of texture used, for stars, here, LE>, {ulong}
<name of texture used, for stars, here>, {char}
<number of star objects, LE>, {ulong}
-- -- -- --[for each star]-- -- -- --
<X Y Z position of the star, LE>, {float}
<size of the star, LE>, {float}
<R G B A colour of the star, LE>, {float}
-- -- -- -- -- -- -- -- -- -- -- --
---- end ----
---- STRF FORM ----
"NRML"
<num bytes for this form, BE>, {ulong}
"STRF"
<version, for this sub sub-form, this is 1000 for STRF, BE>, {ulong}
<number of star objects, LE>, {ulong}
-- -- -- --[for each star]-- -- -- --
<X Y Z position of the star, LE>, {float}
<R G B colour of the star, LE>, {float}
<size of the star, LE>, {float}
-- -- -- -- -- -- -- -- -- -- -- --
---- end ----
---- BNDV FORM ----
"BNDV"
<num bytes for this form>, {ulong}
<length of name of this object, LE>, {ulong}
<name of this object>, {char}
<length of name of parent of this object, LE>, {ulong}
<name of object, always ROOT???>, {ulong}
<number of vetices, or elements, this is ALWAYS 8, LE>, {ulong}
<vertices, with X Y Z co-ords only.
Note: only the 1st and 7th vertex have data.
Rest ALL are ZERO ( 2-6 and 8 ), LE>, {float}
<side information, ALWAYS 0, LE>, {ulong}
---- end ----
---- COLD FORM ----
"FORM"
<num bytes for this form>, {ulong}
<length of name of joint for which this CM info is intended, LE>, {ulong}
<name of joint for which this CM info is intended, LE>, {ulong}
-- -- -- --
"BBOX"
<length of this Form, BE>, {ulong}
<left-top-back extens, X Y Z, LE>, {float}
<right-bottom-front extents, X Y Z, LE>, {float}
-- -- -- --
"BSPH"
<version, this is 1000, BE>, {ulong}
<X Y Z center of this sphere, LE>, {float}
<radius of this sphere, LE>, {float}
-- -- -- --
"TRIS" -> This seems to be the collision Mesh itself
<version, this is 1000, again and again... BE>, {ulong}
<num vertices, LE>, {ulong}
<vertex data, for each vertex only X Y Z, no UVs or Normals, LE>, {float}
<number of entries, ie num faces * 3>
<face data, in triplets, LE>, {ulong}
---- end ----
---- BSRM FORM ----
"FORM"
<num bytes for this form>, {ulong}
"BSRM"
"NRML"
<num bytes for this sub-form>, {ulong}
"DESC"
<version, this is 1000, BE>, {ulong}
<length of name of this object's parent mesh, Little Endian> {ulong}
<name of this object's parent mesh> {char}
<length of name of the joint, which this object's parent mesh is attached to, LE> {ulong}
<name of the joint this object's parent mesh is attached to> {char}
<LoD of this object's parent mesh, LE>, {ulong}
"NRML"
<num bytes for this sub-form>, {ulong}
"BBOX"
<version, this is 1000, BE>, {ulong}
<left-top-back extens, X Y Z, LE>, {float}
<right-bottom-front extents, X Y Z, LE>, {float}
"NRML"
<num bytes for this sub-form>, {ulong}
"BSPH"
<version, this is 1000, BE>, {ulong}
<X Y Z center of this sphere, LE>, {float}
<radius of this sphere, LE>, {float}
"NRML"
<num bytes for this sub-form>, {ulong}
"TRIS"
<version, this is 1000, again and again... BE>, {ulong}
<num vertices, LE>, {ulong}
<vertex data, for each vertex only X Y Z, no UVs or Normals, LE>, {float}
<number of entries, ie num faces * 3>
<face data, in triplets, LE>, {ulong}
"NRML"
<num bytes for this sub-form>, {ulong}
"VNRM" -> And this looks like normals for TRIS, like numVerts there is equal to numNormals here.
<version, this is, *sigh*, 1000, BE>, {ulong}
<number of normals present, LE>, {ulong}
<vertex normal data, for each vertex only X Y Z Normals, LE>, {float}
<number of face-Indices, LE>, {ulong}
<face indice data, in triplets, LE>, {ulong}
"NRML"
<num bytes for this sub-form>, {ulong}
"SSUB" -> This is calculated by basis of "grids" in the plugins.
<version, this is 1000, BE>, {ulong}
<num Sub-Divisions in X Plane, LE>, {ulong}
<num Sub-Divisions in Y Plane, LE>, {ulong}
<num Sub-Divisions in Z Plane, LE>, {ulong}
-- for each sub division [ grid (!) ], ie X*Y*Z --
<number of triangles, LE>, {ulong}
<face list, which are to be sub-divided>
---- end ----
---- INFO FORM ----
"FORM"
<num bytes for this form>, {ulong}
"INFO"
[if needed, these two maybe present]
"WARN"
<length of warning + 1, LE>, {ulong}
<warning + NULL>, {char} <- looks like that NULL is string terminator here
"ERRR"
<length of error + 1, LE>, {ulong}
<error + NULL>, {char} <- looks like that NULL is string terminator here
[usually this is always present]
"OWNR"
<length of name of Owner + 1, LE>, {ulong}
<Name of Owner + NULL>, {char} <- looks like that NULL is string terminator here
---- end ----
##########################################################################################################################
##########################################################################################################################
Sounds informative? I've taken this information mostly from the RDN plugins. Some parts (for MULTs\GOBGs are from 'HW2 HOD Reporter' by Pesmontis)