F3D Binary Model Format

The engine loads version 230,240,250 and 260. 3DSMaxExport and LuxF3D output version 260, Cinema4DExport 230. The difference lies in the way vertices are stored, but 260 should be used, which is presented here.

The only instance type we use is type 2 when splitting multi-material meshes. It is unsure if the engine will continue to support all 3 (or if all 3 actually work well). So best is not to use instances, or if then type 2.

[bytes] (mostly shorts, sometimes floats or single bytes)
IDs start at 1, 0 = non

 <[2] 0x1F3D (1+F=G ⇒ 3DG=3D Geometry>
 <[2] Version = 260
 <[2] count of Meshes>
 <[2] count of Instances 1 SHARED VERTICES>
 <[2] count of Instances 2 SHARED VERTICES & PARENT & MATRIX>
 <[2] count of Instances 3 SHARED VERTICES & TRIANGLES>
 <[2] count of Helpers/Bones>
 [
   <[2] parent ID> 
   <[2] String length of name> [<[1] character>]
  relative to parent:
  (
   <[4 *16] 4*4 float matrix (column major)>
   <[12] Position(x,y,z)> 
   <[16] Rotation Quaternion(x,y,z,w)> 
   <[12] Scale (x,y,z)>
  )
   {
     Helper
        no further information, just for hierarchy
 
Mesh <[2] Material ID> <[4] count of vertices> [ <[8] (u0,v0)> <[8] (u1,v1)> <[16](sx,sy,sz,sw)> special float4 or 2 texcoord channels <[8] (nx,ny,nz,pad)> normal as short <[8] (tx,ty,tz,tw)> tangent as short <[12] (x,y,z)> <[4] (r,g,b,a)> ] <1> Primitive Type { 0: Points 1: Triangle List 2: Triangle Strip 3: Quad List 4: Quad Strip } <[4] Total Indices> <[2] Primitivelistcount> [ <[2] Material ID> <[4] count of Indices> [<[2]/[4] Vertex ID (shorts if vertexcount < MAXUSHORT)>] ]
Instance 1 SHARED VERTICES <[2] Object ID of instance> <[2] Material ID> <[4] Total Indices> <[2] Polygonlistcount> [ <[2] Material ID> <[4] count of Indices> [<[2]/[4] Vertex ID>]
Instance 2 SHARED VERTICES & PARENT & MATRIX <[2] Objekt ID of instance> <[2] Material ID> <[4] Total Indices> <[2] Polygonlistcount> [ <[2] Material ID> <[4] count of Indices> [<[2]/[4] Vertex ID>]
Instance 3 SHARED VERTICES & TRIANGLES <[2] Objekt ID of instance> <[2] Material ID> } ] <[2] count of Materials> [ <[2] Texture stringlength of shadername> [<[1] character>] ] <[2] count of Skin Objects> [ <[2] ID of deformed mesh> <[2] max weights per vertex <[4] count of Skin vertices must match mesh vertexcount> [ <[2] count of weights> [<[2] Parent Object ID> <[2] Weight 0-1 as short>] ] ]