Skip to content

QOB File Format

AlexEA edited this page Jan 11, 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's 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

Despite they are similar, there is a difference between POB and QOB file types. QOB files doesn't support object tagging and animation.

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 Geometry objects 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

Table 4. MaterialList section structure
Section Description
1 Header
2 Materials subsection Object materials
3 Textures subsection Object textures

MaterialList section header

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

Table 3. MaterialList section structure
Length Type Description Value
4 integer MaterialList section size. variable
4 integer Unknown value. 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 4. Materials subsection structure
Length Type Description
4 integer Materials Count
variable array Materials Array

Materials Array is an array, repeated for the Object materials count. It is as follows:

Table 5. Materials Array
Section
Header
Material properties

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

Table 6. Header
Length Type Description Value
4 integer Section size.
4 integer Unknown 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.

Material properties subsection contains information about material from 3Ds Max.

Table 7. Material properties
Length Type Description Value
4 float Opacity 0..1
4 float Faceted 0 - on, 3 - unset
Ambient Color Map 0..1
4 float Red 0..1
4 float Green 0..1
4 float Blue 0..1
4 integer Unknown Value 1
Diffuse Color Map 0..1
4 float Red 0..1
4 float Green 0..1
4 float Blue 0..1
4 integer Unknown Value 1
Specular Color Map 0..1
4 float Red 0..1
4 float Green 0..1
4 float Blue 0..1
4 MN Unknown Value 1
4 integer Specular level
1 byte 2-Side 0, 1 - on

1.2 Textures subsection

Table 8. Textures subsection structure
Length Type Description
4 integer Textures count
variable array Textures Array List

Textures Array is a array, repeated for the Object textures count. It is as follows:

Table 9. Textures Array
Size Section
Header
12 Texture properties

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

Table 10. Header
Length Type Description Value
4 integer Section size.
4 integer Unknown value. 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.

Textures properties subsection contains information about texture from 3Ds Max.

Table 11. Texture properties
Length Type Description
1 byte Unknown value. 0
Texture filename
4 integer Length of the filename string.
variable string Texture filename.
4 integer Advanced transparency type. 0 - subtractive, 2 - additive, 3 - filter
4 integer Tiled 1 - u tiled only, 2 - v tiled only, 3 - none
4 float Self-illumination 0..1

GeometryList section

Table 12. GeometryList section structure
Section Description
1 Header
1 Object Count
2 Geometry data array

GeometryList section header

GeometryList section header is 41 bytes long.

Table 13. GeometryList section header
Length Type Description Value
4 integer GeometryList section size.
4 integer Unknown value. 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.

Object array is an array, repeated for the Object count. It contains information about verticies coordinates, texture coordinates, face and texture indexes, normals and color map. Object itself it is a group of separate objects stored in an array.

It is as follows:

Table 15. Object array structure
Length Type Description
variable Header
4 integer Unknown value
Object verticies
4 integer Vertex Count
variable array Vertex array
Coordinates, normals, indexes, color map data
4 integer Objects Count
variable array Objects data array
Table 16. Header
Length Type Description Value
4 integer Section size.
4 integer Unknown value. 4
4 integer "Version." string length. Equal to 8. 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
Length Type Description
4 float X coordinate
4 float Y coordinate
4 float Z coordinate

Objects data array is an array, repeated for the Objects Count. It contains information about texture coordinates, face and texture indexes, normals and color map.

It is as follows:

Table 18. Objects data array
Length Type Description Value
Properties
1 byte Unknown variable 1
1 byte DetailedDarkmap 0, 1
1 byte DetailTexture 0, 1
4 integer MaterialIndex
1 byte isTextured 0, 1
if isTextured > 0 one more vars
4 integer TextureIndex
if (DetailTexture > 0) two more vars
4 integer DetailTextureIndex
4 integer Unknown variable 1
** MAP**
4 integer SelfIlluminationMap Index
4 integer SpecularMap Index
4 integer BumpMap Index
4 integer ReflectionMap Index
4 integer MapCount
4 integer Face Count
array Normals1
array Face indexes
array Texture indexes
4 integer Vertex Count
4 integer Texture Count
array Normals2
If TextureCount > 0 adding Texture coordinates
array Texture coordinates
array Color map

Normals1 array is an array, repeated for the Face Count. It contains information about normals coordinates.

Table 18. Normals1 array
Length Type Description
4 float X
4 float Y
4 float Z
4 float Distance from object 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 18. Face indexes array
Length Type Description
2 integer First point index
2 integer Second point index
2 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 18. Texture indexes array
Length Type Description
2 integer First point index
2 integer Second point index
2 integer Third point index

??? Normals2 array is an array, repeated for the Vertex Count. It contains information about normals coordinates.

Table 18. Normals2 array
Length Type Description
4 float X
4 float Y
4 float Z

Texture coordinates array is an array, repeated for the (Vertex Count)*(TextureCount). It contains information about Texture coordinates.

Table 18. Texture coordinates array
Length Type Description
4 float U
4 float V

Color map array is an array, repeated for the Vertex Count. It contains information about faces (without a texture) color map.

Table 18. Color map array
Length Type Description
4 float Red
4 float Green
4 float Blue
4 float Unknown variable

Points section

Table 19. Points section structure

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

Length Type Description
4 float Points Count
array Points Array

Transformation matrix is the same one from 3ds Max. Points Array is an array, repeated for the Points Count.

Table 20. Transformation matrix
Length Type Description
X Axis
4 float X
4 float y
4 float z
Y Axis
4 float X
4 float y
4 float z
Z Axis
4 float X
4 float y
4 float z
Position
4 float X
4 float y
4 float z

EndQOB

EndQOB signature is 13 bytes long.

Length Description
4 EndQOB signature length. Equal to 9.
9 EndQOB signature: always equal to 'EndQOB.'.

Table of Contents

Clone this wiki locally