The original algorithm comes from here. Please look around there first. I also have to thank the repository, where I found the C program I used to extract the maps from the Comanche 3 game.
You can try my implementation here VoxelSpace Demo. Take a look around my YouTube channel, where I implemented the algorithm in Unity.