Skip to content

Assets and the DAT1 container

Insomniac engineData modelApplies toSunset

Almost every Sunset Overdrive asset is a DAT1 container: a header listing tagged sections, a string block, and the sections’ data. An asset of each type (model, texture, zone, material, …) has its own set of sections, and sections with the same tag share a format. Sourced · ALERT wiki In the archive each asset has a 36-byte wrapper in front of its DAT1. Observed

The census below is over the PC build 3373500 (4,936 zones, 8,780 models, 42,841 textures and the rest); it was recorded and is no longer re-checkable. Observed

Asset wrapper36 bytesSunset100% known

Little-endian. Precedes the DAT1 in the archive.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32type magicObservede.g. 0x6AE15C79 for .model; the same magic names all assets of one extension. ALERT suggests it is a build version of the type rather than the type
0x44u32DAT1 sizeObserveduncompressed size of the DAT1, excluding these 36 bytes
0x84u32payload lengthObservedbytes of payload after the DAT1: the SD pixel bytes for a texture, 0 for zones and models
0xC24u8[24] = 0zeroObservedzero in all 42,841 textures and every zone and model checked

When an asset is compressed it is one raw LZ4 block that covers the DAT1 and its payload together, to be decompressed to DAT1 size + payload length; a stored asset is the DAT1 bytes as they are. Observed Over 42,841 textures the decompressed tail equals the payload length in every case (42,341 compressed, 500 stored); all 4,936 zones are compressed with no tail; all 8,780 models are compressed. Observed An LZ4 decoder’s output equals ALERT’s own decoder byte for byte on two zones. Observed

Tools that decompress to the DAT1 size alone fail on textures with an LZ4 error: the payload is part of the block. Observed

DAT1 headervariableSunset0% known

Little-endian. Offsets are relative to the DAT1 magic.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32 = 0x44415431 (DAT1)magicSourcedALERT wiki
0x44u32typeSourcedrepeats the wrapper's type magic
0x84u32sizeSourcedDAT1 size without the 36 wrapper bytes
0xC2u16section countSourced
0xE2u16unknown countSourcedrarely non-zero
0x1012 × section countsection[]sectionsSourcedu32 tag (CRC32 of the section name), u32 offset, u32 size
next8 × unknown countu8[8][]unknownsSourced

A string block of zero-terminated strings follows the header and ends where the section with the lowest offset starts; sections are aligned to 16 bytes relative to the DAT1 magic. Sourced · ALERT wiki The sections used by each asset type are on the pages for models, textures, zones and collision; the toc’s own are on The toc and the archives. Section tags are CRC32 values of a name, so a section is identified by its tag (283D0383, 06ABCAB2, …), not by a name in the file. Sourced · ALERT wiki

Extension Count Holds Confidence
.level 1 the one level, levels/sunset_city/sunset_city.level Observed
.zone 4,936 the hexagonal tiles of the city and overlays, with their placements (Zones) Observed
.zone_physics 1,112 Havok collision per zone (Havok collision) Observed
.zone_static 419 “Zone Decal Built File”: decals Observed
.model 8,780 geometry (Models) Observed
.texture 52,624 pixels (Textures) Observed
.material, .materialgraph 6,924, 1,012 material template, shader, texture and scalar parameters Sourced · ALERT wiki
.actor, .config, .lightgrid, .wem 2,568, 2,536, 46,816, 265,887 actors, binary JSON-like configs, light grids, Wwise audio Sourced · ALERT wiki

The .wem audio assets have no real filename: their ids are not hashes of a path. Sourced · ALERT wiki Whether asset ids are a hash of the path in Sunset Overdrive (CRC64 in later games, 32-bit here) is not established. Unknown

Is the type magic an asset type or a build version?

All assets of one extension share a magic here, but in later games the magic of an extension changes between updates (ALERT’s .material in Rift Apart), which suggests it is a version of the built data and not a type. Sunset Overdrive has one build, so the two cannot be told apart.

Sources

  • ALERT wiki (DAT1) — the DAT1 header and section table; section tags are CRC32 of a section name
  • ALERT — Python dat1lib; GPL-3