Converting a VMF (Valve Map File) to UDK

Converting the Brush Data

  1. Open Crafty and select the game you will be using under Setup > Profiles.
  2. Open the map file. This will allow you to fully preview the map.
  3. Under Setup > Options, select the Exporting tab and uncheck models.
  4. Go to File > Export. Export the map as an OBJ file to a new directory.
    1. Note: Exporting maps will also export the textures. These are numerous and will take up a lot of space.
  5. Import the OBJ file into 3D Studio Max.
    1. Make sure that “Flip ZY-axis”, “Import as single mesh”, and “Retriangulate Polygons” are unchecked. Make sure the ASE export options are correctly set too.
  6. With the map loaded in 3DS Max, run the Max script batch_ase_export.ms.
    1. Note: This can be a lengthy process for larger maps. ctf_2fort has 2845 meshes and took 1.5 hours to export. Try using small maps such as arena_watchtower or tr_target for testing purposes.
  7. Copy the toolbox folder to the new directory.
  8. Run convert_vmf_brush_to_t3d.bat
  9. Import the textures into the UDK. Save the package.
  10. Import the ASE files into the UDK. Save the package.
  11. Copy and paste t3doutput.txt into the UDK.

Example Output #1
Example Output #2

Converting the Models
Note: This process has a lot of bugs and may not work as intended.

  1. Copy the map VMF file to a new directory.
    1. You can convert BSP files to VMF with BSPSource.
    2. HLLib is needed to extract the models and textures.
  2. Copy the toolbox folder to the directory.
  3. Run convert_vmf_models_to_t3d.bat.
  4. You will be prompted to decompile the models. The MDLDecompiler can only decompile one model at a time. You can automate this process with an AutoIt script.
  5. When prompted to convert the files to ASE files, run smd_to_ase.ms. This can process can be automated with another AutoIt script.
  6. Import the textures into the UDK. Save.
  7. Import the ASE files into the UDK. Save.
  8. Copy and paste the contents of vmf_models_t3d.txt (located in t3d_output) into the UDK.

Example Output #1

Alternate Methods
There are other ways to convert the brush data, but they have their downsides:

  1. Export from Hammer as a DXF file. This will lose the UV coordinates.
  2. Convert the VMF brush data to Unreal T3D format – This is possible but it will result in long compile times, and it will lose the UV coordinates in the process.
  3. Propper – This will merge the meshes together (which will be huge!). It also loses the UV coordinates.

Using 3D Ripper DX is an easier method to rip models and brushes, but it will be less accurate.

Converting a 3D Ripper DX Scene to UDK

  1. Capture and import the scene into 3DS Max.
    1. Some scenes will need to be scaled up before exporting, it depends on the game.
  2. Run “Clean Multimaterial“.
  3. Run the 3DS Max script clear_uv_channels.ms to clear any extra UV channels.
  4. Run the 3DS Max script batch_ase_export.ms to export all the meshes in ASE format to a new directory.
  5. Export the Summary Info file in 3DS Max (File > Properties > Summary info. Press the “Save to File” button). Save as summary_info.txt to the new directory.
  6. Copy the toolbox folder to the new directory.
  7. Run convert_3dr_to_udk.bat.
  8. Import the textures into UDK.
  9. Save the package.
  10. Import the ASE files into UDK.
  11. Save the package.
  12. Import t3doutput.t3d into UDK.

Example Output #1

This tutorial has been updated 2/29/16.

Converting Starcraft 2 Props to UDK

  1. Export files using the SC2 Archive Browser. Models are in M3 format, textures are in DDS format.
    1. Make sure to add your SC2 texture directory to 3DS Max by going to Customize > Configure User Paths prior to importing models.
    2. Most of the background environments can be found in StoryModeSets > Terran.
  2. Import the M3 model files into 3DS Max using m3_import_v0.31_lagspike.ms, which is a slightly modified version of this plugin. [Pic] Make sure sc2_objects.ms is in your 3DS Max plugins folder prior to this.
    1. Some scenes will have multiple M3 files (name_00.m3, name_01.m3, etc). They can take up to 3 minutes to import.
    2. If you are importing multiple m3 files of the same name, you will need to rename the meshes after everything is imported (Tools > Rename Objects). [Pic]
  3. Select everything and scale by 250%.
  4. Clear the extra UV channels.
    1. Some models have emissive textures and will need a second UV channel.
  5. Export all the meshes in ASE format to a new directory.
  6. Export the Summary Info file in 3DS Max (File > Properties > Summary info. Press the “Save to File” button). Save as summary_info.txt to the new directory.
  7. Copy the toolbox folder to the new directory.
    1. Optional: Run copy_m3_textures.bat to copy *all* textures (normal, light map, etc).
  8. Run convert_sc2_models_to_udk.bat.
  9. Import the textures into UDK.
  10. Save the package.
  11. Import the ASE files into UDK.
  12. Save the package.
  13. Import t3doutput.t3d into UDK.
    1. Alpha materials will have to be manually fixed in UDK.

Output Example #1

Helpful Links
SC2 Model Previews

This tutorial has been updated 1/28/16.