-
Notifications
You must be signed in to change notification settings - Fork 5
QOB File Format
Glossary
GR - Ghost Recon,
GRE - Ghost Recon engine
RSB - Red Storm Bitmap
1. Introduction
2. Overview
3. Sections
3.1 File Header
3.3 Points Section
3.4 EndQOB
This document describes the structure of the QOB file format used by the GRE. GR game QOB files are stored in "Model" folder and has an extension of ".qob".
The QOB file contains the information about simple and static in-game 3D objects: guns and equipment, grass, some effects (muzle flash, rain drops) and other. This includes information about materials, textures, 3d geometry, and additional data for a game engine, such as helper points position. The QOB files can store only one game object, which will be named as a filename in game. You can create QOB files with an official developer plugin for 3DS MAX 3..5 version.
QOB files doesn't contain object's animation data.
The QOB file format is divided into two major sections and two signatures as shown in the QOB file structure.
№ | Section | Description |
---|---|---|
1 | File Header (signature ) | File header |
2 | MaterialList Section | Materials and textures information |
3 | GeometryList Section | Geometry objects data |
3 | Points Section | Points data |
4 | EndQOB signature |
The file header has a fixed length; the other three sections are variable in length.
The QOB file header is 15 bytes long.
Length | Type | Description | Value |
---|---|---|---|
4 | integer | File signature length. | 11 |
11 | string | File signature: always equal to 'BeginModel.'. | "BeginModel." |
The file signature is unique file identifier that helps game engine to auto-detect the file type on load. Most of GR game's files have there unique signatures.
The MaterialList section contains information about object's materials and textures.
№ | Section | Description | Links |
---|---|---|---|
1 | Header | see Table 4 | |
2 | Materials subsection | Object materials | see Materials |
3 | Textures subsection | Object textures | see Textures |
MaterialList section header is 41 bytes long. It is structured as follows:
Length | Type | Description | Value |
---|---|---|---|
4 | integer | MaterialList section size. | variable |
4 | integer | ID | 8 |
4 | integer | "Version." string length. Equal to 8. | 8 |
8 | string | "Version." string. | "Version." |
4 | integer | Version value. | 3 |
4 | integer | "MaterialList." string length. Equal to 11. | 13 |
13 | string | "MaterialList." string. | "MaterialList." |
Length | Type | Description | Links |
---|---|---|---|
4 | integer | Materials Count | |
variable | array | Materials Array | see Table 6 |
Materials Array is an array, repeated for the Object materials count. It is as follows:
Section | Links |
---|---|
Header | see Table 7 |
Material properties | see Table 8 |
Materials Array Header is variable in length. It is structured as follows:
Length | Type | Description | Value |
---|---|---|---|
4 | integer | Section size. | |
4 | integer | ID value. | 8 |
4 | integer | "Version." string length. Equal to 8. | 8 |
8 | string | "Version." string. | "Version." |
4 | integer | Version value. | 3 |
4 | integer | Material Name string length. | |
variable | string | Material Name string. |
Length | Type | 3dsMax type | Description | Value |
---|---|---|---|---|
4 | float | integer | Opacity (0-100) | 0..1 |
4 | integer | integer | Faceted | 0 - on, 3 - unset |
Ambient Color Map values | 0..1 | |||
4 | float | integer | Red (0-255) | 0..1 |
4 | float | integer | Green (0-255) | 0..1 |
4 | float | integer | Blue (0-255) | 0..1 |
4 | float | Unknown constant | 1 | |
Diffuse Color Map values | 0..1 | |||
4 | float | integer | Red (0-255) | 0..1 |
4 | float | integer | Green (0-255) | 0..1 |
4 | float | integer | Blue (0-255) | 0..1 |
4 | float | Unknown constant | ||
Specular Color Map values | 0..1 | |||
4 | float | integer | Red (0-255) | 0..1 |
4 | float | integer | Green (0-255) | 0..1 |
4 | float | integer | Blue (0-255) | 0..1 |
4 | float | Unknown constant | 1 | |
4 | float | integer | Specular level | 0..1 |
1 | integer | integer | 2-Side | 0 - off, 1 - on |
Length | Type | Description | Links |
---|---|---|---|
4 | integer | Textures count | |
variable | array | Textures Array List | see Table |
Textures Array is an array, repeated for the Object textures count. It is as follows:
Section | Links |
---|---|
Header | see Table 11 |
Texture properties | see Table 12 |
Textures Array Header is variable in length. It is structured as follows:
Length | Type | Description | Value |
---|---|---|---|
4 | integer | Section size. | |
4 | integer | ID | 38 |
4 | integer | "Version." string length. Equal to 8. | 8 |
8 | string | "Version." string. | "Version." |
4 | integer | Version value. | 2 |
4 | integer | Texture Name string length. | |
variable | string | Texture Name string. |
Length | Type | 3Ds Max type | Description | Value |
---|---|---|---|---|
1 | byte | Unknown const. | 0 | |
4 | integer | Length of the filename string. | ||
variable | string | Texture filename. | ||
4 | integer | integer | Advanced transparency type. | 0 - subtractive, 2 - additive, 3 - filter |
4 | integer | integer | Tiled | 1 - u tiled only, 2 - v tiled only, 3 - none |
4 | float | integer | Self-illumination (0-100) | 0..1 |
№ | Type | Section | Links |
---|---|---|---|
1 | Header | see Table 13 | |
2 | integer | Object Count | |
3 | array | Objects array | see Table 14 |
GeometryList section header is 41 bytes long.
Length | Type | Description | Value |
---|---|---|---|
4 | integer | GeometryList section size. | |
4 | integer | ID | 7 |
4 | integer | "Version." string length. Equal to 8. | 8 |
8 | string | "Version." string. | Version. |
4 | integer | Version value. | 1 |
4 | integer | "GeometryList." string length. Equal to 11. | 11 |
13 | string | "GeometryList." string. | GeometryList. |
Objects array is an array, repeated for the Object count. It contains information about verticies coordinates, texture coordinates, face and texture indexes, normals and texture color map. Object itself it is a group of separated 3d models stored in an array.
Length | Type | Description | Links |
---|---|---|---|
variable | Header | see Table 16 | |
2 | integer | Unknown const | 0 |
4 | integer | Vertex Count | |
variable | array | Vertex array | see Table 17 |
4 | integer | 3D models count | |
variable | array | Models array | see Table 18 |
Length | Type | Description | Value |
---|---|---|---|
4 | integer | Section size. | |
4 | integer | ID. | 4 |
4 | integer | "Version." string length. | 8 |
8 | string | "Version." string. | "Version." |
4 | integer | Version value. | 8 |
4 | integer | Object Name string length. | |
variable | string | Object Name string. |
Vertex array is an array, repeated for the Vertex Count. It contains information about verticies coordinates. It is as follows:
Length | Type | 3ds Max type | Description |
---|---|---|---|
4 | float | float | X coordinate |
4 | float | float | Y coordinate |
4 | float | float | Z coordinate |
Models array is an array, repeated for the 3D models Count. It contains information about texture coordinates, face and texture indexes, normals and color map. It is as follows:
Length | Type | 3ds Max type | Description | Value | Links |
---|---|---|---|---|---|
Properties | |||||
1 | integer | Unknown const | 1 | ||
1 | integer | integer | DetailedDarkmap | 0 - off, 1 - on | |
1 | integer | integer | DetailTexture | 0 - off, 1 - on | |
4 | integer | integer | Index of a material | ||
1 | integer | isTextured | 0 - no, 1 - yes | ||
if isTextured > 0 then there is one more variable | |||||
4 | integer | integer | Index of a texture | ||
if isTextured > 0 and DetailTexture > 0 there is one more variable | |||||
4 | integer | integer | Index of a DetailTexture | ||
MAPs, If value is 4294967295 then it means empty value | |||||
4 | integer | integer | Unknown variable | ||
4 | integer | integer | SelfIlluminationMap Index | ||
4 | integer | integer | SpecularMap Index | ||
4 | integer | integer | BumpMap Index | ||
4 | integer | integer | ReflectionMap Index | ||
4 | integer | MapCount | |||
4 | integer | integer | Faces Count | ||
array | Normals1 | see Table 19 | |||
array | Face indexes | see Table 20 | |||
array | Texture indexes | see Table 21 | |||
4 | integer | integer | Vertex Count | ||
4 | integer | integer | Texture Count | ||
array | Normals2 | see Table 22 | |||
If Texture Count > 0 then there is an array of the Texture coordinates | |||||
array | Texture coordinates | see Table 23 | |||
array | Color map | see Table 24 |
Normals1 array is an array, repeated for the Face Count. It contains information about normals coordinates.
Length | 3ds Max type | Type | Description |
---|---|---|---|
4 | float | float | X coordinate |
4 | float | float | Y coordinate |
4 | float | float | Z coordinate |
4 | float | float | Distance from model origin to face, sign defines direction of normal vector |
Face indexes array is an array, repeated for the Face Count. It contains information about face indexes of a triangle polygon.
Length | 3ds Max type | Type | Description |
---|---|---|---|
2 | integer | integer | First point index |
2 | integer | integer | Second point index |
2 | integer | integer | Third point index |
Texture indexes array is an array, repeated for the Face Count. It contains information about texture indexes of a triangle polygon.
Length | 3ds Max type | Type | Description |
---|---|---|---|
2 | integer | integer | First point index |
2 | integer | integer | Second point index |
2 | integer | integer | Third point index |
??? Normals2 array is an array, repeated for the Vertex Count. It is another array that contains information about normals coordinates.
Length | 3ds Max type | Type | Description |
---|---|---|---|
4 | float | float | X |
4 | float | float | Y |
4 | float | float | Z |
Texture coordinates array is an array, repeated for the (Vertex Count)*(TextureCount). It contains information about Texture coordinates.
Length | 3ds Max type | Type | Description |
---|---|---|---|
4 | float | float | U |
4 | float | float | V |
Color map array is an array, repeated for the Vertex Count. It contains information about color map, which applied on a faces without a texture assigned.
№ | Length | Type | 3Ds Max type | Description | Value |
---|---|---|---|---|---|
1 | 4 | float | integer | Red (0..255) | 0..1 |
2 | 4 | float | integer | Green (0..255) | 0..1 |
3 | 4 | float | integer | Blue (0..255) | 0..1 |
4 | 4 | float | integer | Unknown const | 1 |
The last section contains information about tagging points using by the GRE.
№ | Length | Type | Description |
---|---|---|---|
1 | 4 | float | Points Count |
2 | array | Points Array |
Points Array is an array of the 3ds Max object's transformation matrices, repeated for the Points Count.
№ | Length | Type | Description |
---|---|---|---|
1 | 4 | integer | Point name length |
2 | string | Point name | |
X Axis | |||
1 | 4 | float | X |
2 | 4 | float | y |
3 | 4 | float | z |
Y Axis | |||
1 | 4 | float | X |
2 | 4 | float | y |
3 | 4 | float | z |
Z Axis | |||
1 | 4 | float | X |
2 | 4 | float | y |
3 | 4 | float | z |
Position coordinates (x,y,z) | |||
1 | 4 | float | X |
2 | 4 | float | y |
3 | 4 | float | z |
№ | Name | Description |
---|---|---|
1 | RightHandPoint | Character right wrist point |
2 | LeftHandPoint | Character left wrist point |
3 | MuzzleFlashPoint | Muzzle of the gun point |
4 | BackBlastPoint | Rocket launcher back blast point |
5 | BrassEjectionPoint | Brass fly out point |
5 | HolsterPoint | Gun position on the back of the Character |
EndQOB signature is 13 bytes long.
№ | Length | Description |
---|---|---|
1 | 4 | EndQOB signature length. Equal to 7. |
2 | 7 | EndQOB signature: always equal to 'EndQOB.'. |
All copyrights belong to their respective owners.