MD5 Animation doesn't play correctly


(.Chris.) #1

I’m trying to get a simple animation to work however when I test it out the mesh appears to move within a small confined area however when I turned on bounding boxes, the box appears to follow the animation I set though the mesh doesn’t. See image in the link.

http://battle-of-wolken.co.uk/images/etqw/wake/boundingbox.jpg

I have only 2 bones, “origin” and “joint1”, joint1 is the bone that does the animation with the whole mesh weighted to it,it is just a simple move up and across motion, I had a more elaborate one before but ran into problems whilst trying to resolve this issue.

I’m using 3DS Max 2013 and der_ton’s exporter http://www.doom3world.org/phpbb2/viewtopic.php?t=1914


(BackSnip3) #2

I’ve had the same problem with md5 meshes exported with blender, using LightRay3D it worked alright, it’s the bounding box coordinates that are wrong IIRC, as if the three axes were exchanged (x,y,z exported as y,z,x for example). Couldn’t find a solution other than using another software :confused:


(.Chris.) #3

Cheers, will try it with LightRay3D later on in week and see what happens.

BTW, started work on Battery today, almost got spawn bunker main brushwork done, modified my last attempt.


(amitnegi) #4

Yeah it remains where I placed it, at first I used a bone for the origin but it affected my animation after I linked the other bone to it, now I’m using a helper point instead for the origin which solved the animation problem but the in game problem remained.


(Assassin4004) #6

Hi, I’m trying to get a mesh and animation to work for a custom map I’m working on the following are the steps I used:

I have created an editable mesh and origin bone (located at the origin) in 3ds max.
I applied the Skin modifier to my mesh and linked to the origin bone.
I animated the origin bone to move my mesh and exported using der_ton’s md5 exporter.
I created a .def and specified a model declaration (including proper links to the .md5mesh and .md5anim files)
Inside the same .def I specified an entityDef inheriting from “func_animate” and specifying the model which i just declared.

In editWorld I right click and see my entity in the list but when I select it, it doesn’t work.
It shows an orange box and I get the following warning:
idRenderModelMD5::ParseModel: Mesh with name ‘’ already exists in model models/mapobjects/castle/md5/drawbridge_mesh.md5mesh’

Are there other steps I need to take? Any insight would be appreciated.

~Assassin4004


(.Chris.) #7

I’ve not touched modelling and animations in ages, not a clue sorry, Backsnipe might know better if he’s still around.


(BackSnip3) #8

Regarding the error you get, I guess you have multiple “meshes” (objects) in your model, and the export didn’t give them names, so the engine sees two different meshes with the same name and goes very angry!

Also, I suggest using another bone as object parent instead of the origin bone (with origin bone being parent of that new bone). The origin bone should always be at coordinates 0,0,0. I guess if you try to move the origin bone, the model won’t even move because the coordinates are relative to this origin bone!
Hope this helps you a bit


(Assassin4004) #9

Thank you for the help, I found in the .md5mesh file that I can specify the name of the mesh and I no longer obtain this error. I still am unable to load the model though in editWorld. The entity I defined shows up when i right-click in the 2D XY window and I can create it, but it is an orange box. This seems to me that my model is not loading properly, any thoughts?


(BackSnip3) #10

Can you reimport your file without problems?
Is it triangulated? Correct materials applied? Correct animation?
What does the warning say now?


(Assassin4004) #11

I’ve tried triangulating the model before converting it to an editable mesh. Textured it with “textures/concrete/concrete10”. I added an “origin” bone to (0,0,0) and another bone named “pivot” which i linked to the “origin” bone. I exported as an md5mesh and md5anim file. I also created my entityDef file. I have included below all the files. In summary I was able to export and import the md5mesh and md5anim files and everything worked fine in 3ds max. There are no warnings and it shows up as an orange box still. Thanks for all the help!

Here is my drawbridge2_mesh.md5mesh file:

MD5Version 10
commandline “”

numJoints 2
numMeshes 1

joints {
“origin” -1 ( 0.0 0.0 0.0 ) ( -0.00011918 0.0 0.0 ) //
“pivot” 0 ( 0.0 -80.0 0.000181899 ) ( -0.000847258 0.707107 0.00084479 ) // origin
}

mesh {
// meshes: Box001
name “Box001”
shader “textures/concrete/concrete10”

numverts 20
vert 0 ( 1.0 1.0 ) 0 1
vert 1 ( 1.0 0.0 ) 1 1
vert 2 ( 0.0 0.0 ) 2 1
vert 3 ( 0.0 1.0 ) 3 1
vert 4 ( 0.0 1.0 ) 4 1
vert 5 ( 1.0 1.0 ) 5 1
vert 6 ( 1.0 0.0 ) 6 1
vert 7 ( 0.0 0.0 ) 7 1
vert 8 ( 0.0 1.0 ) 0 1
vert 9 ( 1.0 1.0 ) 3 1
vert 10 ( 1.0 0.0 ) 5 1
vert 11 ( 0.0 0.0 ) 4 1
vert 12 ( 1.0 1.0 ) 2 1
vert 13 ( 0.0 0.0 ) 5 1
vert 14 ( 0.0 1.0 ) 2 1
vert 15 ( 1.0 1.0 ) 1 1
vert 16 ( 1.0 0.0 ) 7 1
vert 17 ( 0.0 0.0 ) 6 1
vert 18 ( 0.0 1.0 ) 1 1
vert 19 ( 1.0 0.0 ) 4 1

numtris 12
tri 0 0 2 1
tri 1 2 0 3
tri 2 4 6 5
tri 3 6 4 7
tri 4 8 10 9
tri 5 10 8 11
tri 6 3 6 12
tri 7 6 3 13
tri 8 14 16 15
tri 9 16 14 17
tri 10 18 19 0
tri 11 19 18 7

numweights 8
weight 0 1 1.0 ( -153.371 -149.074 0.000370231 )
weight 1 1 1.0 ( -153.371 183.352 -0.000542392 )
weight 2 1 1.0 ( 153.371 183.352 -0.000369932 )
weight 3 1 1.0 ( 153.371 -149.074 0.000390104 )
weight 4 1 1.0 ( -153.371 -149.074 39.4293 )
weight 5 1 1.0 ( 153.371 -149.074 39.4293 )
weight 6 1 1.0 ( 153.371 183.352 39.4292 )
weight 7 1 1.0 ( -153.371 183.352 39.4292 )

}

Here is my drawbridge2_anim.md5anim file:

MD5Version 10
commandline “”

numFrames 100
numJoints 2
frameRate 30
numAnimatedComponents 1

hierarchy {
“origin” -1 0 0 //
“pivot” 0 16 0 // origin ( Qy )
}

bounds {
( -153.371 -229.074 0.000454747 ) ( 153.371 103.352 39.4293 )
( -153.39 -229.074 -0.0732452 ) ( 153.371 103.352 39.5025 )
( -153.445 -229.074 -0.290994 ) ( 153.371 103.352 39.7202 )
( -153.537 -229.074 -0.650266 ) ( 153.369 103.352 40.0792 )
( -153.662 -229.074 -1.14808 ) ( 153.367 103.352 40.5763 )
( -153.818 -229.074 -1.78143 ) ( 153.36 103.352 41.2081 )
( -154.005 -229.074 -2.54733 ) ( 153.35 103.352 41.9712 )
( -154.217 -229.074 -3.44273 ) ( 153.332 103.352 42.8621 )
( -154.454 -229.074 -4.46459 ) ( 153.306 103.352 43.8772 )
( -154.71 -229.074 -5.60983 ) ( 153.268 103.352 45.0127 )
( -154.984 -229.074 -6.87529 ) ( 153.217 103.352 46.2649 )
( -155.271 -229.074 -8.25781 ) ( 153.148 103.352 47.6299 )
( -155.568 -229.074 -9.75414 ) ( 153.06 103.352 49.1036 )
( -155.87 -229.074 -11.361 ) ( 152.949 103.352 50.6819 )
( -156.174 -229.074 -13.0749 ) ( 152.813 103.352 52.3606 )
( -156.475 -229.074 -14.8924 ) ( 152.646 103.352 54.1354 )
( -156.768 -229.074 -16.8101 ) ( 152.447 103.352 56.0018 )
( -157.051 -229.074 -18.8241 ) ( 152.211 103.352 57.9553 )
( -157.317 -229.074 -20.9308 ) ( 151.936 103.352 59.9911 )
( -157.563 -229.074 -23.1262 ) ( 151.617 103.352 62.1047 )
( -157.783 -229.074 -25.4064 ) ( 151.252 103.352 64.291 )
( -157.975 -229.074 -27.7673 ) ( 150.836 103.352 66.545 )
( -158.132 -229.074 -30.2047 ) ( 150.367 103.352 68.8618 )
( -158.252 -229.074 -32.7142 ) ( 149.841 103.352 71.2361 )
( -158.328 -229.074 -35.2915 ) ( 149.255 103.352 73.6627 )
( -158.358 -229.074 -37.9318 ) ( 148.606 103.352 76.1362 )
( -158.337 -229.074 -40.6307 ) ( 147.891 103.352 78.6512 )
( -158.26 -229.074 -43.3832 ) ( 147.107 103.352 81.2022 )
( -158.125 -229.074 -46.1845 ) ( 146.252 103.352 83.7836 )
( -157.928 -229.074 -49.0298 ) ( 145.323 103.352 86.39 )
( -157.664 -229.074 -51.9138 ) ( 144.318 103.352 89.0156 )
( -157.331 -229.074 -54.8315 ) ( 143.234 103.352 91.6549 )
( -156.925 -229.074 -57.7777 ) ( 142.072 103.352 94.3021 )
( -156.445 -229.074 -60.7471 ) ( 140.828 103.352 96.9517 )
( -155.886 -229.074 -63.7345 ) ( 139.501 103.352 99.598 )
( -155.247 -229.074 -66.7345 ) ( 138.091 103.352 102.236 )
( -154.526 -229.074 -69.7418 ) ( 136.597 103.352 104.859 )
( -153.721 -229.074 -72.7511 ) ( 135.018 103.352 107.462 )
( -152.831 -229.074 -75.757 ) ( 133.355 103.352 110.04 )
( -151.853 -229.074 -78.7544 ) ( 131.607 103.352 112.588 )
( -150.788 -229.074 -81.7379 ) ( 129.775 103.352 115.101 )
( -149.635 -229.074 -84.7024 ) ( 127.86 103.352 117.573 )
( -148.394 -229.074 -87.6429 ) ( 125.862 103.352 120.0 )
( -147.064 -229.074 -90.5543 ) ( 123.784 103.352 122.377 )
( -145.647 -229.074 -93.4318 ) ( 121.627 103.352 124.7 )
( -144.142 -229.075 -96.2707 ) ( 119.392 103.352 126.965 )
( -142.552 -229.075 -99.0664 ) ( 117.083 103.352 129.167 )
( -140.876 -229.075 -101.815 ) ( 114.701 103.352 131.302 )
( -139.118 -229.075 -104.511 ) ( 112.25 103.352 133.369 )
( -137.279 -229.075 -107.151 ) ( 109.732 103.352 135.362 )
( -135.362 -229.075 -109.732 ) ( 107.151 103.352 137.279 )
( -133.369 -229.075 -112.25 ) ( 104.511 103.352 139.118 )
( -131.302 -229.075 -114.701 ) ( 101.815 103.352 140.876 )
( -129.167 -229.075 -117.083 ) ( 99.0664 103.352 142.552 )
( -126.965 -229.075 -119.393 ) ( 96.2707 103.352 144.142 )
( -124.7 -229.075 -121.627 ) ( 93.4318 103.352 145.647 )
( -122.377 -229.075 -123.784 ) ( 90.5543 103.352 147.064 )
( -120.0 -229.075 -125.862 ) ( 87.6429 103.352 148.394 )
( -117.573 -229.075 -127.86 ) ( 84.7024 103.352 149.635 )
( -115.101 -229.075 -129.775 ) ( 81.7379 103.352 150.788 )
( -112.588 -229.075 -131.607 ) ( 78.7543 103.352 151.853 )
( -110.04 -229.075 -133.355 ) ( 75.757 103.352 152.831 )
( -107.462 -229.075 -135.018 ) ( 72.751 103.352 153.721 )
( -104.859 -229.075 -136.597 ) ( 69.7418 103.352 154.526 )
( -102.236 -229.075 -138.091 ) ( 66.7344 103.352 155.247 )
( -99.598 -229.075 -139.501 ) ( 63.7344 103.352 155.886 )
( -96.9517 -229.075 -140.828 ) ( 60.7471 103.352 156.445 )
( -94.3021 -229.075 -142.072 ) ( 57.7777 103.352 156.925 )
( -91.6549 -229.075 -143.234 ) ( 54.8315 103.352 157.331 )
( -89.0156 -229.075 -144.318 ) ( 51.9138 103.352 157.664 )
( -86.39 -229.075 -145.323 ) ( 49.0298 103.352 157.928 )
( -83.7836 -229.075 -146.252 ) ( 46.1845 103.352 158.125 )
( -81.2021 -229.075 -147.107 ) ( 43.3832 103.352 158.26 )
( -78.6512 -229.075 -147.891 ) ( 40.6307 103.352 158.337 )
( -76.1362 -229.075 -148.606 ) ( 37.9318 103.352 158.358 )
( -73.6627 -229.075 -149.255 ) ( 35.2915 103.352 158.328 )
( -71.2361 -229.075 -149.841 ) ( 32.7142 103.352 158.252 )
( -68.8618 -229.075 -150.367 ) ( 30.2047 103.352 158.132 )
( -66.545 -229.075 -150.836 ) ( 27.7673 103.352 157.975 )
( -64.2909 -229.075 -151.252 ) ( 25.4064 103.352 157.783 )
( -62.1047 -229.075 -151.617 ) ( 23.1262 103.352 157.563 )
( -59.9911 -229.075 -151.936 ) ( 20.9308 103.352 157.317 )
( -57.9553 -229.075 -152.211 ) ( 18.8241 103.352 157.051 )
( -56.0018 -229.075 -152.447 ) ( 16.81 103.352 156.768 )
( -54.1354 -229.075 -152.646 ) ( 14.8924 103.352 156.475 )
( -52.3606 -229.075 -152.813 ) ( 13.0749 103.352 156.174 )
( -50.6819 -229.075 -152.949 ) ( 11.361 103.352 155.87 )
( -49.1036 -229.075 -153.06 ) ( 9.75412 103.352 155.568 )
( -47.6299 -229.075 -153.148 ) ( 8.2578 103.352 155.271 )
( -46.2649 -229.075 -153.217 ) ( 6.87529 103.352 154.984 )
( -45.0127 -229.075 -153.268 ) ( 5.6098 103.352 154.71 )
( -43.8772 -229.075 -153.306 ) ( 4.46458 103.352 154.454 )
( -42.8621 -229.075 -153.332 ) ( 3.44272 103.352 154.217 )
( -41.9711 -229.075 -153.35 ) ( 2.5473 103.352 154.005 )
( -41.208 -229.075 -153.361 ) ( 1.78142 103.352 153.819 )
( -40.5762 -229.075 -153.367 ) ( 1.14807 103.352 153.662 )
( -40.0792 -229.075 -153.369 ) ( 0.650253 103.352 153.537 )
( -39.7202 -229.075 -153.371 ) ( 0.290985 103.352 153.445 )
( -39.5025 -229.075 -153.371 ) ( 0.0732269 103.352 153.39 )
( -39.4294 -229.075 -153.371 ) ( 0.000106812 103.352 153.371 )
}

baseframe {
( 0.0 0.0 0.0 ) ( -0.00011918 0.0 0.000106581 )
( 0.000745092 -80.0 0.000190921 ) ( -0.000289937 0.000784348 -0.000131967 )
}

frame 0 {
0.000784348
}

frame 1 {
0.000238863
}

frame 2 {
0.000948741
}

frame 3 {
0.00212
}

frame 4 {
0.00374292
}

frame 5 {
0.00580777
}

frame 6 {
0.00830483
}

frame 7 {
0.0112243
}

frame 8 {
0.0145565
}

frame 9 {
0.0182916
}

frame 10 {
0.0224197
}

frame 11 {
0.0269309
}

frame 12 {
0.0318154
}

frame 13 {
0.0370631
}

frame 14 {
0.042664
}

frame 15 {
0.048608
}

frame 16 {
0.0548848
}

frame 17 {
0.0614843
}

frame 18 {
0.0683961
}

frame 19 {
0.0756096
}

frame 20 {
0.0831145
}

frame 21 {
0.0908999
}

frame 22 {
0.0989553
}

frame 23 {
0.10727
}

frame 24 {
0.115833
}

frame 25 {
0.124632
}

frame 26 {
0.133658
}

frame 27 {
0.142899
}

frame 28 {
0.152343
}

frame 29 {
0.16198
}

frame 30 {
0.171797
}

frame 31 {
0.181783
}

frame 32 {
0.191928
}

frame 33 {
0.202218
}

frame 34 {
0.212642
}

frame 35 {
0.223189
}

frame 36 {
0.233847
}

frame 37 {
0.244604
}

frame 38 {
0.255449
}

frame 39 {
0.266369
}

frame 40 {
0.277353
}

frame 41 {
0.288389
}

frame 42 {
0.299465
}

frame 43 {
0.310571
}

frame 44 {
0.321695
}

frame 45 {
0.332824
}

frame 46 {
0.343948
}

frame 47 {
0.355056
}

frame 48 {
0.366137
}

frame 49 {
0.37718
}

frame 50 {
0.388174
}

frame 51 {
0.399108
}

frame 52 {
0.409972
}

frame 53 {
0.420757
}

frame 54 {
0.431452
}

frame 55 {
0.442047
}

frame 56 {
0.452534
}

frame 57 {
0.462902
}

frame 58 {
0.473143
}

frame 59 {
0.483248
}

frame 60 {
0.493209
}

frame 61 {
0.503018
}

frame 62 {
0.512666
}

frame 63 {
0.522146
}

frame 64 {
0.531452
}

frame 65 {
0.540575
}

frame 66 {
0.549509
}

frame 67 {
0.558248
}

frame 68 {
0.566785
}

frame 69 {
0.575115
}

frame 70 {
0.583232
}

frame 71 {
0.59113
}

frame 72 {
0.598805
}

frame 73 {
0.606252
}

frame 74 {
0.613465
}

frame 75 {
0.620441
}

frame 76 {
0.627176
}

frame 77 {
0.633664
}

frame 78 {
0.639904
}

frame 79 {
0.64589
}

frame 80 {
0.651619
}

frame 81 {
0.657088
}

frame 82 {
0.662293
}

frame 83 {
0.667232
}

frame 84 {
0.6719
}

frame 85 {
0.676295
}

frame 86 {
0.680413
}

frame 87 {
0.684252
}

frame 88 {
0.687807
}

frame 89 {
0.691076
}

frame 90 {
0.694054
}

frame 91 {
0.696739
}

frame 92 {
0.699126
}

frame 93 {
0.70121
}

frame 94 {
0.702988
}

frame 95 {
0.704455
}

frame 96 {
0.705606
}

frame 97 {
0.706436
}

frame 98 {
0.706938
}

frame 99 {
0.707107
}

Here is my .def file:

model drawbridge
{
mesh models/mapobjects/castle/md5/drawbridge2_mesh.md5mesh
anim lower models/mapobjects/castle/md5/drawbridge2_anim.md5anim
}

entityDef drawbridge
{
“inherit” “func_animate”
“model” “drawbridge”
}


(BackSnip3) #12

Hey, I see nothing wrong with your model/anim indeed.
Try to make it as a first-person view weapon (it is very easy) and see if you can make it work?
Did you try desperate useless things like modifying your files with MD5Version 11 instead of 10 :smiley: ?
I haven’t been modding in months, but only thing that could be wrong is the entityDef (because model is fine)? Maybe you need more fields than that in the entityDef? I have no clue right now.


(Assassin4004) #13

Hey, sorry I haven’t posted back recently. I have been super busy with school stuff.
It does appear that the md5 version used for ETQW was version 11. There are slight differences in the format of md5 11 and md5 10.

My first question: Has anyone ever added custom models with animations to ETQW and if so what maps contain these custom animations?

My second question is for Chris: Have you successfully gotten animations to work using 3ds Max 2013 and der_ton’s md5 exporter? Or was there any other way you got animations to work? It appears that the format used in der_tone’s md5 exporter is md5 version 10, not 11.

I recently made a model with animation in Maya 2013.
I run the exportmodel command to convert the .mb files into .md5mesh and .md5anim files.
The command fails and says something like this: MayaImport dll not found.

I did a little bit of research and found that Maya version 4.5 was used for ETQW. In the SDK 1.5 folder, there are several mayaImport dlls.
They are named:
mayaImport5x86.dll
mayaImport6x86.dll
mayaImport7x86.dll
mayaImport45x86.dll
mayaImport65x86.dll

I assume these work for maya binary files created from version 5,6,7, 4.5, and 6.5 of Maya, respectively. (Does anyone know if this is true?)
I found a MayaImportx86.dll and placed it in the locations of these other mayaImport#x86.dlls.
I still was not able to get the export command to work with my Maya 2013 binary files. I received the same error that the MayaImport dll wasn’t found. I am not sure if there’s another directory these are supposed to be placed in.

I also could not find md5 version 11 exporters for 3ds Max 2011 or Maya 2013.
I also could not find older versions of Maya to test my theory of these mayaimport#x86.dlls.

Any more suggestions to what I can try? Thanks again everyone, I hope my findings help those who are struggling as much as I am.


(Assassin4004) #14

I decided to start this process over using an already made md5mesh and md5anim file. I found some animated zombies in a wheels of war folder and managed to get it to work by creating a model and entityDef in a file called zombie.def in “mapname/def”. The contents appears as follows:

model zombie {
mesh models/mapobjects/mapname/zombie.md5mesh
anim idle models/mapobjects/mapname/idle.md5anim
}

entityDef zombie {

"editor_color"			"1 .5 0"
"editor_mins"			"-16 -16 0"
"editor_maxs"			"16 16 64"

"model"				"zombie"
"spawnclass"		"idAnimated"
"anim"				"idle"
"start_anim"		"idle"

}

After I got that working I tried BeRSeRKeR’s MD5 exporter (not the one made specifically for ETQW) on a custom model I made with custom animations and after a little modification to the name of the mesh in the md5mesh file, I got it to work in editWorld.

The only issue I’m dealing with is creating a collision mesh that moves with the 3d model. I think learning how vehicles are scripted/coded may provide some information as to how I can the collision mesh follow the 3d model.

The wiki provides information about Collision Meshes (thanks again Chris for the link) however this is slightly different than what I need. These collision meshes do not move with the 3d model but is just placed around the model.

Thanks again for everyone’s help.

~Assassin4004


(BackSnip3) #15

I successfully added animated meshes in ETQW using Blender.
For collision meshes, just put the collision material on some low-poly version of your mesh, is that not working?


(Assassin4004) #16

Well, I tried putting the collision material on a low-poly animated version of my mesh that’s part of the same md5mesh/md5anim files which does not work. It is important that this collision mesh follows the animated model. I haven’t tried yet putting it in its own md5mesh/md5anim file though, is that what you mean?


(Assassin4004) #17

Oh btw BackSnip3 which version of Blender did you use and which exporter. I’ve been documenting a lot of things along the way.