MphRead
MphRead copied to clipboard
MPH model reader and viewer
MphRead
This project is a reverse engineering and game recreation effort comprising a model viewer, scene renderer, and general parser for file formats used in the Nintendo DS game Metroid Prime Hunters. The renderer is implemented using OpenGL via the OpenTK library with audio through OpenAL Soft. Documentation of various game features can be found in the wiki.
Features
- Renders individual models or complete game rooms with entities
- Recreates the player controls and gameplay of the original
- Processes and renders particle systems and effects
- Visualizes collision data for rooms and entities
- Plays in-engine camera sequences (cutscenes)
- Exports models to COLLADA, textures to PNG, and sound effects to WAV
- Generates Python scripts to import model animations and more into Blender
Planned
- Music playback
- Room editor and save editor
- Render more things, implement more gameplay logic
- And even more!
Usage
After setup, MphRead can be launched from the executable with no arguments, and menu prompts will appear to help you set up the scene.
See the full setup and export guide for details on setup and command line options.
Building
If you do not want to build from source, simply download and run the latest release.
With Visual Studio
With a recent version of Visual Studio 2022 installed, you should be able to open the solution and build immediately.
Without Visual Studio
- Install the .NET 6.0 SDK.
- Run
dotnet buildin thesrc/MphReaddirectory.
Acknowledgements
A significant portion of this project's code was based on the file format information or source code from several other projects.
- dsgraph - The original MPH model viewer, on which all other projects are built.
- Chemical's model format - Documentation of the model format.
- McKay42's mph-model-viewer - COLLADA export method.
- McKay42's mph-arc-extractor - ARC file format information.
- Barubary's dsdecmp - LZ10 compression routines.
- loveemu's swav2wav - SWAV conversion function.
Special Thanks
This project's reverse engineering effort was developed parallel to hackyourlife's mph-viewer, a model viewer implementation in C. Major features such as the transparency rendering implementation were derived from its source code.