My Efforts at Moding Team Fortress 2 Models

So I’ve been getting the urge to mess around with team fortress two and make my own models for the different characters. Going into it I can see it becoming a really big venture if I want to make everything right but my first steps are trying to get the files usable for blender to mess with.

First off Valve likes to compress their files twice over. So after using GCF Scape to decompile the player folder in the team fortress 2 content f\models folder I took the scout.mdl file and used Cannon Fodder’s MDL decompiler (all of this is easily googable) to get at the .smd and .dmx files for the scout. Finally… one last step. Now I just needed to find a good importer/exporter python script for SMD file types. Found this one:

http://www.3d2toy.com/downloader.php?ID=47

and this one:

http://folk.uio.no/jonmd/blender/smdimport/

I put both of these scripts into my blender.blender\scripts folder. I also made sure that python works by downloading 2.5 and also doing the whole environment variables step which you have to do with your computer (go to my computer, right click and select properties, then go to advance tab, click environment variables button on the bottom, and add PYTHONPATH for the name and this code bellow that:
C:\Program Files\Blender Foundation\Blender\scripts\bpymodules )

So python works properly with blender. But I ran into a snag while trying to use the scripts. The first one didn’t work and came up with this error:

ImportError: No module named meshtools

So I went into the script code and erased meshtools from the line:

import Blender, meshtools, math, time

I was actually able to select my file before another error came up saying:

AttributeError: type object “Bone” has no attribute “New”

So I gave up on the 3d2toy one and went to the other script. Problem was I got the same error:

Traceback <most recent call last>:
file “<string>”, line 1, in <module>
file “C:\Program Files\Blender Foundation\Blender.blender\scripts\HL2_SMD_Import er_For_Blender\import_static_smd.py” line 81, in <module>
import Blender, meshtools, bpy, math, time
ImportError: No module named meshtools

So now I’m stuck… I don’t know how to access the .smd for blender to use and I have a fear it might be on my computer’s end (or at least how I got python set up with blender).

any one can help? Once I get this process down and make it work I’ll hopefully have the erge to make modifcations to all the character models with some sort of theme to it.

I have to say though… valve’s games are one of the harder to modify. Well they give you those handy editor tools but by mod I mean take their models and modify them and put them back into the game for use. Games like oblivion are so much easier. One importer/exporter one place to put it all. And one mod file extension to worry about (which simply calls the mod to play in the game).

sigh but I’m simply a modiler and animator… don’t know much script beyond Blitz Basic

Its been a long time, but the last program I used to make half-life characters was http://chumbalum.swissquake.ch/index.html Milkshape 3d. Those were the days…I once shot a 3D 1up mushroom into the air and it landed on my head and killed me.

If you want to get animated SMDs in Blender get last version of Blender and try my extension of Jon script.
http://lsa-svn.svn.sourceforge.net/viewvc/lsa-svn/trunk/characters/SMD%20importer.rar

How do that work ?

just read the instructions in the blender file, in the two text windows

Then i have the next question so do the import rotate the bone ass all the other smd importer. Because i want to use this to import smd to use the rig… There are other smd importer but they twist every bone in a random direction and make the bone useless.

I corrected the twist problem, otherwise you couldn’t import any animations

So do that mean that i can import and edit the mesh and then export with the blender SMD exporter and still functional in source basic animation (NPC anime like alyx) ? Because that have been many problem with it.

I have no idea about it since I never used the SMD exporter …

http://forums.steampowered.com/forums/showthread.php?t=1363481

The problem about that tutorial is the old script. And i believe it have the bone rotation error that will mess up the bone when import and make it useless for smd editing.

But david so you say you have manage to stop the random rotation the script does ?

for the importer part yes. Try to load some SMD animations in Blender if you dont believe me :slight_smile: (they are in same package)

I have test it and i am verry impress. But i will test if it work to export it out again and functional in source engine.