Jump to content
The Dark Mod Forums

Recommended Posts

Posted

EDIT: Here's a script that exports smaller md5anim files and doesn't require baking:

I tested this addon for importing and exporting md5.mesh and md5.anim in Blender: https://github.com/KozGit/Blender-2.8-MD5-import-export-addon

It works with Blender 3.6.15 which is the latest version in the 3.0 series. It doesn't work with Blender 4.2. It seems that the culprit is the change in the 4.0 series from bone layers to bone collections.

Like before:

  • use armature_control to animate the model
  • when you're done, select the tdm_ai_proguard armature object and Bake Action to Pose; select Visual Keying

image.png.c7031addc1d6a9a692e1758159d1a5f4.png

  • for the exporter to work you need to select both the tdm_ai_proguard and a mesh object that's being animated, e.g. proguard_armor

 

 

  • Like 1
  • Thanks 2

It's only a model...

Posted

That isn't one of the scripts I maintain. Mine only deal with LWO and ASE, not MD5.

Updating this script to work with Blender 4.2 and integrating it into the LWO/ASE add-on ought to be possible of course, but I don't know how much work is involved (and I know next to nothing about armature animation in either Blender or TDM/D3).

Posted

I added a .blend file with a female character. I made some changes to both - I removed some drivers and added some new constraints to bones.

It's only a model...

  • 2 months later...
Posted
On 8/27/2024 at 5:53 PM, Arcturus said:

Thanks for posting these! Most of the md5s get completely scrambled and destroyed when you try to import them using every blender plugin and version I have tried - so even if you are not planning on doing an animations it's very helpful to have blend files of some character models which are completely intact - as well as nice shading and UVs to boot.

How did you actually manage to get these to import into Blender without breaking? 

-=  IRIS  =-    ♦     <( | )>    ♦    = SLL =

Posted

@Wellingtoncrab I imported those models years ago before Blender 2.8. However the importer I use with 3.6 works fine:

md5_import_blender.jpg.cf27ef29e9906863d2cd5018f2f7d501.jpg

Darkmod rigging is a mess, that's a separate topic. There's a big caveat to this though. Some of the characters are screwed up in a way that's beyond my comprehension. If you for example go to "Create Entity" menu and choose this builder model:

builder_entity.jpg.0ab3dd19ecc4106d3869c4ca774d5e03.jpg

..it's rendered fine. It works fine in game too, obviously. But if you go to the "Create Model" menu...

builder_model.thumb.jpg.03e51159c1f7c069630a5d1d604738b9.jpg

And that's how it will be imported to Blender. But that's only some character models, not all. I have no idea how this is even possible.

  • Sad 1

It's only a model...

Posted

@Arcturus In my experience it doesn't actually work fine. Heads mostly work - but with few exceptions the bodies don't usually import correctly. I am aware of the distortion you see in a lot of models t-poses, but even after you import into blender and you move the models to their af_pose or an animation frame they will still usually have all kinds of distorted/displaced vertices and will still have these if you export them back to the game.

-=  IRIS  =-    ♦     <( | )>    ♦    = SLL =

Posted

@Wellingtoncrab For example priest, thug, proguard seem to load properly:

priest_md5.jpg.2ee248922a407b47ac32cef24c72f0e8.jpg

thug_md5.jpg.1932c2390c66ed63b04a2ec0710fbed1.jpg

proguard_md5.jpg.a0b8a05872ab53d0d386f2e8766252df.jpg

Darkmod doesn't have that many original character models. Most are just variations of other characters. So if a city watch is screwed up, all of it's derivatives are too. But that's not Blender's problem, it's the models themselves.

EDIT: Workaround is being discussed here:

 

  • Thanks 1

It's only a model...

  • 1 year later...
Posted

It has always bothered me that Blender md5anim exporters write a lot of unnecessary data by storing every value for every bone. Here's an example of a typical frame exported from Blender:

Spoiler

frame 1 {
  -0.0000000000 0.0000000000 -0.0000009537 0.3243409991 0.6406084299 0.3356888592
  43.5107460022 0.2148375213 1.6219315529 -0.6876217127 -0.7257841825 -0.0166816879
  0.0000005364 -0.0000097156 0.0000000075 -0.0000060084 0.0007494486 0.0000348017
  0.0104253292 0.0000190437 0.0031846911 0.0002102163 -0.0096469866 -0.0006688987
  0.9027033448 -0.4682373703 -1.8750694990 -0.0000001060 0.0002128573 -0.9999999404
  0.0000007749 -0.0000067577 -3.1039986610 0.1662466526 0.1141026765 -0.7133710384
  7.8865561485 -7.5877208710 -2.1616804600 -0.1025561467 -0.0025704356 0.0076030870
  7.9019432068 5.5249462128 2.3807358742 -0.1705704480 -0.0005776361 -0.0004071284
  19.3999958038 0.0010558367 0.0000142753 -0.0000000623 0.0000001012 0.1119963974
  9.3466196060 -7.1128158569 0.0000073314 0.0000002785 -0.0005556213 -0.0005557530
  17.4648303986 -1.5453062057 0.0160743557 0.0092327790 -0.0021268767 -0.5574507713
  7.6051149368 -0.9600305557 -0.0220331792 -0.0001736414 -0.0003815142 -0.2760857940
  5.8200092316 -0.0002431627 -0.0000003481 0.0000000072 -0.0000000009 -0.0000000441
  9.4341850281 7.1592912674 0.0000062138 0.0000003556 -0.0005554016 -0.0005557923
  0.9027043581 -0.4698376060 1.8746453524 -0.0002128652 -0.0000001305 -0.0000000531
  0.0000000596 -0.0000071637 3.1040000916 0.0181225706 0.0392746627 -0.7491996884
  -7.6561350822 7.4246406555 0.6811738014 -0.1123721525 0.0220207442 0.0466895066
  -7.9768924713 -5.9289336205 -0.6082379818 -0.0046740118 0.0004981104 0.0005025910
  -19.4000129700 0.0013620257 0.0000067949 0.0550021753 -0.0045573786 0.0227704924
  -9.4395751953 7.2068209648 0.7756028771 0.0000002810 0.0004996069 0.0004994804
  -17.4579238892 1.5228233337 0.0156120211 0.0108716497 -0.0006303802 -0.4463901520
  -7.5883369446 0.9791207910 -0.0152885802 0.0000160371 -0.0000889941 -0.2810692191
  -5.8200364113 -0.0001828074 -0.0000006966 0.0000000053 -0.0000000074 -0.0000000496
  -9.4089975357 -7.1217732430 0.0000084639 0.0000002474 0.0005006075 0.0005003124
  0.9487028122 3.5337114334 0.0005798489 -0.7082587481 -0.7059368491 -0.0041459138
  5.0937008858 0.0000089407 0.0064036855 0.0010827759 0.0005121687 0.2198628336
  1.8493989706 0.0001592636 0.0020504296 0.0085280426 -0.0164527670 -0.1422860771
  7.0179128647 0.3530673981 -0.0358339548 0.0016567361 -0.0028534080 -0.0494409800
  4.5526728630 0.1290463805 1.4393103123 -0.6826064587 -0.7307859063 -0.0006593078
  2.0376851559 1.0987149477 -0.5450986624 -0.0000000078 0.0000000586 0.0000000114
  -2.5079932213 -0.1487696171 -3.5524578094 -0.0000000560 -0.0000002638 0.0000000810
  1.0437761545 -1.6534000635 -2.9100003242 0.4271291494 -0.4508431852 0.3809271455
  8.3812828064 0.0000009537 0.0005307198 0.0000000168 0.0000000093 0.0000000047
  3.9075598717 -0.0000007153 -0.0005202293 0.1698647141 0.5699857473 -0.0090442952
  9.0578594208 -0.0000007749 0.0000052415 0.0078208297 0.7096570134 -0.0054351632
  1.9617404938 0.4457607269 -4.9864315987 0.2526226938 -0.7359508872 0.2665097415
  1.4773025513 -0.0079843998 -0.0031859875 -0.0032966514 -0.0978520811 0.3853518665
  0.9775304794 -0.0105012655 -0.0038590431 0.3009410501 0.5546644926 0.2913728356
  -0.0000011921 0.0000042915 -1.2383366823 0.0000000130 -0.0000000093 -0.0000000158
  -0.1003508717 0.4447233677 -4.9158239365 0.3404325247 -0.6704557538 0.3219856918
  1.8502073288 -0.0125312805 -0.0021048784 0.0070855725 -0.0682004541 0.5439003110
  1.0436879396 -0.0137395859 -0.0022420883 0.0103592966 -0.0677804276 0.5030272603
  1.5055522919 -0.0000021458 0.0000029802 -0.0000001205 0.7071068883 0.0000001192
  2.1843392849 -0.9382858276 -2.3350841999 0.0996899977 -0.6886497140 0.1346729547
  1.6729354858 -0.0065457821 -0.0061541796 0.0641088635 -0.2632182837 -0.0118916268
  1.2707352638 -0.0025979280 0.0002350807 0.0011274024 0.7071068287 0.0003212283
  10.2714328766 1.3354141712 -0.0131635666 0.9993928075 0.0348413140 -0.0000458775
  2.7062463760 0.0000000000 -0.0000023842 -0.0017886808 -0.0020456326 0.7071748972
  4.5523667336 0.1311944127 -1.4660727978 0.7313473821 -0.6820050478 -0.0002919515
  -2.0376815796 -1.0987052917 0.5451011062 -0.0000000036 -0.0000000827 0.0000000093
  2.5079965591 0.1487977505 3.5524594784 -0.0000000087 -0.0000000009 -0.0000000035
  -1.0437766314 1.6534702778 2.9099969864 0.3373592496 -0.5217484236 0.5363615155
  -8.3812932968 0.0000021458 -0.0005186796 0.0000000028 -0.0000000086 -0.0000000657
  -3.9075512886 -0.0000005960 0.0005238056 -0.0000000057 0.1501071304 0.0000001623
  -9.0582666397 0.0000007153 0.0000061393 -0.0014629742 0.6865576506 -0.0749523416
  -1.9117863178 -0.4601273537 4.9663681984 0.0672967508 -0.6855816245 0.0527090132
  -1.4831495285 0.0014286041 0.0027523041 0.0154117774 0.0237495750 0.1575796455
  -0.9750146866 -0.0006303787 -0.0001549721 0.0974311009 0.6698543429 0.0892523453
  0.0011317730 0.0000109673 1.2383852005 -0.0000005402 0.0000001751 -0.0000003194
  0.1532018185 -0.4619090557 4.8990964890 0.2174161822 -0.6258205771 0.1849078685
  -1.8621392250 0.0031751096 0.0037028790 0.0388941653 0.0633833930 0.2280692011
  -1.0534420013 0.0074307919 0.0012290478 0.0455810055 0.0589346141 0.0250256676
  -1.5055258274 -0.0000004768 0.0011854172 0.0000118718 0.7070829868 -0.0000367403
  -2.1505446434 0.9332542419 2.2936253548 0.0352221727 -0.6079763174 0.1618253738
  -1.6712409258 0.0092568398 -0.0151381493 0.1011701375 -0.1682478189 -0.0459563099
  -1.2707805634 0.0000252724 0.0011658669 0.0000000007 0.7071062922 -0.0000002802
  1.0978053808 6.5562319756 4.8570208549 -0.6820416451 -0.7313129902 -0.0002282329
  1.0966794491 6.5633864403 -4.8735308647 0.5168796182 -0.4821170568 -0.5172978640
  8.2032518387 -0.0110686421 8.3189430237 -0.6820415854 -0.7313130498 -0.0002279993
  8.2013492584 0.0011794567 -8.3467597961 0.7312957644 -0.6820604801 -0.0002327017
  3.5318217278 5.3340287209 0.0048545608 -0.7069348693 -0.7072784901 -0.0004511077
}

And here's a frame exported from some other software:

Spoiler

frame 1 {
     0.3719907403 1.8838913441
     0.183616057 0.1270178407 -0.7066632509
     0.097246021
     0.0013932233 0.015280935 -0.5515519381
     0.0657159314 0.0883472189 -0.7354869843
     -0.00239953
     0.0005820454 0.0026304075 -0.4418108761
     0.0065043075 -0.0204578303 -0.145473823
     -0.0503830351
     -0.0066894316 -0.0138328578 0.0037346429
     0.2898823619 -0.4893074036 0.5561308861
     0.0490242094 0.1923096329 0.0369853638
     -0.0865965486 0.7057754993 -0.0234235842
     0.0149236694 -0.706949234 0.014923661
     0.1870064586
     0.1048644409 0.6992877126 0.1048644632
     0.1682192832 -0.6868057251 0.1682192534
     0.2621317506
     0.2171092927
     0.0935209915 -0.598135829 0.1577657014
     -0.1299390048
     0.9993928671 0.0348406471
     -0.0000000016 -0.0000000019 0.7070018053
     -0.7313135266 0.682041347
     -0.0040224181
     0.3276759982 -0.5066199303 0.5420721769
     0.1275929809
     -0.0652282164 0.7042406797 -0.0652009249
     0.053237725 -0.7050999403 0.0532377698
     0.1912032217
     0.1214425117 0.6966001987 0.1214426532
     0.1593927443 -0.6889079213 0.1593927443
     0.2907875478
     0.2551326156
     0.0928405374 -0.6174229383 0.1575551778
     -0.1316083968
     -0.7313135266 0.682041347
     -0.7023635507 -0.7118183374
     8.2530345917 -8.3122901917 0.7313076258 -0.6820358634 0.0027434572
}

Since skeletons are hierarchical, rotations can be inherited instead, making the files 3x smaller.

I asked Google's Gemini to rewrite the script. Simply select the armature and export. No need for baking any more. The code will automatically take into account all visible meshes assigned to the armature to write the "bounds". At least that's what I asked for - seems to work. Bounds is just a box for each frame. Supposedly used for optimisation.

Made for Blender 3.6, since that's the latest version that newest md5 addons work with.

I'm not sure what effect does this have on performance, it would be interesting to test it. Older animations could be reexported.

Edit: Link to conversation with Gemini with technical details.

md5anim_optimised_export_blender36.py

  • Like 1

It's only a model...

Posted
On 4/4/2026 at 1:23 PM, Arcturus said:

Made for Blender 3.6, since that's the latest version that newest md5 addons work with.

You cannot use it on Blender 4?

Posted
46 minutes ago, datiswous said:

You cannot use it on Blender 4?

I actually haven't tested, but probably not. There were some changes to the armature system in 4.0 series: https://developer.blender.org/docs/release_notes/4.0/upgrading/bone_collections/

Those chatbots are pretty capable now, it would probably be possible to make scripts for newer versions. Latest Blender version is already 5.1, by the way. They increase numbers a lot more frequently than they used to.

It's only a model...

  • 3 months later...
  • 3 weeks later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      I will NOT return to Discord. Who wants to try something new?
       
      · 12 replies
    • JackFarmer

      I do not understand why Gilmour/Waters trash the "Atom Heart Mother" album and wish for that "all existing copies get dumped".
      I think it is a great recording. Is there something wrong inside my twisted little brain?
      · 3 replies
    • revelator

      Asus ROG strix x570-E gaming ryzen 3700x 32 gb ram radeon RX9070XT 10 tb ssd space (all full)
      · 5 replies
    • The Black Arrow

      I was playing Doom 3, and I learned how to edit maps text-by-text, this should help me a lot with finding secrets and locations I hope.
      That is, if I feel sneaky and greedy...Which I always do, can't get enough 100% a mission.
      · 3 replies
    • datiswous

      So on a regular basis I try to start building something in Darkradiant but very quickly I loose interest and give up.
      I tend to
      create a room, position an ai in it (or first ai, then room, probably better) put a light in it Put some stuff in it test the room in tdm Now I had this new idea:
      Start of with a gigantic room. To skip the importance of sealing for the time being and to think broader than one room. Then just use ground without wall, just to visualise the structure of the level.  Then just use prefab walls and other elements (arches, etc.). Just building area's that aren't enclosed. I can always close them at a later point. Maybe this is all very logical from a mappers perspective, but tdm is the first game where I have done any kind of real mapping and I always stop at the start. It just takes too long to make something exciting.
      I want to build something at some point, because over time I accumulated lots of ideas.
      · 21 replies
×
×
  • Create New...