NEW LINK - You can find the model converter here:
[h2]The Idea[/h2]A few weeks ago I was fooling around with the G.E.C.K. (Fallout map editor) and I noticed how well all of the parts snapped together and how convenient model-based mapping really is. For instance, when designing the basic structure of a vault, you just aligned corners/halls/stairs to a 128x128 grid. Since it was so easy to use, I wondered if I could convert Fallout 3 models to Source models and make a map out of them.
Since I had never compiled a model for Source before, I started out with a simple experiment. I downloaded a tool to extract the Fallout 3 meshes and materials and opened one of them with NifScope, a model viewer.
I exported the model as .obj with NifScope and imported it in 3DS Max. Then I exported it as SMD with Wunderboy’s SMD exporter, compiled the model and converted the associated materials to VTFs. I was now sure I could easily port models from Gamebryo to Source. There were however several problems I faced at this point.
• It took about 5 minutes to go through the whole process of converting each model and its materials, a reasonable map would require at least 80 models.
• The physics engine in Gamebryo supports flat meshes, for example those used in wall meshes. Studiomdl couldn’t work with those.
• A lot of models didn’t include a collision mesh, because it would just be a bounding box. Bounding boxes in Source can not be rotated, so I would have to create bounding box physics manually.
• The player in Fallout is 128 units high, in Source the player is 64 units high, so I would have to scale all models and physics meshes appropriately.
[h2]The Exporter[/h2]Since I’m a programmer, I set out to automate all these steps. I wrote a program that takes a .nif Fallout model and outputs an .mdl, .phys and the required textures as .vmt and .vtf files. This finally made it possible to port models on a large scale.
You can download this program here if you want to give it a try yourself. To use it, export an .OBJ and .MTL file of the model you want to port with NifScope. Then specify the root directory where you exported the Fallout 3 textures. You also need to specify some of the flags to make the program do what you want:
-s - Same output file name as input file name.
-c - Compile the model with Studiomdl. Without this flag, the .SMD file(s) and .QC file are dumped to the same directory as the input .obj.
-d - Delete the input files.
-f - Generate a bounding box physics mesh if no physics mesh was detected.
-m - Export materials.
The program requires the Source SDK to be installed and outputs all content to /models/props_fallout/ and /materials/models/props_fallout/. The input syntax is shown when running the program without any arguments. If you need any help, send me a PM and I’ll add the info to this guide.
[h2]The Trial - Vault 101[/h2]I now had a fancy way to export all the models we want, but as I said, I wanted to replicate a map with them. I opened Vault 101 in the G.E.C.K. and Hammer and started building the map.
Unfortunately GameBryo uses a completely different lighting system, which works much better on models and is dynamic. Source’s lighting was designed for brushes and is mostly not dynamic, so I braced for the worst when doing my first compile with lighting. Frankly, I didn’t even suspect it to actually compile because of all the model geometry. As it turned out, I was wrong.
Unfortunately the lighting didn’t turn out that well and I assume this is the result of my programming art and Source’s inability to handle model lighting properly. I’ve only really done dev texture maps before this, so I hope someone can improve it!
[h2]Final words[/h2]This system should also work for Fallout: New Vegas, without making changes to the converter. Perhaps someone can make the entire vault or one of the casinos on the strip! The converting method still has its issues, like not supporting animations, certain shader effects and some complex collision models, but this should open the door to a lot of possibilities. If you want to give the map a quick try, it’s also on Toybox.