KatsBits Community

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

motorsep · 73 · 102443

0 Members and 2 Guests are viewing this topic.

Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
Of course I need it that complex :) Why else to I need cloth sim involved ;) Otherwise I could have used deformVertexes in the shader.

The issue is that I don't understand how shape keys work and how to work with them. There isn't any useful tutorial around :(

What I need is to morph last 10 frames into first 10:
1 2 3 4 5 6 7 8 9 10 ....................................... ......... 10 9 8 7 6 5 4 3 2 1


Offline bartart3d

  • Newbie
    • Posts: 2
Thanks for the info, but I seem not to be able to get the textures loaded. Is there some more detailed explanation on how to export to md3 with materials? No matter what I try I don't get the textures loaded, and when I load them in 'misfit', an old linux app, the UV map seems not to be present.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
See if you can test the exports in one of the available md3 viewers floating around on the Net to double check the mesh.. JavaMD3View is probably the better one but it's not compatible with Windows 7 if you're running that OS. There's also Q3 Model Tool. If you can't find either, I'll post them later as an attachment.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Script appears to work with 2.62 (only done a basic export test).


Offline bartart3d

  • Newbie
    • Posts: 2
Hi Kat, thanks for the reply. There seems to be more going on then only the texture problem. The normals are always inverted too when I export to md3.

I've tried the JavaMD3View, did not work, even though I run linux (ubuntu 11.10). Reading the documentation, it all seems very windows oriented. Q3 Model Tool worked like a charm in wine, which is quite ironical, since Java is supposed to be cross platform, and windows executables not...

Is Q3 Model tool supposed to load skin files on loading the md3? I've noticed it did not on my model. When manually adding the skin file, the model shows all black,well, more dark gray, just like in misfit, the linux app to load and edit md3's. I don't find a way to view or edit the texture coordinates though. I still have the impression that the uv-map is not exported from blender into the md3.

I've tried to run blender 2.42, since I've heard that would be the best version to export, and certainly import md3 files, but then I have the python compatibility issue. It does not find the python path. It uses python 2.4, and now we're at python 2.7 on a default install. I thought that was the problem, so I've tried to install python 2.4 too, but then there are dependency problems, since some of the libraries required to build it are replaced...

I'm starting to get really stuck here.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
I'm not too familiar with Linux so don't know if you can do this, but normally you can install different Python versions to a system so long as they are contained in their own folders; 2.4 to "Python24", 2.7 to "python27" and so on as Blender usually self-identifies what it needs. Try doing that (if you haven't already) to see if you get the I/O set up fully for 2.42.

The only other way to independently test the MD3 I can think of is to load it into Quake 3 but that's quite fiddle to do. So far as I know Q3 Model Tool should load in the materials properly if everything is OK, but there may be some setting that needs to be enabled somewhere - I'm not too familiar with it unfortunately, as I normally used JavaMD3View, until Windows 7, which is a much more straightforward app.



Offline motorsep

  • Jr. Member
  • *
    • Posts: 75

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Not this version no. There's another MD5 export script post in the normal posts for 2.63 that's been written from scratch to take into account the BMesh updates. I've not had a chance to test it yet myself though.


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
I am more interested in MD3 exporter as it's the only exporter is missing from my workflow. Is there any working MD3 exporter for 2.63+ ?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
See first post for updated MD3 export script for 2.63a thanks to CoDEmanX. Zip file also includes a basic test sample provided by motorsep.


Offline mexicouger

  • Newbie
    • Posts: 4
I hope I don't get in trouble for this.. But I am having issues with Blender 2.63a and tags. Everytime I create an empty, name it what I want, in this case "tag_barrel", and select my mesh and tag and click export, I get an error.
I don't know how to copy/paste the error information, and I don't know if you all need it or not. But am I the only one who has issues exporting tags?


Offline mexicouger

  • Newbie
    • Posts: 4
I followed all the directions above, but the error still occurs.



To export, I basically selected the tag, selected my mesh, and clicked export, and thats the error that comes up.
I already knew about the parenting to bone thing and I followed the directions exactly anyways. I don't understand! But I really appreciate your help! I never had this issue with exporting md3 with blender 2.49.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
[EDIT] updated script with tag_ support


Hmm yeah.. I just did a test to confirm. Mesh and/or rig export fine, adding the Empty doesn't. That basically means they (Emptys) don't appear to be 'valid' objects by the script (or are not converted correctly). The only thing I can think to suggest for the moment is to use an actual bone that's part of the same Armature. So add a new bone to your current rig, name it "tag_[whatever]" and parent it to the bone that controls its movement. export that and see what happens - you should be able to export without issue, but the test will be if that set-up performs the same way/as expected in the MD3 environment. Not sure this will work unless you happen to be using a skeletal version of the MD3 format (version that uses a skeleton, I know there are a couple out there).

An alternative might be to use a single triangle mesh object parented to the same rig as the main mesh (so you basically end up exporting two mesh objects, it should create a named sub-mesh in the MD3 file data). Add a Plain, triangulate and remove one triangle. Reposition and align. Name the Object "tag_[whatever]" and parent that to the same armature as the main rig. Make sure it has the appropriate vertex groups. Export and see what happens.