Skip to content

QOB File Format

AlexEA edited this page Jan 28, 2017 · 5 revisions

Unofficial QOB File Format description

Date: 2017.01 | Version: 0.5

Glossary

GR - Ghost Recon,
GRE - Ghost Recon engine
RSB - Red Storm Bitmap

Table of contents

1. Introduction

2. Overview

3. Sections

3.1 File Header

3.2 MaterialList Section

3.3 GeometryList Section

3.3 Points Section

3.4 EndQOB

Introduction

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".

Overview

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.

Notes

QOB files doesn't contain object's animation data.

Overall file structure

The QOB file format is divided into two major sections and two signatures as shown in the QOB file structure.

Table 1. POB 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
Notes

The file header has a fixed length; the other three sections are variable in length.

Sections

File Header

The QOB file header is 15 bytes long.

Table 2. File header structure
Length Type Description Value
4 integer File signature length. 11
11 string File signature: always equal to 'BeginModel.'. "BeginModel."
Notes

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.

MaterialList section

The MaterialList section contains information about object's materials and textures.

Table 3. MaterialList section structure
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

MaterialList section header is 41 bytes long. It is structured as follows:

Table 4. MaterialList header
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."

1.1 Materials subsection

Table 5. Materials subsection structure
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:

Table 6. Materials Array
Section Links
Header see Table 7
Material properties see Table 8

Materials Array Header is variable in length. It is structured as follows:

Table 7. Header
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.
Table 8. Material properties
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

1.2 Textures subsection

Table 9. Textures subsection structure
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:

Table 10. Textures Array
Section Links
Header see Table 11
Texture properties see Table 12

Textures Array Header is variable in length. It is structured as follows:

Table 11. Header
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.
Table 12. Texture properties
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

GeometryList section

Table 13. GeometryList section structure
Type Section Links
1 Header see Table 13
2 integer Object Count
3 array Objects array see Table 14

GeometryList section header

GeometryList section header is 41 bytes long.

Table 14. GeometryList section header
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.

Table 15. Objects array structure
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
Table 16. Header
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:

Table 17. Vertex array structure
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:

Table 18. Models array structure
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.

Table 19. Normals1 array
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.

Table 20. Face indexes array
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.

Table 21. Texture indexes array
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.

Table 22. Normals2 array
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.

Table 23. Texture coordinates array
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.

Table 24. Color map array
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

Points section

Table 2. Points section structure

The last section contains information about tagging points using by the GRE.

Table 25. Points Array
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.

Table 26. Points Array
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
Table 27. Points names
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

EndQOB signature is 13 bytes long.

Table 28.
Length Description
1 4 EndQOB signature length. Equal to 7.
2 7 EndQOB signature: always equal to 'EndQOB.'.

Table of Contents

Clone this wiki locally