SGB is the file format used for Need for Speed: Shift tracks. It containt coordinates for all (?) objects building the track. There is not enough known about XML based version, SGX, to properly convert from SGB to SGX. What this tool does is instead to convert to its own XML format, which it can convert back to sgb.

File Format

The file consists of six sections SGB, OCCL, NODE, FLAT, SUMM and END. Following after the END section is strings referenced from the previous sections.

Section headers

All sections start with a header:

Note that the endiannes of the name is generally the oposite of the values, the SGB section being the exception.

The SGB Section

Consists of just the section head. Number of blocks in section is always 3 (even though there are none).

The OCCL Section

Consists of x blocks

The NODE Section

The node section consists of two kinds of blocks.



The FLAT Section

The FLAT section consists of tho kinds of blocks.

A head block:

A data block:

The SUMM Section

Using the same structure as the node section

The END Section

Just a section header, number of blocks is always 0.

sgbconverter tool

Building sgbconverter

            # git clone
            # cd sgbconverter
            # make

Using sgbconverter

sgbconverter -in=[sgb|xml] <infile> -out=[sgb|xml] <outfile> [-endian=small|big]

Converting from sgb to xml
./sgbconverter -in=sgb alpental.sgb -out=xml alpental.xml

Converting from xml to sgb
./sgbconverter -in=xml alpental.xml -out=sgb alpental.sgb -endian=small



The source code for sgbconverter.

Clone the git repository

git: # git clone

Note: This is a git repository, you need git to use it.

Download using gitweb

Or download the current head sgbconverter-master-*.tar.gz using gitweb.

Uptime: 55 days, 8 hours, 22 minutes