So originally when I created this script, I had no idea it would get out to this forum or that may page would eventually be google-able, so I
never posted directions on how to use it or how it works. Apparently though, more and more people are using it (with varying degrees of success)
so I felt that I needed to post on it.
I understand some people are having issues with it. Before I go further I will state that it *does* indeed work, its just that I cut a few corners
and made some assumptions about how people would prepare their files for it, and there may indeed still be some runtime bugs that I had never
experienced before that people are running into. I will be working to make it more robust (a process made easier now that people are giving me
feedback on it). Also, I created the script for a friend who is a professor teaching game design classes that needed it, and I was able to work
with them directly when they used it--thus I never created directions. I should write those up and put them in the RAR file you download off my
my scripts website
link to the scripts page (there is also an ASE exporter for static meshes)
So without further ado...
Upon running the script you should have a GUI with all the check boxes and text fields you need to input your desired settings. There should have
been a zbuffer studios shelf with a button if you loaded the files correctly. if not, they type "md5ExporterOptions" to run the GUI.
When the script starts running, it will reopen your file (it does this becuase of batch processing animations--see below) so always make sure to
SAVE the file if you modify it between opening the file and running the script. If it is working you should see many things such as green dots
appear on your model (the uvs being processed and merged), it may turn sideways (see below), and eventually you should see it run the animation
cycle twice (while it builds skeleton data, and creates keygrames). The files should then be in your designated location. If there was an error
you can usually tell becuase your md5mesh or anim files will be tiny like 1kb or something. Please email me with error messages if you get them.
Common ones are:
"error cannot open *filename* for mode W"
this is due to pipe symbols or some other issue with your names which make windows unhappy with your filename). It may also be due to something
else but mainly you should check to make sure your mesh name and or joint names are unique in the scene.
This script allows/needs the following:
1)creating and saving project paths as well as using default ones for Doom 3, Quake, etc
2)Despite being able to be used for Quake and others, it was designed primarily for Doom 3 (in regards to the .mtr and .def files). I have no idea
if these are needed or can even be used with other games. If you don't need them just delete them. It puts all files relative to your project
3)You should get the following files from it: md5mesh, md5anim, def, and mtr (assuming you output an material file)
4) you can run the script on a single file OR batch process a folder of animation cycles
4.1) Only put ONE animation cycle for a model in the maya file. frankly, it is best if you really have nothing but your mesh, skeleton, etc in a
file. Also, it is BEST to use a baked skeleton (i.e. gotten rid of all the IK, controls, etc that you used, and have only your bound skeleton and
keyframes on it). At this time the script really only wants to deal with joints...so get rid of groups, and other garbage if you can. Also, the
top root joint should be named "Origin" (I will work on relaxing this, becuase I thought md5 files HAD to have the root named origin, but they may
not in reality).
4.2 This script works only on models that are a SINGLE mesh. Accessories such as swords, guns, etc. should either be part of that mesh and bound
into the skeleton as well, OR exported as another file with its own joints.
4.3) if you choose to run a batch process make sure that you put all the cycles into a folder and browse that location with the GUI provided. the
animation cycles are named for the .mb file names, so name them things like walk.mb, run.mb, etc.
4.4) it gets the mesh name from the first polymesh if finds in the file when you first source the script, however, it will update when selecting a
new mesh. OR you can just type the mesh name in. Make sure the mesh name is unique and not in a group or something where Maya will put pipe "|"
symbols into its name since it will put the full DAG path to an object when it isn't unique in the scene. Rename meshes if necessary. The filename
comes from the mesh name so a pipe symbol with freak Windows out and error the script.
4.5) if its a single file (still with only one animation cycle--its far too complicated to figure out what particular stuff is your cycle. its
just easier to have only one thing in a file), you are good to go, just make sure your mesh and all that other above stuff is right and you should
5) The attach shader button creates a phong shader in the hypershade with file inputs already created and connected. It will let you browse your
maps. This shader is referenced to create the .mtr file. (Though this may only be relevant for Doom3).
6) Also, at this time, if your framerate is set to PAL it will have an error. In the meantime use NTSC, FILM, or simple a numbered framerate
preset. Technically, even if your file is set to run at any framerate, you can simply correct the framerate line in the md5anim file in wordpad or
something as the framerate doesn't matter for writing it to file only in playing it back in Doom, etc. You should not neet to rescale your
keyframes. This is also an easy way to change speed after exporting the file if you need to.
7) Since Maya is y-up by default and md5 works in z-up, Maya does a coordinate system change in order to compensate on the fly if it detects it is
necessary (since Maya can be set z-up too). If you see your model turn on its side/upside down looking thats probably why.
is the email addy for my MEL scripts. If you have bug reports, need questions answered, etc email that addy.