Skip to content

Battleroid/texture-codex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Texture Codex

CI

A desktop tool to browse, preview, and export textures from Bungie's Marathon (2025) — a sibling to audio-codex, in the spirit of MIDA, Deimos, and DestinyTexConv.

Download

Grab the latest self-contained win-x64 build — no .NET install needed:

  • Latest release — stable, zipped build.
  • Latest CI build — newest commit; open the most recent run and download the texture-codex-win-x64 artifact.

Unzip and run TextureCodex.App.exe. You still need a local Marathon install (the app uses the game's own oo2core_9_win64.dll to decompress packages; nothing from the game is redistributed).

It reads the game's Tiger Engine .pkg packages directly (AES‑128‑GCM decryption + Oodle/Kraken decompression), finds every texture, decodes the BCn / uncompressed pixel data, and lets you view it, zoom, toggle transparency, and export to PNG (or DDS) — individually or in bulk.

Texture Codex

Features

  • Browse ~12,800 textures across all packages in an even, tiled square grid.
  • Group by Category or Package (sr_gear, investment_assets, ui_pvp, t4_marsh, …) and search by tag id, package, or category.
  • Preview panel with full‑resolution decode and metadata: format, dimensions, size, array size, source (inline / buffer), and source package.
  • Open in a tab (double‑click or middle‑click, or Open full view) — zoom (wheel, Fit, 100%), pan (drag), toggle transparency, and switch the backdrop between a checkerboard or a solid colour to inspect the alpha channel.
  • Group by asset (toggle) — combine a material's textures (colour + normal + data + colour variants) into one grid unit with a count badge and a clickable member strip. Derived by resolving each material's texture references (including cross‑package tag64 refs via the package hash64 table) and unioning the same‑package textures. Computed once and cached.
  • One‑click export of a texture to the default download folder, plus bulk export of the selected textures, the current filtered list, or everything (namespaced by category).
  • Formats: BC1/BC2/BC3/BC4/BC5/BC7, BC6H (HDR, tonemapped), R8G8B8A8, B8G8R8A8, R8, R8G8, and R16G16 / R16G16B16A16 float. ~99% of the catalogue decodes; the rest show a placeholder.

Requirements

  • Windows x64 and a .NET 8 runtime (winget install Microsoft.DotNet.DesktopRuntime.8), or use a self‑contained build (below).
  • A local Marathon install — the tool uses the game's own bin\x64\oo2core_9_win64.dll (Oodle) to decompress packages. Nothing is redistributed.

Running

Run.bat            # launches the Release build

or from source:

dotnet run --project src/App/TextureCodex.App.csproj -c Release

On first launch the game folder is auto‑detected at A:\Steam\steamapps\common\Marathon. If yours is elsewhere, open Settings → Browse… and pick the Marathon install folder (the one containing packages\ and bin\). The catalogue indexes automatically; thumbnails decode lazily as you scroll and are cached on disk.

Setup / packaging

This tool is C#/.NET 8 + Avalonia — the same stack as audio‑codex.

  • Fresh machine, from source: powershell -ExecutionPolicy Bypass -File scripts\setup.ps1 installs the .NET 8 SDK (via winget) if missing and builds.
  • Standalone, no .NET install needed: powershell -ExecutionPolicy Bypass -File scripts\publish.ps1 produces a self‑contained build in publish\ — zip that folder and it runs on any Windows x64 machine (the user still needs a Marathon install for the Oodle DLL).

How it works

.pkg (Tiger Engine packages, header v53)
  ↓ TigerPackage  — AES-128-GCM block decrypt + Oodle (oo2core_9) decompress
texture header tag (type 32/1, 32/2, 32/3; 0xCAFE magic @0x20)
  ↓ TigerTexture.ParseHeader — DXGI format @0x04, w @0x22, h @0x24, array @0x28
  ↓ pixel buffer = large-texture hash @0x3C  (high-res mips, if present)
                 else entry.Reference        (inline data buffer, most UI textures)
  ↓ TigerTexture.DecodeRgba — BCn (BCnEncoder.Net) / uncompressed → RGBA8
Avalonia bitmap → grid thumbnail · preview · zoom/pan tab · PNG/DDS export

The package reader (src/Tiger/TigerPackage.cs, Oodle.cs) is ported verbatim from audio‑codex; the texture decode layer (TigerTexture.cs, TextureManager.cs) is new. The texture entry types and header offsets were reverse‑engineered against the retail packages — see src/Probe for the discovery harness (hist, tex, decode, stats, dump commands).

Fonts

The in‑game typefaces (PP Fraktion Mono, MarathonShapiro Wide 65) are extracted from Marathon and not redistributed; they're git‑ignored. The app falls back to a system font if they're absent. To restore the in‑game look, drop the .otf files into src/App/Assets/Fonts/.

About

Tool to extract texture assets from Marathon (2025)

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors