Alone in the Dark (the first one) is one of my favorite games. It ticks all my boxes: not only it is a damn good game, it basically created a new genre (survival horror), and on top of that its technical aspect was impressive, as the technology lying under it was state of the art back then, something which could go unnoticed if you never cared to learn about it.
Of course, a cult following developed around it that still persists, with people analyzing its engine in depth for reasons from developing an open source alternative, to exploiting bugs to shave a few seconds during a speedrun, or extracting its assets from the game files, plus many other that you can think about.
One of those projects is the Room Viewer application (made by user tigrou), which despite its name allows you not only to visualize the map layout and entity placement, but also to inspect the 3D models and their animations.
You can also export the current model to .obj (Wavefront OBJ) format, by pressing the X
key. The resulting file can be imported in 3D editors such as Blender, though getting it to render properly (as it does in the Viewer app) is not straightforward, and .obj files don't store complex material information. To automate this process I created a Python script for Blender that will do all the work for you. Doing so was easier than it sounds because Blender runs tightly coupled with a Python subsystem, and every action or GUI button has an equivalent statement in that language.
The first step is to get Blender. The zipped, portable version will suffice, so you don't have to install it system-wide. Then, grab the noise.png texture (which is needed by some of the diffuse textures to create a "noisy" pattern) from the Viewer repository, and save it somewhere (for simplicity, I placed it in the same folder where the Blender executable is). Finally, open a command-line terminal (e.g. PowerShell on Windows) and run the script, giving the OBJ as input and (optionally) the .blend file you desire as output (otherwise it will default to untitled.blend
).
If you have many model files to convert, you can batch process them by writing a script for your OS. Here is an example for PowerShell that will convert all .obj files present in the current folder (save it with .ps1 extension):
Get-ChildItem .\*.obj | Foreach-Object `
{.\blender.exe --background --python .\convert_aitd_obj.py -- -f $_.Name -o "$($_.BaseName).blend"}
The resulting .blend model file(s) will be generated in the same path. You can then fire up Blender to check the results.
And, if you open the material viewer (Shader Editor window) you'll confirm that all materials and their nodes have been properly set up. The game uses the following material types:
- Shadeless: the standard diffuse (plain) color texture.
- Noise: mixes the pattern of the previously mentioned noise.png texture with a base color.
- Glass: surfaces with varying degrees of transparency (but they also have a color that applies to what is seen through).
- Metal: also a plain color, but with a viewpoint-dependent gradient, that looks like a very simple reflective shader.
Download
- GitHub Gist
- convert_aitd_obj.py (alternative)