I have been a long-time fan of the Myst game series. Their fascinating worlds and convoluted lore has always captured my imagination.
Most of the games of the series were 360° panoramic point-&-click, but two of them, Uru and Myst V, made the shift to full real-time 3D. They were running on Cyan in-house game engine, Plasma. An online multiplayer version of Uru was also released, but struggled to meet success. It was rebooted multiple times over the years until Cyan, suffering from financial difficulties, decided to open source it in 2011. While the assets remained the property of the company, all the engine, server and client code was released. The Uru Live community took it from there, adding functionnalities, support for custom levels and servers, and cleaning the code.
I thought it would be an interesting exercise to write an assets viewer for Uru Live, to be able to visualize and explore the game in details. Each level, called an Age in the game lore, is stored on disk as a bunch of files:
.agefile containing basic information about the level (time/duration of day, name of the files containing the assets and scripts,...)
.prpfiles, that contain assets, such as textures, 3D models, animations, scripts,...
There already exists a few utilities in the Plasma codebase to extract data from these files, as a
.xml text file representing a complete level or a
.obj 3D mesh of the full scene. But these tools lack visualisation and support of some Plasma features.
My goal is thus to create a viewer where you could load an Age and look at the 3D models, properly textured and lit. I'll try to document this adventure through this blog. This will be an opportunity to post shorter texts, more often, but still with interesting images.
First step, setting up the project. I will work in C++ and OpenGL for the code and graphics. Some people extracted the networking and assets handling parts of the Plasma engine in a multi-platform library, libHSPlasma. Instead of using the whole engine, I am relying on this library to load ages and extract information from the
.prp files. I set up a Cmake project with an external dependency to the library, stored in a git submodule, because I am also fixing some small bugs present in libHSPlasma. I've started familiarising with the library code for loading assets. Each Age is represented as a scene, with a hierarchical structure containing objects, drawable data, textures, animations. I am now able to log to the console informations about each object, which material and textures they are using,...
The next goal will be to manage extracting data from the
.prp files: 3D meshes and textures, integrate them in my rendering framework, and prepare the data for rendering. From there, displaying them on screen in a basic fashion should be reachable.
Finally, let me introduce the scene I will use as a test: this is
spyroom (above), as it looks in the game. The scene is quite simple. There is a second room (below), only visible through the orange periscope, that must be somewhere else in the level. This will be helpful to check that we load and render everything properly.