Convert a Model to Left 4 Dead 2 Survivor

(No longer being updated. Check out the newer tutorial: Modding a Left 4 Dead 2 Survivor)

01-Jan-2011

Latest revision: 30-May-2012

By ZeqMacaw

Inspired by the tutorial by da1barker, Custom L4D2 Character Step By Step or Custom L4D2 Character (same tutorial, different websites).

Introduction

This tutorial shows my way of converting; it is not the only way. For example, I use Autodesk Softimage Mod Tool because it is a free program, but the tutorial I based this one on explained how to use 3ds Max instead.

Note that the instructions are for 32-bit Vista. For 64-bit systems, wherever "C:\Program Files" is used, you will probably need to use "C:\Program Files (x86)".

Get the Tools

Click on name to download.

Setup the Tools

Install Tools Found in Steam

Setup HLMV Tool

L4D2 has its own set of SDK tools separate from other Source engine games, including its own version of HLMV.

Setup VPK Tool

Setup Mod Tool

Install Remaining Tools

Setup the Release Folders

Setup the Source Folder

"Source" folder refers to the original files used to create the files used in L4D2; it doesn't mean "Source engine" in this tutorial. For example, the source folder will contain the smd file and other files used to create the final released mdl file.

Create or Get a Model

Create a Model from Scratch Using 3D Modelling Program

I have no experience modelling from scratch, so I have no guidance here. There are numerous tutorials that explain how to model humans or human-like 3d objects.

Some helpful 3D modeling overviews and tutorials:

OR

Get a Model from a Source Engine Game

You could start out by extracting an MDL file from a Source engine game (like L4D2 or Half-Life 2).

OR

Get a Model from a Website

Download a model from such sites as Garry's Mod Related Files.

Convert Model File to SMD File

Convert from MDL Format

Convert from Other Formats

(Future updates will have links to tutorials for converting from other formats.)

Planned:

Import the Model into 3D Editing Tool

Import to Mod Tool

Import to other 3D Editing Tools

(Other tools have plugins and menu options for importing and exporting smd files, and can be found elsewhere.)

Set the Model Materials

Extract the Weightmap for Each L4D2 Survivor

The weightmap represents how much each vertex of the mesh moves when bones move during animations. This section of the tutorial only needs to be done once for each of the four survivors.

The Valve Source Add-On for Mod Tool includes two weightmap options: Export Weightmap and Import Weightmap. These two options can save you a lot of time if your custom model is posed and positioned closely to the L4D2 survivor model it is replacing (more details about this later in the tutorial). The imported weightmap likely won't be perfect (such as lower parts of hair), but the harder-to-weight areas, such as shoulders, chest, and hips are often good enough to not need tweaking.

Extract model files from L4D2 pak file

Convert SMD File To FBX File

(NOTE: What Mod Tool calls "weightmap", Blender calls "armature".)

Convert FBX File To Valve's Weightmap File

Edit the Valve Weightmap File

The weightmap file is not quite right for importing (probably because Valve Source Add-On hasn't been properly updated), so edit the file as follows.

Rig the Model

Test the Model in HLMV

HLMV can only read from L4D2's "models" and "materials" folders, so this section explains how to handle it as smoothly as possible.

Test the Model in L4D2

If the model animates well in HLMV, test the model in an actual L4D2 game.

Create the Lobby Avatar

Create the In-Game Avatar

Create the Incapacitated Image

Create the Addon (VPK File)

Test the Addon in L4D2

After packaging the addon into a vpk file, you should test it in L4D2.

Upload

Conclusion

Once you have your first working converted model, let others know about it.