Skip to content

Instantly share code, notes, and snippets.

@bgK
Last active October 20, 2025 12:08
Show Gist options
  • Select an option

  • Save bgK/4889543f687a2dfc21992ea0c1615bac to your computer and use it in GitHub Desktop.

Select an option

Save bgK/4889543f687a2dfc21992ea0c1615bac to your computer and use it in GitHub Desktop.
Myst III HD modding guide

Introduction

ResidualVM is gaining the ability to create mods for Myst III. It is possible to replace the original game assets with hi-resolution versions. This combined with the emergence of machine learning image upscaling tools enables the creation of a hi-resolution mod for Myst III.

I am releasing here a version of ResidualVM usable to create and play such a mod. However, graphics processing is not my forte. I need help from the community to figure out how to upscale the original assets to produce the best visuals and to put together a mod.

A HD mod has already been successfully completed for The Longuest Journey, another game supported by ResidualVM: https://tljhd.github.io/. Hopefully the the same feat can be replicated with the same quality for Myst III.

Example mod

I am providing here a proof of concept mod I've used to test the programming changes. This example mod is not meant to be pretty, nor to be used by regular players. It is not representative of the visual quality the final mod might have. It contains an upscaled version of most of the exterior of the J'nanin age and the English journals. It is meant to be used with the DVD version of the game.

Screenshots:

Downloads:

To try the mod, set ResidualVM up to play Myst III (https://github.com/residualvm/residualvm#4-running-myst-iii). Then uncompress the mod archive in the game folder, so the mods directory is at the same level as the Data and M3Data directories. Then run the game using the ResidualVM version from this post.

Modding guide

In this section I will succinctly explain how to create a simple mod. You can contact me for more details (by private message here or on the #myst IRC channel on libera.chat).

The first step is to configure ResidualVM for modding. Open the residualvm.ini file and perform the following changes (https://github.com/residualvm/residualvm#61-location-of-configuration-file):

  • Add enable_external_assets=true in your existing myst3 target section. This will cause ResidualVM to prefer loading files outside of the game archives.
  • Add debugflags=modding in the [residualvm] section. This will make ResidualVM to print the names of the external files it tries to open.

Next, extract the game archives to access the assets. To do so, open Myst III in ResidualVM, open the debug console using the ctrl-d keyboard shortcut and enter the dumpArchive LEISnodes.m3a command. This will create a dump folder containing the assets for the J'nanin exterior in the ResidualVM folder. There are a lot of files. You can use the log output of ResidualVM to match the files to their in-game use.

ResidualVM will now load the files from the dump directory instead of from the game archives if it can find them. It will look for files with the following extension in that order: .dds, .png, .jpg. This means it's possible to experiment very quickly. Modify the extracted files, go to the corresponding location in game and observe the changes.

Next the modded assets need to be prepared for packing. PNG files are fine to experiment with but are not suitable for distribution as they are bulky and slow to load. ResidualVM expects the images to be in DDS format to prepare the mod for distribution. It accepts uncompressed, BC1, BC2, BC3 and BC7 compressed DDS files.

For the example mod, I've used the following process:

Next the prepared assets can be packed into a mod archive. Open Myst III in ResidualVM and enter the modArchive LEISnodes.m3a command. This will pack the modified files from the dump directory into a LEISnodes.m3a.patch file created in the ResidualVM folder. This command takes a long time to run as it compresses some of the files. You can disable the compression to experiment quickly using the modArchive LEISnodes.m3a false command.

Finally, the mod is ready to be tested and distributed. Place the mod archive in a directory corresponding to the mod name in the mods directory in the game directory. Set enable_external_assets to false in residualvm.ini so the files are loaded from the mod archive instead of the dump folder.

The same process can be used to mod the following asset types:

  • Bink videos (The example mod replaces two of the Squee videos)
  • Cursors (Bitmap files in RSRC.m3r)
  • Inventory and font used in the load and save menus (.data files in RSRC.m3r, open as raw with The Gimp)

Note that there are some limitations:

  • The mod archives are limited to 4 GB. Generate multiple archives to work around the limitation.
  • Some of the videos will not display at the correct scale when they are loaded from the dump directory. They should play correctly once packed.
  • I have probably left behind a number of bugs :) Report them to me so I can fix them.
@MsSepeteus
Copy link

Hi, @klamann
I can upload it to Google drive, but it's 21GiB so it takes time.
I'll put the link here when it's ready.

@bgK
Copy link
Author

bgK commented Jul 29, 2023

Indeed, this looks very good! Awesome work @MsSepeteus. I'm eager to try it.
Let me know if I can be of assistance with more fixes or improvements to the engine.

@tomdodd4598
Copy link

tomdodd4598 commented Jul 29, 2023

Fantastic work @MsSepeteus! And nice work on the quick patch @bgK - awesome to suddenly see this sort of progress :)
I would love to ask though... how did you avoid the seams at the edges of the pre-rendered cubes made up of the six images for each node? I was using MYSTERAssetExplorer to first produce a single-image panorama, but I was wondering if there was a better approach.

@MsSepeteus
Copy link

MsSepeteus commented Jul 30, 2023

hi, @bgK

You mentioned that you can fiddle the engine a bit more if needed, so if possible proper 30fps support would be nice.
And even better support for standart video formats would be nice also. Now that bink part is a most annoying phase in the whole thing.

Thank you for your great work with the engine !

@klamann
Copy link

klamann commented Jul 30, 2023

it works! Thank you so much for sharing @MsSepeteus

@MsSepeteus
Copy link

MsSepeteus commented Aug 20, 2023

hi, @bgK

I got the whole game tested with mods and didn't notice any issues. I woul'd say it's fully playable with mods.
Playlist: https://www.youtube.com/playlist?list=PL_VkzB24mavMDveb2hg8Iuyhrla6brOyD

Link to the mod if anyone is interested:
https://www.moddb.com/mods/myst-iii-exile-ai-upscaled-for-residualvm-hd

The mod updated to v2 with multitrack audio bink videos and multil. journals.

All images: "RealESRGAN_x4plus --fp32" max 2160x2160 by pytorch

@tomdodd4598
Copy link

Amazing stuff @MsSepeteus :)

@MsSepeteus
Copy link

Thanks, @tomdodd4598

Did you test the mod, did you notice any bugs ?

@tomdodd4598
Copy link

@MsSepeteus haven't noticed any so far!

@Amarok87
Copy link

Amarok87 commented Apr 4, 2024

@MsSepeteus tremendous work!! Just finished playing it from start to finish and noted no issues, excerpt for a little one: when you first enter J'nanin main tusk and go at the nodes where the pages of the notebook are, two of the three visors in the room are open, not closed. I checked on the o.v. and the visors are closed.
Also I'm working on an Italian version of it, but I haven't found a way to extract videos from the mods to swap the audio. Any idea?
Thanks!

@MsSepeteus
Copy link

Thanks, @Amarok87

I didn't notice the whole visors thing, even though it was in my video too.
However, I compared the jpg dump and dds content inside LEOS.nodes, and they were identical.

I don't know proper way how to extract videos from patch nodes, but just copy that node to data dir and dump it.
eg. TOHOnodes.m3a to TOHOnodes.m3a.bak and TOHOnodes.m3a.patch to TOHOnodes.m3a
Restore Data dir before playing.

@Amarok87
Copy link

Amarok87 commented Apr 5, 2024

Thanks @MsSepeteus, it worked!

I noticed another thing: in TOHOnodes there's a video file named TOHO-11002 which isn't present in your mod files, so the game shows the low res version of it.

Working now on the italian audio files. I was wondering if adding all the audio streams to the files will work with the localization. I'll let you know.

@MsSepeteus
Copy link

Hi, @Amarok87

Thank you for pointing out that missing video. Can you inform me if you find more?
I'll update that mod archive later.

The main thing is @bgK's excellent HD-build, which makes things easy.

May I ask, are you going to use RAD tools for multitrack audio or do you have better muxer for bink files?

@Amarok87
Copy link

Amarok87 commented Apr 7, 2024

Hi @MsSepeteus

unfortunately I didn't find any other muxer for Bink videos, so I'm going through RAD tools. Good thing is that there are only 20-something videos to modify.
Adding all of the other languages to the video files is pretty easy, but I'm having an issue putting them in the dump folder: ResidualVM seems to ignore these Bink files. I also swapped the english audio with another language without doing multiaudio files but the issue persists. Modded images works fine instead. Did you encountered the same problem?

Thanks

@MsSepeteus
Copy link

Hi @bgK

Could you please check sometime when you have time that visors thing. It's present only in nodes leos 6 and leos 7.

Thank you in advance.

@MsSepeteus
Copy link

Hi @Amarok87

According to the tutorial residual engine loads only images not .bik files from dump dir. I never tried load anything from dump dir.
So rename dump dir and create new one with modded nodes and run "modarchive ####nodes.m3a false".(false disables packer)
Residual engine complains if there is mixed nodes or name errors.
Maby it's better to rename mods dir and create new one for testing.

I got gfpgan working with pytorch rocm, so now realesrgan can run with --face_enhance.
gfpgan can restore faces if you can recognize whose face are in picture but most of footage is totally out of quality.
Anyway, gfpgan looks promising and I'll remake some videos and update mods archive later.

@Amarok87
Copy link

Finally I managed to merge all the localized audio to the upscaled videos, everything seems to work smoothly. I updated the related *.patch files both in bink_1080p and bink_overlays.
I also upscaled italian journal entries and the rolling credits.

@MsSepeteus
Copy link

MsSepeteus commented Jan 9, 2025

The mod updated to version 2.

All images upscaled with "RealESRGAN_4xplus --fp32" by pytorch and downscaled 84.37% by Mitchell to 2160x2160 max size.
Multitrack audio also muxed to upscaled bink files.
All journals(m3t) also upscaled.

Overlay bink videos with alpha masks, full screen bink videos, journals and images are all in separate contents if editing is needed.

Link to the mod: https://www.moddb.com/mods/myst-iii-exile-ai-upscaled-for-residualvm-hd

@bgK
Copy link
Author

bgK commented Mar 2, 2025

Hi @bgK

Could you please check sometime when you have time that visors thing. It's present only in nodes leos 6 and leos 7.

Thank you in advance.

Hi @MsSepeteus, sorry for the late answer.

There was an issue with the modArchive console command where modded files would not be included in the output archive in the situation where multiple images share the same couple (id, face), which is the case for the projectors in LEOS 6 and 7. The newly released v7 Windows build fixes the issue.
Unfortunately that means you'll have to rebuild the modded archives to include the missing files. Users don't need to update to the v7 build to play as there are no other changes since v6.

@MsSepeteus
Copy link

MsSepeteus commented Mar 3, 2025

Hi @bgK

Thanks, everything works. I updated the mod archive also.
Now there is four separate 7z archive in moddb, so no need to upload entire pile if something needs to be fixed.

I tested the mod in linux with larger images on gamescope & FSR. It looks pretty good on 4k 65 oled screen by youtube app
smooth pannings and no frame drops. https://www.youtube.com/watch?v=kQhQCu7HdfY

@ctoroman
Copy link

ctoroman commented Apr 7, 2025

Hi @bgK

I found a bug.
When disable protection in Narayan, there is no video where Saavedro cannot make the right choice.

@MsSepeteus
Copy link

MsSepeteus commented Apr 7, 2025

Hi @ctoroman

About the missing video, if the low resolution version plays it's most probably my mistake when rearchiving multitrack audio videos.
I'll check it out.

edit: Does it exist here.. https://www.youtube.com/watch?v=f51-YikUm4A if so, can you point the time stamp?

@ctoroman
Copy link

ctoroman commented Apr 7, 2025

Hi @MsSepeteus

Yes, this video exists here. https://youtu.be/f51-YikUm4A?t=794

@MsSepeteus
Copy link

Thanks @ctoroman, corrupted NACH-10124.bik clip fixed.

I've made a mistake with symlinks when archiving, nach-10124 was present but wrong content(nach-10014).
Thats why residual engine skipped that.

Quick fix "NACHnodes.m3a.patch.7z" is available in moddb.

@ctoroman
Copy link

ctoroman commented Apr 7, 2025

@MsSepeteus, thank you)

@ctoroman
Copy link

ctoroman commented Apr 8, 2025

Hi @MsSepeteus
Another bug.
After putting the first symbol on the projector, the video of the original game is played, not HD quality.

@MsSepeteus
Copy link

MsSepeteus commented Apr 8, 2025

Hi @ctoroman

If you mean that clip where Saavedro says at the very beginning "It's not so easy, isn't it Atrus", I never found it from dumps.
I couldn't dig any deeper, because I don't know which packer is used. Maby @bgK can give a clue.

Edit:
I think that I found that missing clip, It's LEOS-24004.bik in LEOSnodes.m3a but with alpha channel.
If you play it by radtools or ffmpeg, it's transparent. Thats why I skipped that clip a couple of years ago when I converted those clips.

Because I couldn't find anything else and it's only clip with solid mask trough, so I converted that clip without alpha and it works.
I think it's a bug in the original game(not residual engine), which they fixed removing that mask by code.

I tested that in console.. go leos 6 > fillinventory , put symbol on the scanner , and correct clip plays at HD-30fps.

I'll put fixed LEOSnodes.m3a.patch to moddb for testing.

@ctoroman
Copy link

Hi @MsSepeteus

Thanks a lot, I'll test it, I'll write about the result.

@ctoroman
Copy link

Hi @MsSepeteus

I've tested it. Everything all right)

@MsSepeteus
Copy link

MsSepeteus commented May 25, 2025

Hi @bgK

Steam has switched to scummvm with latest update of the game, so it's more complicated to use your build on steam.

Does your team have plans to add modded assets support for myst3 at scummvm ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment