Request: SMD (Source Engine) Import/Export

Lately I’ve been playing a lot of TF2 again (after taking a year off to curb a problematic addiction!), and have become really interested in creating some custom models.

There are a couple of SMD import scripts available for Blender, but one doesn’t work in 2.49 and the other has issues with scale (passing through MilkShape and exporting as OBJ corrects scale, but doesn’t preserve UVs). There’s also a recent exporter which works great, and can even export animation, but is crippled by the inability to import animation and might not have the facility to export shapekeys for Faceposer.

Reading on the TF2 Blog that an early design concept that defined the Scout was that of a bike messenger wired on coffee, I did a coffee cup for the ‘Bonk! Energy Drink’ unlockable as a test model. Following superaldo’s tutorial and using the second import script and the new export script, and after some tweaking here and there, it works in game, with physics and everything, modeling and texturing 100% Blender!

Certain first-person only (introverted) props like the energy drink are simple as they only have a single bone, so the scaling issue with the import script is avoided, but what I’d love to do is import and export rigging and animation so I could do a full character conversion (like superaldo’s beautiful Heavy Bear!).

The working importer imports models, rigging, and weight painting, but lacks support for textures, animation and shapekeys.

The working exporter exports models, rigging, weight painting and textures, and should export animation (not tested), but may need support for exporting shapekeys.

I don’t know how much work something like this would take (maybe I should be looking to commission some code?), but I hold out hope someone might take a glance over it, and if any generous coder took a crack at it they’d have my infinite gratitude and publicity along with Blender in the character mods and tutorials I want to do!

Was able to change the color of the particles; now all I need to do is find a good ‘coffee pouring’ sound…!

(Not that I used Blender on this aspect, but it’s an excuse to bump…)

I tried the export script on a model of mine with bones, but it gave me an error that says,
“AttributeError: bones” What does that mean? I would realy like some help on this.

How did you animate your model? I would really like to know. The tutorial on the site doesn’t cover how to export an animated model.
EDIT: Ok, here is how I got it to work, for anyone else who reads this.

  • Create your bones and weight paint them like you would normaly do
  • Animate the bones
  • Open the action editor, select the animation you want to export
  • IMPORTANT Select your mesh, AND THEN YOUR BONES. The bones should be in pose mode (The mesh should be pink, and the bones blue)
  • Export the file as an animated mesh
  • Compile with studiomdl and a qc file! (here is a good tutorial for making a qc file ->

Good luck :wink:

Looks Great Bunny.

Yeah, looks great. Like the real deal. :slight_smile:


Still need to choose a sound and make a parody logo, and I think I’ll release it in Finished Projects.

Damn, that looks great, any chance of a tutorial or even just a sample .blend file?

Alright, shouldn’t be much trouble to put together a small tutorial too!

I got viewmodels to work now:

will see if I can make a tutorial for it