KatsBits Community

[MD3] EXPORT script for Blender 2.5+/2.6+

motorsep · 73 · 102379

0 Members and 1 Guest are viewing this topic.

Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
Current available MD3 export scripts - test for compatibility before use.
Basic MD3 prep and export instructions can be found below

[edit addition by kat]


I downloaded MD3 exporter for Blender 2.53+, however, I don't see it in the list after installing the add-on in Blender 2.57b :/ Does anyone have the same issue? What's the solution? Thanks.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Yeah it won't, it needs to be updated to work in 2.57 both in terms of it showing up in the AddOns list and actually exporting correctly because of the changes made to Blender. As of right now you're better off sticking with what works (2.53?).


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
There ya go, MD3 exporter is back in business: http://www.kot-in-action.com/files/blender/io_export_md3.py

Good people made it work again, in Blender 2.57b, but it needs testing.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Tested this (using MD3JavaView) with my buneh character and the script does output an MD3 file with associated animation but it's not automatically creating the file set need for "Quake 3" - in the java viewer this means it can't find the *.cfg file that contains the texture, animation data so the mesh appears black in the viewer. That's a problem with the set up rather than output though.

Cheers for updating, I'll mirror the file in the tools section.

Animation export
- Only exporting active animation sequence (good/bad depending on your point of view).
- double check "Start:" and "End:" frames are set correctly per animation.



Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
I don't think you need .cfg file for the texture.. It's gotta be .skin file, no?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
I think so yes, it's been a while since I've done anything Quake 3 related so I've not got the game installed to be able to check but iirc all the skin file did was reference a shader?


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
yeah, or texture. For example, if you have you shader name in the model as "bunny", then the shader file will look as following:

bunny,models/animals/bunny

You can either have a shader in the models.shader called "models/animals/bunny" or you can have bunny.tga in models/animals/ folder.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Hmm... currently I've got the *.blend file set up so the material, texture and image name (datablocks) are all using the same 'name', "bunnysneaky", which is the same as the file itself "bunnysneaky.tga". That image is loaded using relative paths so it appears in the "Source:" block as "//bunnysneaky.tga".

The mesh is exporting but in the md3 viewer applying a skin or an actual texture image just renders the object black, which usually means there's a texture loading issue somewhere. Now I can't quite remember if the texture image datablocks in Blender are supposed to reflect the 'shader' path, meaning the text fields (Texture > Image > datablock ID) should be written as "/models/path/texture" and not just "texturename" because the script gets the actual pathing info from there, or at least it used to?.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Before you ask... no, the script doesn't work (yet) in 2.60  ;)


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
I am not too familiar with MD3 format. I, however, had to modify script itself (ASE exporter for 2.49) so it can append proper prefix (path) to the texture. Maybe it can be done to MD3 script too?

EDIT: Do you know if MD3 exporter can export shape keys animation (flapping flag) ?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Not sure about the shape keys question, can you 'bake' the frames to the time line like you can using bones? If you can do that then there might be a possibility it can (I can't think of any objects in the original game [Q3] that had that type of movement).

Re the script: it does appear in the AddOns list, but it's just not selectable. Not sure if that means the script won't work overall or just that it needs a tweak. I'll take a look.


Offline dmc2143

  • Defunct
  • Newbie
    • Posts: 9
First off, hi everybody, this is my first post on your forum.
I've been testing this script in Blender 2.6 and come across this error.

line 549, in save_md3
uv_u = round(nobj.active_uv_texture.data[f].uv[v][0],5)
AttributeError : 'Mesh' object has no attribute 'active_uv_texture'

Does anyone know where Blender 2.6 is currently hiding our uv data??


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Can't help you on this one but you certainly got further than I had, couldn't even get it to run!. Looks like another round of deep changes in Blender have taken place in 2.6.

Welcome by the way  ;)


Offline dmc2143

  • Defunct
  • Newbie
    • Posts: 9
Thanks for the kind welcome :)
It loaded right up for me with no problems, will even export all the mesh data. Looks to be very close to working fully, just a small back step with uvs.

EDIT: I got it working, just getting some test results from a few people, then Kat will post it in the tools section.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Added download link to the first post in the topic above.. adding to the tools page as well. Good job updating this for 2.60a.