Skip to content

Left 4 Dead 2 Modifications Part 2

January 22, 2013

Well, after that last post I sat down and painted a new skin.  I wanted to try not only modifying the colour, but normal maps and shader properties to get a feel for how the Source engine works.  I think my attempt was somewhat successful and you can find my skin here on the steam workshopiconOnce I figured out how to extract the files from the pack files and convert them to tga’s the process became a simple matter of painting and adjusting the .vmt files.

Adjusting the .vmt files was the part that seemed to take the most amount of time because I didn’t quite figure out how to view them until I pretty much finished.  Here is how you modify them with realtime results instead of starting the game and exiting every time.  This is what my .vmt file looked like in the end.

vertexlitgeneric
{
    $baseTexture "models\survivors\TeenAngst/zoey_color"
    $bumpmap "models\survivors\TeenAngst/zoey_normal"
    $halflambert 1
    $phong 1
    $phongboost "1.5"
    $phongexponent 24
    $phongtint "[.85 .85 1]"
    $phongfresnelranges "[.5 .5 30]"

    $ambientocclusion 1

    $rimlight 1
    $rimlightexponent 5
    $rimlightboost 0.3
}

You can modify these properties two different ways.  With a text editor or the more useful way with the Workshop authoring tools.  If you open “Left 4 Dead (Tools Mode)” it will let you view shaders.

Create your pack with the basic files from in game as I described in the previous post. Load the game and make sure the add-on is turned on. Exit. Next load the Tools Mode. Select file->open and go to the directory with your .vmt file. This will load your shader and you should see a black and pink sphere.

ToolsMode1

The .vmt references two textures.

$baseTexture "models\survivors\TeenAngst/zoey_color"
    $bumpmap "models\survivors\TeenAngst/zoey_normal"

What you want to do is find those on the left hand side and point them to your actual textures in the above folders. Once you do that you will be able to preview your mesh on the sphere in the lower right corner. Tweaking values will update it in real time.

material loaded

Once you make all the adjustments save out the material file, re-create the pack file and it should be preview-able in game.

One thing that I have found with the material editor is it’s actually running the game in the upper right window.  If you press F11 it will make the game go full screen.  You might see a dialog box after doing that.  Click ok and press F11 again to go back to the material editor.  In the bottom left corner (It might be hidden under a window) you have access to the games console.

  • Type sv_cheats 1 to allow cheats to work
  • Type map c and then press the down arrow to select the level you would like to load.  The first levels have the newer survivors and the higher ones, c11 for example have the older survivors.
  • god 1 will enable god mode
  • sb_takecontrol zoey will take control of zoey.  sb_takecontrol francis will take control of francis.  etc.
  • director_stop will stop zombies from spawning
  • z_spawn common spawns a common infected
  • z_spawn boomer spawns a boomer. Tank, witch, smoker, hunter, horde, (unknown), and mob are the other choices.
  • kick tank will kick the tank from the game.
  • kick coach will remove coach from the game.
  • hidehud 4 will hide the hud for screenshots.
  • r_drawviewmodel 0 will hide your hands and gun in first person.
  • thirdperson_mayamode will let you view your chatacter from the 3rd person perspective and the mouse will spin the character instead of the camera
  • thirdperson will put the camera behind your character and the camera controls its movement
  • c_thirdpersonshoulderdist 40 This will move the camera back from the character.
  • c_thirdpersonshoulderheight 5 This will move the camera up and down.

For a complete list of console commands read this site.  It’s very useful.  What I haven’t figured out is how to get the material that I’m working on to actually show up in the game without reloading everything.  If anyone knows, please post a comment.

Advertisements

From → 3d, Art, game, Misc. Tech

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: