OBD:Raw and separate file formats

From OniGalore
Revision as of 18:54, 16 July 2014 by Iritscen (talk | contribs) (Iritscen moved page OBD:Final.raw to OBD:Raw and separate file formats without leaving a redirect: Clearer name, consistent with "OBD:Instance file format".)
Jump to navigation Jump to search

Unless mentioned otherwise, this is about the PC retail .raw files.

When mentioned otherwise, this can be about the .sep files as well.

Chunk offsets

This applies for .sep files as well

Alignment

Although this may not be strictly required by the engine, the offsets of all original chunks start at 32-byte multiples.
This implies a slight loss of space, but the storage is somewhat tidier that way. Easier to manipulate in hex editors ^^
OUP will probably continue to store data that way. Storing things the way Bungie did is a way to avoid surprises.

Null offset

At the start of the .raw or .sep file, there are 32-bytes of garbage
That way, all meaningful raw/sep chunks start at offsets strictly greater than 0.
If that wasn't the case, the null value of a raw/sep link would be ambiguous.



Differences across versions

Different content

Language versions

In this case the main difference in the .raw is due to the SNDD files (and SUBT for level0).

Extra level0 textures

The level0_Final.raw of older versions stores a few megabytes worth of "obsolete" textures.

Texture compression

Depending on the version, the amount of textures stored in a lossy compressed format can be "most" to "almost none".

This leads to dramatic variations in size for the .raw (over 10% of the total amount of game content).



Gaps

The original .raw are not packed as a compact sequence of 32-byte-aligned chunks.

There are gaps of various sizes in every level, totalling up 25 megabytes for the whole game.

Interestingly, those gaps seem to be the same across version, even if other content differs.

The content of those gaps is detailed below.

Skybox mipmaps

Those gaps occur in every level after each of the 5 skybox textures. They're filled with zeroes.

Their size matches that required to store MIP map generations of the preceding TXMP chunk.

Orphaned chunks

Those seem to be mostly .raw parts of existing resources, orphaned at some point by the appending of a new version to the .raw.

The pointer in the .dat got redirected to the new version, and the old version was lost.

So, either duplicates of existing resources, or obsolete versions reflecting development.

OSBD

A few of those in level 0. Reauthored duplicates of existing OSAm/OSGr pairs: for every pair, there are (minor) changes either in the OSAm or in the OSGr

SNDD

Those make the most of the gap space. Some of the sounds were actually reauthored (higher sample rates, shorter durations...)

Most of them, however, are duplicates, apparently due to a bug in Bungie's packing system.
Adding an overview later...