fbpx
March 12, 2025

How I made the BioShock Infinite VR Map – March 26, 2023 at 08:57PM

I haven’t documented this anywhere, so might as well do it here.

What you see in the video is a complete handmade remake inside the Source 2 engine using SteamVR Home. Every single model was carefully searched for, re-exported through blender, had its materials exported and tuned for use in Source 2. Everything was positioned in the level by hand.

People have played Infinite before in VR using VorpX, but it’s not at all the same experience as this. This is a true VR experience where you can move your head around and pick up objects.

The start of the process

First thing I had to do was determine what scale to use when importing the models into SteamVR. This is a VR application and therefore I don’t want to be the size of an ant, nor do I want to be a giant. A few models had unit names at the end such as “something_512”, but those didn’t line up even in blender. Infinite was made in Unreal Engine 3, and none of the scaling factors I tried seemed to make things fit.

So my solution to this was to find something that has a known height… such as Elizabeth! “How cool would it be to see Elizabeth with accurate height in VR?” I thought. So I went to the wiki and saw that her height was listed as 5’6″ (1.68m). I then loaded her model in blender and measured head to toe how high the top vertex of her skull (not hair) was. After rounding an unnoticeable fraction off for convenience, the factor that I got for loading models into Source 2 was 0.26. (This does not include the 0.01 m->cm factor that gets used by the .PSK file imported in blender) To confirm this I also tested back and forth with a 1.68m block in Source 2 and saw that everything looked correct.

So basically, the entire world was scaled to make sure Elizabeth looks correct. While some rooms are large, the rest of the models make sense at this scale too.

Finding models

All things considered, this part is actually pretty easy if you know how to use Gildor’s UE Viewer tool. There’s a GUI you open and point to your game files, and it returns a bunch of packages for you to search through. Most of the time I was able to find the relevant models by simply looking for the level’s prefix S_BW_Enter_*. This will let you export a .PSK file that can be imported into blender with a plugin.

After loading the model in blender, I swap the shading type from flat to smooth and then export it as an fbx using the 0.26 factor from earlier. Some models had to have their origin corrected so that they’re easier to place in-game.

I think the only model I made myself was the ocean water, all of the other ones I found by scrolling through packages. Some of the existing models had to be edited though.

Finding materials

To get the material, I press M on the keyboard in UE Viewer while viewing the model I want and then follow the trail of texture names. SOME of which are not even in the same package. For example, some of them pointed me to the DLC packages even though the model was in the base game.

Most of the materials are easy to figure out, usually with suffixes like _diff, _norm, and (sometimes) _mask. Normals had to be inverted for Source 2 (DirectX vs OpenGL style.) Source 2 wants OpenGL, and so they have a checkbox that lets you invert these in the material editor under a checkbox that says something like “Invert legacy Source 1 normals”

The mask files are not always immediately usable though. I never looked into it enough to know for sure, but it looks like they use different color channels for different data. Purple for specular, blue for emission, green for roughness (although this isn’t always consistent). Source 2 doesn’t know what to do with these, so I would extract these manually by using a black/white filter in Photoshop and messing with the channels until they looked correct. I then had to move the sliders further in the editor to make sure they look correct in the game.

Some maps didn’t exist at all and I had to create them from scratch. The umbrellas on the beach have a _wind map that I had to draw myself.

(near impossible) Animations

I don’t know what kind of corporate espionage occurred for this to happen, but someone on the Gildor forums years ago was able to decode Morpheme animations into SMD files (which are usually used in Source Filmmaker.)

After inspecting/decompiling the .exe they shared, I saw that it was an innocent C# program that converts the binary format (.MorphemeAnimSequence and .MorphemeAnimSet) and saves the output file (.smd). I have no idea where this person learned the binary structure for these files. There’s absolutely nothing in those files to indicate where the bones/keyframes are. The bone names are readable, but all of the raw integer/float data isn’t. If I had to guess, it was perhaps taken and modified from Mass Effect 3’s modding community? Who knows. What mattered is that it actually WORKED.

There’s one catch to this program though: since these animations were from UE3, they had to be “mirrored” in your 3d program of choice. After much trial and error, I was able to write a JavaScript that corrected the .SMD file by mirroring the bone names and scaling the positions down. To make this easier to do, I made a batch file that combined the exe and my script.

After importing the SMD into blender and pairing it with a mesh, everything worked (almost) correctly. I say almost because the animations are still flipped. If I imported an animation of Elizabeth touching the thimble on her finger, it would be on the wrong hand.

There were also some severe interpolation issues with her dancing animation. Because she rotates 360 degrees, blender was trying to interpolate a full rotation within 2 frames. I ended up having to add some keyframes to correct this.

I also had to correct her legs clipping on her dress. Source 2 supports cloth simulation (like they used in the original game), but there’s not much documentation on how to add it. Also the Source 2 model editor will crash randomly while working with the cloth/collision parameters. Hopefully someday Valve will update SteamVR’s version of the engine to include the new ModelDoc that S&Box, Alyx, and CS2 have.

This process worked both for Elizabeth’s model as well as the NPCs.

Face animations

Infinite used UE3’s integration for FaceFX, but I have not yet been able to get those imported. I believe it relies on shape keys too, which are not present on any of the .PSKs I imported. Some of Elizabeth’s animations included face posing, so I took part of that one and used it for the dancing and idle animations. I also had to animate the eyes for the dancing so they were less creepy.

Custom animations

Some other small things I had to manually animate include: the waving flags, the ocean water, the background crowds, the airship, and the floating islands.

Sounds

There’s two places to find sounds in the original game. Some are sound effects, which are inside the packages, and others are the more localized sounds such as music and voice lines. The localized sounds are in a fat 200+ mb package somewhere in the game files, and I was able to extract all of those using a batch file from this GitHub repository called Wwise-unpacker

Sound was probably the easiest asset type to extract, and it was fun hearing all of the voice lines isolated from the game. I found some background ambient sounds/music to use for the soundscapes, and began converting them from .ogg to .wav.

If the files need to loop (such as music/ambience), I ran them through a free program called Wavosaur to add “loop markers”, which is how Source engine knows to loop a sound. Again, if SteamVR had a newer version of Source 2, I don’t believe this would be necessary. In S&Box’s tools, there’s a GUI for adding sounds that lets you toggle looping.

After making sounds, I added them to the engine by making a JSON-like file that defines the volume and radius of how far it can be heard. Soundscapes (such as the ocean and crowd chatter) were added in a different but similar file. (Both of these sound types are documented on the Valve developer wiki)

It took a bit of play-testing to get a decent mix, but I think it sounds good enough for now.

Custom sounds

The only two sounds I had to mix/edit myself were the tears. To make the level feel more alive/familiar, I wanted to hear lines of dialogue from the original game. I couldn’t just play these on their own though, I wanted to make it more BioShock-y and have the sounds play as if they were coming from a tear.

To make a tear sound, I started with a tear sound from the game files. I then took some of Elizabeth/Booker’s voice lines and cut them together to be played at a faster pace than they are in-game. After mixing it a bit, and sprinkling on some chorus/reverb effects, I got a sound that sounded like a tear. Hopefully adding to the multidimensional theme of the game.

As a final step for these, I added some triggers in the game so the player hears them when walking into a certain area.

Skybox

To capture the skybox, I spun around in one place and captured a 360 view panorama, which is made up of about 60 screenshots. Nvidia’s Shadowplay overlay saves them as .EXR files, which I then stitched together in PTGui. I had to do this from multiple areas in order to see around all the buildings. Most of the buildings were masked out while stitching, but that left a bunch of blank areas on the image. To cover up the blank areas where the buildings were, I opened it in Photoshop and clone stamped all of the ugly seams. The result is a high resolution image that drops into Source 2 without any further effort.

I actually made a bunch of panoramas for Infinite + DLC a month or two ago, so I was able to re-use that experience. Here’s my post on that. I think there’s 21 total now in the Google Drive folder.

How to position all of this in the level?

No I was not able to rip the positions of the assets in the level.

While I do believe this data is somewhere in the game files, I don’t know where to find it, and I don’t think it would carry over to Source 2 as easily. And I would have to convert the scaling/positions anyway. If someone who is familiar with UE3’s game file structure knows where that data is, let me know, because I think it would be cool to automate the object placement.

Alas, without any of that information I had to resort to walking around in-game and staring at the objects. Pointing at my screen counting the planks and scratches until everything was as pixel-perfect as possible. I wasn’t brave enough to install Cheat Engine to enable noclip, so I was only able to reach areas that the player can reach.

I would get so focused on lining stuff up that I keep having to tell myself “don’t sweat the pixels”, even though I totally did for some objects. It was necessary, because if a big object was offset by enough, it would throw off the layout for the rest of the map. I definitely sped through some other parts though, like when placing a barrel or something, which is not nearly as critical as the sand/boardwalk alignment for example.

The further the geometry was from my view, the less aligned it is. You’ll notice that the larger background models are either not present, or very poorly aligned simply because I couldn’t see them.

Manually positioning all of the objects has some benefits though. There were a ton of gaps and flaws in the original game that I corrected in my version.

Conclusion

I started poking around the game files around 5 months ago, and only started this VR project earlier this year. Usually taking time to do it on the weekends since I’m really busy at my day job during the week. I do have prior experience working with both Source Engine (1 and 2), Unreal Engine, and general game development / 3D knowledge, which is why it was fairly quick to develop.

It also helps when literally EVERY asset is already developed for you (aside from re-importing). There’s this ghostly feeling where I see the struggles of the original game’s level designers. I can easily see now where they copy pasted an object, or the reason why they stretched a model a certain way. I have a much greater appreciation now for how much effort and detail went into these levels, even 10 years ago.

As much as I would have liked to work on Infinite with the original team back then, it’s not possible, but remaking a level in a different engine is probably the closest anyone can get to that now. It would be really cool if one of the original developers, or at least Ken Levine saw it. I would also enjoy hearing insight from one of the level designers about what it was like to make the original.

If anyone has any more questions/suggestions/tips let me know! Enjoy!

Steam Workshop URL: https://steamcommunity.com/sharedfiles/filedetails?id=2952477736

submitted by /u/Jaxswat to u/Jaxswat
[link] [comments]

%d bloggers like this: