STUD/Material

From owdev
Jump to: navigation, search

Outlines format for the instance ids found in the 01A file blobs. To see the generic STUD structure that wraps the blob and array definition, see STUD.

Instance Table ID: 0xABB8E85C7F65CBF9

Local ID: 0xA301496F

Common Types

struct array_definition_t {
  uint64 count;
  uint64 offset;
}

struct record_t {
  uint64 padding;
  uint64 key;
}

STUModelLook

 struct header {
   uint32 id; // 0xA301496F
   uint32 next_instance;
   uint64 material_offset; // points to an array definition, each entry is a material_t
   uint64 unk1;        // zero
   uint64 f005_offset; // points to an array definition for 005  files, each entry is a record_t
   uint64 unk2;        // zero
   uint64 unk3;        // zero, probably an offset
   uint64 unk4;        // zero
   record_t unk5;        // zero
   uint64 bind_offset; // points to an array definition for 00C/Model files, each entry is a record_t
   uint64 unk6;        // zero
   uint64 data_offset; // points to an array definition for material data, each entry is a shader_t
   uint64 unk7;        // zero
   uint64 unk8;        // zero
 }

 struct material_t {
   record_t definition;
   uint64 key; // found in model files
 }

 struct shader_t {
   uint64 unk1;          // zero
   record_t record;   //
   uint64 offset;        // points to an array definition for material binds, each entry is a material_t
   uint64 unk2;          // ?
 }