The MayaImportx86.dll now works for several versions of Maya, meaning the exportModels console command should work if your Maya version is 4.5 or greater.
I've recently been messing around with getting animated models into Doom 3. I am not going to go into too much detail since this is really a tutorial about using the Doom 3 MD5 converter instead of a Maya tutorial. Plus I really don't know crap about Maya, two days ago I was just another 3ds Max user

Okay, to start out you will need an object. I made a box with 2 height segments so I could figure out what I was doing easily just by reading the ".md5mesh" file. Because of the way Maya does their polygons (actual polygons instead of triangles) you have to triangulate your object(s) (modeling->polygons>triangulate). Now UVW map it and apply a tga (I don't think doom3 supports jpeg like quake3 did).
Set up your bones and skin (in other words link the bones to your object's vertices). Since my object was really simple I only needed 3 bones. My bones were named "joint1" "joint2" and "joint3". Joint 1 being the root bone which controls all of the other bones. You will have to know the names of your bones for exporting... So, make them pretty simple if your doing a complicated bone system.
Create a box (or any object really) called "[whateveryouwant]_" at 0 0 0 xyz coordinates or at the base of your object. This will be your prefix object. The prefix object is the base of the model as far as I can tell anyway, I haven't really tested it. I called mine "pre_", as far as I can tell it doesn't export with the MD5. I am pretty sure the underscore isn't necessary but I see it being done all time in id's .def files. The only place I haven't seen it was in the chainsaw's def file.
Save your scene as either a ".ma" (maya ascii) or ".mb" (maya binary). I like to use ".ma" so I can open it up in a text editor if I'm getting major problems later. I would call the file name something with "mesh" in it since this file is going to be used to export to .md5mesh.
Now put together an animation sequence.. JUST ONE. Unlike Quake 3, Doom 3 uses one file for each sequence. This makes it a bit easier to organize your animations, in my opinion anyway. After you've finished putting together the animation save it as either ".ma" or ".mb" again, but this time put something that will help you tell which animation it is. For me it was "idle"
Whelp, Maya has served its purpose *kicks off stage* now we get to use the fun stuff. It's time to convert our model to md5. To do this you will have to create or edit a .def file. I created one called sausage.def.... ahem. At the beginning of the file you will run a "export" command.. and it does exactly that. Here is what I put in my sausage.def file (NOTE: I added comments explaining what each part is) :
// ----------------------------------------------------------
export {
// You must start your extra commands with "-options"
// prefix defines the pivot point object.. "pre_" was mine.
options -prefix pre_
// "-parent" is what id uses for their linking system. Even though you already
// defined all this in maya you'll have to do it again in here.
// So the line below links joint3 to parent joint2
addoptions -parent joint3 joint2.
// Links joint2 to joint1... joint1 is the root and controls all of the other roots.
addoptions -parent joint2 joint1
// If you have objects in the scene you dont want to export then dont include
// them in the keep line. Everything else must be in it though.
addoptions -keep joint1 joint2 joint3 sausage
// Below is where the path and destination of the mesh
// sausage.ma is my source file..
// models/matt/ is where it's going to put sausage.md5mesh
mesh models/matt/sausage.ma -dest models/matt/sausage
// Below is where the path and destination of the animation
// works the same as the "mesh" except it doesn't export the mesh =D
anim models/matt/sausageidle.ma -dest models/matt/sausageidle
}
// ----------------------------------------------------------------------
In order to test your models animations you are going to have to make an "entityDef" script. This will make a new entity in Doom 3 that you can test out in game. This is what I put under my "export" script:
// ----------------------------------------------------------------------
// Entities name. You will be using this name to test the model.
// You have to name give it the appropriate title for what "spawnclass"
// My spawn class is "idProjectile" so I put a "projectile_" before the actual name.
entityDef projectile_sausage {
// This is what type of entity it is.. I used idProjectile
// because it was simple and idAnimated was giving me some trouble.
"spawnclass" "idProjectile"
// "min" and "max" is the bounding box size.
// I think Maya and Doom3 have about the same grid size, so you can
// figure out your models bounds like that.
"mins" "-3 -3 -3"
"maxs" "3 3 3"
// This defines the path for the actual mesh.
"model" "models/matt/sausage.md5mesh"
// The animations name (idle) and path to the ".md5anim" file.
"anim idle" "models/matt/sausageidle.md5anim"
}
// ------------------------------------------------------------------
There are alot of other commands you can do, but I wanted to keep it simple. Okay, Save your ".def" file and start up Doom 3. All you have to do now to get the engine to export the model is load up a map. "empty.map" is good for this type of thing. Once you're in a map type "testmodel " and what you named your entity, in my case it was "testmodel projectile_sausage"
The model should pop up, if it doesn't then you might be aiming a bit to low/high. The "testmodel" command spawns the model a certain distance from the players viewpoint. So make sure you are looking away from walls, floors, or ceilings.
Now bind a key to "nextanim" and another one to "prevanim". I think those commands are pretty much self-explainitory. Press your "nextanim" key, hopefully you will see your model looping the first animation you defined in your entityDef script.
Well, I hope this helped some people out there who are dying to start modeling cool characters in Doom 3. There should be some awesome stuff the mod community makes with id Softwares kick ass engine. I can't wait to see what people come up with.
- Crimity
Last uploaded 11/07/02-22:42PST.