Map Extraction & Virtual Texture Pipeline
Standard image extraction tools fail on large-scale terrain maps because Unreal Engine 5 streams high-resolution terrain using Runtime Virtual Texturing (RVT). Rather than storing a monolithic texture, the engine partitions maps into thousands of compressed blocks stored inside .pak and streaming .ubulk packages.
1. Unreal Engine 5 Runtime Virtual Texturing (RVT) Architecture
To construct the topographical maps for Bakurani, Ozeti, and Zestafona, a custom reverse-engineering extraction pipeline was built. High-resolution terrain textures are not authored as individual flat images; they are stored in virtual texture page caches designed for streaming directly into GPU memory caches.
- Package Format: Unreal Engine streaming
.ubulkfiles. - Raw Streaming Tile Dimensions: 136 × 136 pixels.
- Filtering Border Padding: 4-pixel border on all four edges for bilinear interpolation.
- Net Payload per Tile: 128 × 128 active terrain pixels.
- Full Master Canvas: 64 × 64 tile grid = 4,096 total tiles → 8,192 × 8,192 pixel master canvas.
2. Morton Z-Order Space-Filling Curve & DXT1/BC1 Decompression
Tiles inside the .ubulk stream are not ordered row-by-row. They are sequenced along a Morton Z-order space-filling curve to maximize spatial 2D GPU cache locality. The pipeline reconstructs coordinates via bit interleaving:
function morton2D_decode(d) {
let x = 0, y = 0;
for (let b = 0; b < 16; b++) {
x |= ((d >> (2 * b)) & 1) << b;
y |= ((d >> (2 * b + 1)) & 1) << b;
}
return { x, y };
}Each tile payload is compressed in DXT1 (BC1) format. The extraction engine decodes the 16-color 4x4 blocks, strips the 4-pixel border overlap, and stitches the decoded RGB buffers into a continuous master PNG image.
3. High-Performance Deep-Zoom Tile Pyramid Slicing
Serving an uncompressed 8192×8192 RGBA canvas (256 MB in raw memory) directly to mobile web browsers causes tab memory crashes. To enable instant, fluid map navigation, the reconstructed master canvas is sliced into a multi-resolution WebP quadtree:
| Zoom Level | Grid Size | Tile Count | Equivalent Resolution |
|---|---|---|---|
| Zoom 0 | 1 × 1 | 1 tile | 256 × 256 px |
| Zoom 1 | 2 × 2 | 4 tiles | 512 × 512 px |
| Zoom 2 | 4 × 4 | 16 tiles | 1024 × 1024 px |
| Zoom 3 | 8 × 8 | 64 tiles | 2048 × 2048 px |
| Zoom 4 | 16 × 16 | 256 tiles | 4096 × 4096 px |
| Zoom 5 | 32 × 32 | 1,024 tiles | 8192 × 8192 px (Native Full Resolution) |
Tiles are formatted in lightweight WebP with 85% compression quality, achieving an average tile weight of approximately 18 KB. This enables sub-50ms panning and zooming response even under constrained 4G mobile conditions.
4. Elevation Heightmap Mesh & Sub-Pixel Bilinear Sampling
From the game's height virtual textures, single-channel 8-bit grayscale elevation matrices downsampled to 1024×1024 were extracted. Each pixel value V∈[0,255] maps linearly to world vertical bounds:
During live map interaction, the artillery fire-control solver runs bilinear sub-pixel interpolation across the four surrounding texels, yielding elevation sampling accurate to within ±0.2 meters anywhere on the battlefield.
Explore full-resolution maps with real-time elevation sampling
Pan, zoom, and calculate firing arcs across Bakurani, Ozeti, and Zestafona in the interactive artillery solver.