KatsBits Community

[MD5] IMPORT & EXPORT for Blender 2.72+ (the Arx EOS addon)

nemyax · 13 · 64324

0 Members and 1 Guest are viewing this topic.

Offline nemyax

  • Newbie
    • Posts: 38
Please note: the MD5 addon referenced below is provided by an offsite third party. Issues with the script itself (it not running in 'x' version of Blender for example) will require contacting the author directly. kat.



This is an MD5 importer and exporter used by the Arx: End of Sun team (post about the old export-only version: https://www.katsbits.com/smforum/index.php?topic=404.0). The script is not related to the exporter by der_ton, keless and motorsep. Neither does it have to do with any previous import scripts.

For details about the import and export workflow, see the readme. There is also a readme PDF file in the distribution .zip.

Download
The addon is available at:
Important: If you had version 0.6 of the exporter (for Blender 2.63) installed, remove it before installing this version.

Changelog
June 18, 2015
  • The addon is compatible only with Blender 2.72 and later.
  • The addon now supports import of MD5 meshes and animations.
  • Shader names are read and written. The material name is assumed to be the shader name.
As always, see the readme for more information.

July 6, 2013
  • The script is compatible only with Blender 2.66 and later.
  • You can now select which bone layer is reserved for MD5 export (set it to 1 if you can't be bothered).
  • Buttons for managing the membership of this bone layer (image)
    .
  • The exporter is now a single file (io_scene_md5.py).



Monty

  • Guest
Thank you nemyax!

I'd been using the older 2.63 exporter for a while. It worked really well, but I'm glad you updated it.

I've tested it a few times in the engine, and it's perfect! Thanks again.


SirGordon

  • Guest
Hello and thank you for developing this script!

I've tried to export this free model to MD5 (no registration required): http://opengameart.org/content/animated-archer And failed. Maybe I'm doing something wrong.. Anyway, after parenting both root bones to one new root bone, and after fixing an issue with some bone's layers i came up to this: "The 'Cube' object contains 262 vertices with no deformation weights assigned. Valid MD5 data cannot be produced. Paint non-zero weights on all the vertices in the mesh, and retry export." Could anybody please tell me what to do next, preferably with screenshots, because I'm new to Blender.

Thanks in advance!


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
It looks like a number of mesh vertices have no pose data (weight-paint values) associated with them - likely because you haven't created an Action, or Posed the character in such a way as to generate 'weight' data for those 262 errant vertices. Read this on basic rigging, and this on basic Action sequence generation. And then make sure to read this on exporting MD5 (note you'll need to modify the scene prep based on the particularities of the MD5 script you're using here).


Offline nemyax

  • Newbie
    • Posts: 38
...Action...
...basic Action sequence generation...
Actions have nothing to do with this script. It doesn't use them.
SirGordon
Here's the documentation page on weight painting in Blender: http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes/Vertex_Groups/Weight_Paint
Make sure every vertex has some weight for at least one appropriate bone. A quick way to find non-weighted vertices is to select all bones in pose mode and drag them away (and cancel this midway of course). The vertices that are left behind are non-weighted.
EDIT:
Your vertices are in fact all weighted. Apparently you haven't included all the deforming bones in the exportable bone layer. Try putting all of them in that layer and re-exporting.


Offline oladitan

  • Newbie
    • Posts: 3
Hello. i am using blender 2.63. I am trying to export an MD5 animation with nemyax
 MD5 exporter. After moving all the bones in the armature to layer 5. I still get this error when I try to export :

Code: [Select]
location:<unknown location>:-1
Traceback (most recent call last):
  File "C:\Users\oladitan\AppData\Roaming\Blender Foundation\Blender\2.63\script
s\addons\io_scene_md5.py", line 699, in execute
    write_md5anim(self.filepath, prerequisites, correctionMatrix, None)
  File "C:\Users\oladitan\AppData\Roaming\Blender Foundation\Blender\2.63\script
s\addons\io_scene_md5.py", line 290, in write_md5anim
    bm.from_object(mo, bpy.context.scene)
TypeError: an integer is required

I have uploaded the blend file for you to reproduce the error. Thanks.

[EDIT]merged your topic with script topic. kat


Offline nemyax

  • Newbie
    • Posts: 38
oladitan
Note that the latest version of the script is not compatible with Blender 2.65 and earlier. Is there a particular reason you haven't updated to 2.71?
One of the changes introduced in the 2.66 Python API is that the from_object() method of a bmesh takes two arguments instead of one. You can try editing the script file to replace this:
Code: [Select]
bm.from_object(mo, bpy.context.scene)with this:
Code: [Select]
bm.from_object(mo)But I suggest you update Blender instead.


Jason

  • Guest
First, I wanna thank you for creating this script and releasing it to the public; it had proven invaluable. I do have one concern atm though. My export doesn't seem to register when I scale a bone in a keyframe, while blender and other formats do. Am I missing something?


Offline nemyax

  • Newbie
    • Posts: 38
Jason
MD5 has no support for bone scaling. Use a translation-based rig.


Offline nemyax

  • Newbie
    • Posts: 38
Update 0.8.20150618
Both import and export of meshes and animations are supported now. Also, shader names are associated with material names, so you don't need to edit your exported models in a text editor any more.
The topic has been renamed and the first post (including the changelog) has been updated accordingly.



Offline nemyax

  • Newbie
    • Posts: 38
There's been a user report that import doesn't work with Blender versions prior to 2.72. I've updated the original post to reflect that.