2 Reverse Engineering - Textures
Lucas Schwiderski edited this page 2025-02-21 11:02:11 +00:00

General

There seem to be two ways that a texture can be stored in a bundle "data file" vs "stream file".

  • "data file":
    • points to a file in data/ without .stream extension
    • size of the file in data/ can range from 200 bytes to several MB -> no apparent correlation
    • external == true, no data in bundle
  • "stream file":
    • points to a .stream file in data/
    • data file size can range from 90 bytes to several MB
    • always contains data in the bundle file, size ranging from 200 bytes to several KB

In the case of stream files, the bundle will contain metadata (e.g. DDS headers) and a small mipmap, while the data file will contain the other mipmaps.

Other things of note:

  • BundleFileHeader.unknown_1 is always 1
  • textures can be duplicated across bundles

Formats

Formats observed so far:

FourCC DXGI
DX10 BC5_UNORM

Decompiling

As an initial implementation, decompilation only extracts the largest (i.e. first) mipmap from streamed content.