Steam

Steam

Not enough ratings
Conversion of *.mdl into *.vmf
By Смайл
From this guide, you will learn how to convert *.mdl models into *.vmf, which is used to store a map's source in Hammer Editor, using two simple programs. This method will be useful for people who used Propper to create models in Hammer Editor.
   
Award
Favorite
Favorited
Unfavorite
Preparing Applications for Work
Programs that we will be using are:

Crafty — Utility that can view Source engine files:
https://drive.google.com/file/d/12UZkFnht0xrajG4pYhLWG9bpjhOKIYdv/view?usp=sharing

GCFScape — A utility for unpacking VPK files in Source games:
https://drive.google.com/file/d/1UxmOrhRuuUWEFVVR6BafXbch-JoeJV3i/view?usp=sharing

Additionally, we will be using MilkShape 3D. You can download it from the official site:
http://www.milkshape3d.com

Click on the links above to download these programs. Download and install them, and follow the rest of the guide.
Converting *.mdl in *.vmf
First of all, we need to grab a *.mdl file — using those programs we can decompile the model, then convert it into the source of a map, i.e. *.vmf

For the test model, we will be using ambulance model from Team Fortress 2. You can find this model if you will open file tf2_misk_dir.vpk using GCFScape. That file is in directory steam\steamapps\common\Team Fortress 2\tf\tf2_misc_dir.vpk

Extract files of the model into any folder, like I did here:



Using Crafty we can decompile the model and convert it into *.obj

Launch Crafty and open the model's *.mdl file through it. After doing so, you will see something like this:



Sometimes it will look completely white, other times it will have a texture. This doesn't matter, just press File → Export, or CTRL+E shortcut, to export the model into another format.



Type the file name, and select *.obj as file type, like in the picture:



Now launch MilkShape 3D and press File → Import → Wavefront OBJ...



And open our *.obj file.



That's how it looks like in the viewport:



But our task here is not to just stare at it, it is to convert it into a Hammer Editor map, so let's not stop here and continue the job.

Now press File → Export → Q3Radiant MAP...



After opening, it you will see this window:



This is a special exporter, that allows converting anything into *.map format — that format is used in level editor for GoldSource Engine and it's games, such as Half-Life or Counter-Strike 1.6.

In this window you need to type the model name with *.map at the end of it. For example: ambulance.map → Then press OK. Anyways, just follow this picture and you will not make a mistake:



After you pressed OK, it should drop a *.map file near the *.obj file we made before.



Now launch Crafty again and open the *.map file. That's what I've got:



Now again press File → Export, or CTRL+E



Type the model name and save it as *.vmf file.

And what do we have? A miracle! We now have a *.vmf file. Let's open it and see what we get:



The model is now converted into a brush, now you can do anything with it. Cut, delete, enlarge, rotate, copy a part, delete another part... Just expirement with it!

As you can see, everything is simple. You just need to apply a bit of effort, and everything will be done.
The end
Now we, mapmakers, have solved another interesting question, the answer to which you now know from this guide.

This method is simple and doesn't require any programming skills.

Did you like this guide?

I'd really appreciate it if you'd give it a like, favorite it, or share it. Thanks in advance!

2 Comments
Nicolai SeveN 30 Sep, 2017 @ 8:01pm 
111/11
Architector #4 30 Sep, 2017 @ 12:51pm 
11/10 goot guide
trust me this rating is not sponsored