level_viewer is a Rust + Bevy desktop tool for exploring and inspecting assets from American McGee's Scrapland.
It can discover game archives, browse packed content, load level/model data, visualize geometry and materials, inspect nodes/collision data, and export reconstructed data for external tools such as Blender.
- Loads Scrapland
.packedarchives and exposes them through an in-app browser. - Parses core Scrapland formats (
SM3,CM3,DUM,AMC,EMI). - Renders level geometry, materials, lightmaps, and animated textures.
- Provides in-app debug UI (inspector windows, post-processing controls, node visualization, collision toggles).
- Includes
dump.zipexporter and ablender_import.pyhelper pipeline.
- Rust toolchain (stable; edition
2024is used by this crate). - A local Scrapland installation containing
data*.packedfiles. - GPU/driver support suitable for Bevy 0.18 desktop rendering.
Optional (Blender workflow):
- Blender with Python support.
- Python dependencies listed in
pyproject.tomlif you run the helper outside Blender's embedded environment.
cargo build --releaseThe app resolves the game install path in this order:
SCRAPLAND_DIRenvironment variable.- Steam autodetection (
App ID 897610). - Manual folder picker dialog.
Example (PowerShell):
$env:SCRAPLAND_DIR = "C:\Games\Steam\steamapps\common\Scrapland"cargo run --releaseYou can optionally pass an initial packed-path argument (file or level directory), for example:
cargo run --release -- Levels/OutskirtsW: forward throttleS: reverseA/D: strafe- Mouse move: yaw + pitch
- Right mouse: boost
Shift: turn boost
F1: show/hide UIF2: enable/disable lightmapsF3: enable/disable wireframeF4: show/hide node gizmosEsc: quit
Numpad +/Numpad -: increase/decrease lightmap exposureNumpad */Numpad /: scale lightmap exposureNumpad 1/Numpad 2: adjust depth-of-field aperture
Use the in-app Export window (Export! button) after loading a level.
The exporter writes dump.zip in the current working directory and includes:
obj/: per-object mesh buffers and metadatamat/: material JSONtex/: regular textures (PNG)lightmaps/: lightmap textures (PNG)
blender_import.py demonstrates importing dump.zip into Blender and recreating meshes/material assignments.
Current script behavior:
- Resets Blender scene to factory-empty at startup.
- Reads
dump.zipand reconstructs meshes, UVs, and basic material data. - Expects the zip path to be set in the script (
zip_path = ...).
Typical usage:
- Export from
level_viewerto producedump.zip. - Edit
zip_pathinblender_import.py. - Run script in Blender's scripting workspace.
Fast validation:
cargo fmt --all
cargo checkLinting:
cargo clippy --all-targets --all-featuresTests:
cargo testShader parser test requires SHADER_FILE:
$env:SHADER_FILE='C:\path\to\shader.psh'; cargo test pixel_shader::test::test -- --nocapturesrc/main.rs: app setup, Bevy systems, runtime UI, scene loading/rendering.src/parser.rs: binary structs/parsers for Scrapland file formats.src/asset_loader.rs: integration between packed assets and Bevy asset source.src/materials.rs: custom material/shader behavior.src/export.rs:dump.zipexport pipeline.src/pixel_shader.rs: pixel shader parsing experiments/tests.blender_import.py: Blender-side import helper for exported data.
- Some parser and shader paths are still experimental.
- Blender helper script is functional but not a polished add-on.
- Animation tooling and full shader parity are still in progress.
MIT. See LICENSE.
