KatsBits Community

Game Editing => Scripts & Support => Topic started by: nemyax on July 06, 2013, 03:32:21 PM

Title: [MD5] IMPORT & EXPORT for Blender 2.72+ (the Arx EOS addon)
Post by: nemyax on July 06, 2013, 03:32:21 PM
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 (https://www.katsbits.com/smforum/index.php?topic=167.0) 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 (https://sourceforge.net/p/blenderbitsbobs/wiki/MD5%20exporter/). 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
As always, see the readme for more information.

July 6, 2013
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: kat on July 06, 2013, 04:01:48 PM
Thanks for posting nemyax
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: Monty on January 10, 2014, 05:26:22 PM
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.
Title: Does not allow me to export to MD5
Post by: SirGordon on March 30, 2014, 04:04:13 PM
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 (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!
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: kat on April 01, 2014, 09:39:28 AM
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 (http://www.katsbits.com/tutorials/blender/character-6-armature-rigging.php), and this on basic Action sequence generation (http://www.katsbits.com/tutorials/blender/character-7-animation.php). And then make sure to read this on exporting MD5 (http://www.katsbits.com/smforum/index.php?topic=178.0) (note you'll need to modify the scene prep based on the particularities of the MD5 script you're using here).
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: nemyax on April 01, 2014, 10:18:13 AM
...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.
Title: nemyax MD5 export script error in blender 2.63
Post by: oladitan on August 27, 2014, 06:49:33 PM
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
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: nemyax on August 27, 2014, 08:58:07 PM
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.
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: Jason on September 22, 2014, 11:48:54 AM
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?
Title: Re: [MD5] EXPORT for Blender 2.66+ (the Arx EOS exporter)
Post by: nemyax on October 07, 2014, 03:19:27 PM
Jason
MD5 has no support for bone scaling. Use a translation-based rig.
Title: Re: [MD5] IMPORT & EXPORT for Blender 2.66+ (the Arx EOS addon)
Post by: nemyax on June 19, 2015, 11:55:12 AM
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.
Title: Re: [MD5] IMPORT & EXPORT for Blender 2.66+ (the Arx EOS addon)
Post by: kat on June 19, 2015, 12:32:50 PM
Thanks for the update.
Title: Re: [MD5] IMPORT & EXPORT for Blender 2.72+ (the Arx EOS addon)
Post by: nemyax on July 08, 2015, 02:26:04 PM
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.