File size: 10,725 Bytes
eb1f0fb f78e071 eb1f0fb f78e071 b2cc97e f78e071 b2cc97e f78e071 b2cc97e f78e071 b2cc97e f78e071 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | ---
license: apache-2.0
task_categories:
- video-to-video
- image-to-video
language:
- en
tags:
- video
- video-generation
- game-rendering
- white-box-rendering
- interactive-games
- unreal-engine
- magpie
pretty_name: Magpie Dataset Lite
size_categories:
- n<1K
---
# Magpie Dataset Lite
**Paper:** [Magpie: Real-Time World Renderer for Interactive Games](https://arxiv.org/abs/2608.27168)
**Project Page:** [https://zhanxy.xyz/Magpie-website](https://zhanxy.xyz/Magpie-website)
**Magpie Dataset Lite** is a publicly released subset of the Magpie interactive game rendering dataset ([arXiv:2608.27168](https://arxiv.org/abs/2608.27168)). Magpie is a real-time generative world-rendering system that separates gameplay execution in a game engine from visual synthesis in a render server. This lite release provides **561 gameplay trajectories** with a combined **`render.mp4` duration of 105 hours**, covering **20 scenes**.
Each sample includes time-synchronized **high-fidelity render** and **white-box** video streams, together with structured interaction metadata recorded during capture.
## Dataset Summary
| Item | Value |
|------|-------|
| Paper | [arXiv:2608.27168](https://arxiv.org/abs/2608.27168) |
| Project page | [Magpie Website](https://zhanxy.xyz/Magpie-website) |
| Relation to full Magpie dataset | Partial release (lite subset) |
| Number of trajectories | 561 |
| Total duration (`render.mp4`) | **105 hours** |
| Number of scenes | 20 |
| Video streams per sample | 2 (`render.mp4`, `white_box.mp4`) |
| Metadata per sample | 1 JSON file |
| Capture setting | Unreal Engine, human-operated gameplay |
| Original per-stream resolution | 1920 × 1080 |
| Original frame rate | 60 FPS |
## What Is Magpie?
Magpie learns to convert engine-produced **white-box observations** into **photorealistic or stylized renderings** while gameplay rules and state remain in the game engine. During data collection, operators play controllable Unreal Engine scenes naturally—exploring, interacting, changing viewpoint, idling, and transitioning between behaviors—rather than executing isolated scripted actions.
Each trajectory therefore provides paired supervision for **structure-to-appearance** video generation:
- **`render.mp4`**: high-fidelity target stream
- **`white_box.mp4`**: synchronized white-box stream preserving layout, geometry, occlusion, and principal motion while omitting final textures, materials, and complex lighting
For more details, see the [Magpie project page](https://zhanxy.xyz/Magpie-website) and the paper: [Magpie: Real-Time World Renderer for Interactive Games](https://arxiv.org/abs/2608.27168).
## Directory Structure
Each trajectory is stored under `sceneXX/playerYY/`:
```text
magpie_lite_dataset/
├── scene00/
│ ├── echo/
│ │ ├── render.mp4
│ │ ├── white_box.mp4
│ │ └── scene00_echo.json
│ ├── player1/
│ │ ├── render.mp4
│ │ ├── white_box.mp4
│ │ └── scene00_player1.json
│ └── ...
├── scene03/
├── scene04/
│ ├── player9_part1/
│ ├── player9_part2/
│ └── ...
└── scene28/
```
### Naming conventions
- **Scene folders** use numeric IDs only, e.g. `scene00`, `scene16`, `scene28`.
- **Player folders** identify the operator/session, e.g. `echo`, `kellan`, `player1`, `player15`.
- Some source captures contain multiple nested takes for the same logical player. Those are exported as separate trajectories with suffixes such as `player9_part1` and `player9_part2`.
- **Metadata files** are named `{scene}_{player}.json`, e.g. `scene00_echo.json`.
## File Descriptions
### `render.mp4`
High-fidelity gameplay video. It provides the visual target stream used for training and evaluation of generative rendering.
### `white_box.mp4`
Synchronized white-box gameplay video from the **same timestamp and viewpoint** as `render.mp4`. It preserves scene layout, collision-relevant structure, principal silhouettes, and visible state changes while removing final appearance details.
Both videos in a sample are frame-aligned and should be consumed as a pair.
### `{scene}_{player}.json`
Structured interaction metadata copied from the original capture session. It is time-aligned with the paired videos and contains:
- **`uuid`**: unique identifier for the capture session
- **`key_events`**: keyboard input events
- **`ue_events`**: Unreal Engine camera / viewpoint records
#### `timestamp` field
Each entry in `key_events` and `ue_events` includes a **`timestamp`** field: an integer counting **milliseconds elapsed since the start of the recording session** (`t = 0` at session start). Events are ordered by `timestamp`, but they may be sampled at irregular intervals rather than once per video frame.
To align metadata with the paired videos at **60 FPS**:
```text
frame_index = floor(timestamp_ms * 60 / 1000)
timestamp_ms = frame_index * 1000 / 60
```
- **`key_events`**: each entry has `timestamp`, `key` (keyboard key name), and `pressed` (`true` = key down, `false` = key up). At a given frame time, apply all events with `timestamp <= t_ms` to obtain the currently held keys.
- **`ue_events`**: each entry has `timestamp`, camera pose (`loc_x`, `loc_y`, `loc_z`, `rot_p`, `rot_y`, `rot_r`), `fov`, and capture resolution (`res_x`, `res_y`). For times between two consecutive records, linearly interpolate numeric fields by `timestamp`.
## Scenes Included in Lite
This release includes the following 20 scenes:
`scene00`, `scene03`, `scene04`, `scene06`, `scene08`, `scene09`, `scene11`, `scene12`, `scene13`, `scene14`, `scene16`, `scene17`, `scene19`, `scene20`, `scene21`, `scene24`, `scene25`, `scene26`, `scene27`, `scene28`
### Approximate duration by scene (`render.mp4`)
| Scene | Duration |
|-------|----------|
| scene00 | 10:12:18 |
| scene03 | 4:59:01 |
| scene04 | 12:38:41 |
| scene06 | 6:36:53 |
| scene08 | 5:07:10 |
| scene09 | 2:11:44 |
| scene11 | 5:44:45 |
| scene12 | 5:37:31 |
| scene13 | 4:50:18 |
| scene14 | 3:35:42 |
| scene16 | 3:58:13 |
| scene17 | 5:23:38 |
| scene19 | 1:42:07 |
| scene20 | 2:10:13 |
| scene21 | 3:50:49 |
| scene24 | 3:15:35 |
| scene25 | 4:05:23 |
| scene26 | 9:38:41 |
| scene27 | 4:55:55 |
| scene28 | 4:26:03 |
| **Total** | **105:00:38** |
## Intended Uses
This dataset is intended for research on:
- white-box-conditioned video generation
- game / interactive world rendering
- structure-to-appearance synthesis
- long-horizon human gameplay video modeling
- multimodal analysis of synchronized render + control metadata
## Usage Example
```python
from pathlib import Path
import json
root = Path("magpie_lite_dataset")
sample = root / "scene00" / "echo"
render = sample / "render.mp4"
white_box = sample / "white_box.mp4"
meta = sample / "scene00_echo.json"
with meta.open("r", encoding="utf-8") as f:
events = json.load(f)
print(render.exists(), white_box.exists())
print("key events:", len(events.get("key_events", [])))
print("camera events:", len(events.get("ue_events", [])))
```
### Map events to frames at a target FPS (e.g. 24)
`timestamp` is in milliseconds from session start. To obtain per-frame keyboard state and camera pose at an arbitrary frame rate:
```python
from pathlib import Path
import json
import math
CAMERA_FIELDS = ["loc_x", "loc_y", "loc_z", "rot_p", "rot_y", "rot_r", "fov"]
def interpolate_camera(ue_events, t_ms, idx_hint=0):
"""Linearly interpolate camera pose at time t_ms (milliseconds)."""
n = len(ue_events)
while idx_hint + 1 < n and ue_events[idx_hint + 1]["timestamp"] <= t_ms:
idx_hint += 1
if t_ms <= ue_events[0]["timestamp"]:
return {k: float(ue_events[0][k]) for k in CAMERA_FIELDS}, 0
if t_ms >= ue_events[-1]["timestamp"]:
return {k: float(ue_events[-1][k]) for k in CAMERA_FIELDS}, n - 1
i0, i1 = idx_hint, min(idx_hint + 1, n - 1)
t0 = float(ue_events[i0]["timestamp"])
t1 = float(ue_events[i1]["timestamp"])
alpha = 0.0 if t1 == t0 else (t_ms - t0) / (t1 - t0)
cam = {
k: float(ue_events[i0][k]) + alpha * (float(ue_events[i1][k]) - float(ue_events[i0][k]))
for k in CAMERA_FIELDS
}
return cam, i0
def map_events_to_frames(events, fps=24.0, num_frames=None):
"""
Map key_events / ue_events onto a regular frame grid.
Returns a list of dicts:
{frame_idx, timestamp_ms, pressed_keys, camera}
"""
key_events = sorted(events["key_events"], key=lambda e: e["timestamp"])
ue_events = sorted(events["ue_events"], key=lambda e: e["timestamp"])
if num_frames is None:
end_ms = max(
key_events[-1]["timestamp"] if key_events else 0,
ue_events[-1]["timestamp"] if ue_events else 0,
)
num_frames = int(math.floor(end_ms * fps / 1000.0)) + 1
frames = []
key_idx = 0
ue_idx = 0
active_keys = set()
for frame_idx in range(num_frames):
t_ms = int(round(frame_idx * 1000.0 / fps))
while key_idx < len(key_events) and key_events[key_idx]["timestamp"] <= t_ms:
ev = key_events[key_idx]
if ev["pressed"]:
active_keys.add(ev["key"])
else:
active_keys.discard(ev["key"])
key_idx += 1
camera, ue_idx = interpolate_camera(ue_events, t_ms, ue_idx)
frames.append(
{
"frame_idx": frame_idx,
"timestamp_ms": t_ms,
"pressed_keys": sorted(active_keys),
"camera": camera,
}
)
return frames
meta = Path("magpie_lite_dataset/scene00/echo/scene00_echo.json")
with meta.open("r", encoding="utf-8") as f:
events = json.load(f)
# Example: resample control + camera to 24 FPS
frames_24 = map_events_to_frames(events, fps=24.0)
print(frames_24[0])
# {'frame_idx': 0, 'timestamp_ms': 0, 'pressed_keys': [...], 'camera': {...}}
# Frame index <-> timestamp helpers
fps = 24.0
frame_idx = int(math.floor(12345 * fps / 1000.0)) # timestamp_ms -> frame
t_ms = int(round(frame_idx * 1000.0 / fps)) # frame -> timestamp_ms
```
## Citation
If you use this dataset, please cite the Magpie paper:
```bibtex
@article{zhan2026magpie,
title={Magpie: Real-Time World Renderer for Interactive Games},
author={Zhan, Xiaoyu and Wang, Xinyu and Zhang, Xiaohong and Zhu, Huanjie and Sun, Tengjiao and Fang, Pengcheng and Yu, Jiaxing and Guo, Yanwen and Fu, Dongjie},
journal={arXiv preprint arXiv:2608.27168},
year={2026},
url={https://arxiv.org/abs/2608.27168}
}
```
## License
This dataset is released under the **Apache License 2.0**.
|