blender->md5 export script 2006-02-12

edit: read my latest post below


I wrote a script that exports to MD5 (Doom3 engine’s format for animated characters, used in Doom 3 and Quake 4).
It´s based on Jiba´s blender2cal3d script.

Just did a test but it did not work .

Using a clean Global Dictionary.
analyzing IPOs: only IPOs with names starting with Action will be handled
Traceback (most recent call last):
  File "", line 1186, in ?
  File "", line 1094, in export
  File "", line 842, in getIpoValue
  File "", line 826, in CalcIpoName
ValueError: invalid literal for int():

 curvevalue = int(curvebits[2])

Sorry, I forgot to mention it doesn´t work with Blender2.30. But that also tells me you haven´t read the readme or the header of the script. :wink:

Very nice. The math lib that you wrote is nice as well…
P.s. what is this about quaternion ipo names? Also what about animation names? Im interested in the problems you had is writing this script regarding deficiences in the api.

The math-lib is almost completely taken from Jean-Baptiste Lamy´s “blender2cal3d” script. :slight_smile:

For the thing about quaternion IPO names, look here:
it describes pretty well what´s the issue. In Blender2.30 it changed and is probably easier to extract the values of ipo curves, but I haven´t looked at it closely yet.

The animation names issue:
You can have an animation with some name, and somehow the animation is linked with IPOs. The IPOs are the relevant thing for the script, but they may have different names (names that have nothing to do with the name of the animation they “belong” to. I don´t know if the mapping of IPOs and their animations is accessible from Python. In Jiba´s code, the IPOs are assumed to have some common part of the name (prefix) which is treated as the animation name.

Id like to take a look at this and see if it can be fixed once the mathutils is done.

A new version is up:

New features:

  • has a GUI
  • works on Blender2.28 - 2.32, probably 2.25 too
  • exports animated cameras too

I only tested it on Win2k though. Any feedback is welcome. :slight_smile:

A new version: V0.9, exports to MD5 Version 10 (the one that the final Doom3 game uses), and works with Blender2.34 with the quaternion patch applied, for example this one:

There was a bug in the standard 2.34, for more info read this:

The script needs Python installed.

You can export camera animations, too.

To see the generated MD5, you can use either a modelviewer (there are a couple on, for example mine: )
Or you can import it into 3dsmax/gmax with my md5->max importer:
Or you can import it into Doom3, for info on how to do that read:
(sorry for all that pimping…)

I need feedback on this, it hasn’t been tested much.
For example, I tried to export a baked animation and I only got the bind-pose. I’d be thankful for any feedback. :slight_smile:

A new version, updated for Blender2.40:
Thanks for any feedback, here or at

Another update, for Blender2.41:
-Works with 2.41 only (or newer maybe)
-uses Blender241’s new Pose-module (enables export of ik without baking to IPO animations)

Be careful when using the exporter, there is a bug in the python API that might affect this script. Save your .blend before using the exporter, then export, then reload the .blend file, just to make sure. I haven’t tested this but just saw a bug report about a blender function (Action.setActive()) that this script is using, too: