KatsBits Community

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

motorsep · 73 · 158498

0 Members and 2 Guests are viewing this topic.

Offline mexicouger

  • Newbie
    • Posts: 4
Hey! I was pretty bummed about the tag bug with blender 2.63a and tried a few different ways of getting the tag in my model all of which failed. I located the error and looked at a previous md3 exporter and with a bit of coding I fixed the tag problem.

Now using blender 2.63a, you can use tags. As always, you select your tag and mesh and just export.
So here it is.

http://www.mediafire.com/?9rz015ffau5zks0

-Mexicouger


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
Cheers will add the new updated version to the available files list once I've got the file sorted out (make sure you've added yourself to the credits section in the update ;) ).

Just to clarify, are you 'parenting' the Empty's to the Armature as per the above or doing something else? (So Empty is parented to the Armature *object* and 'linked' to a specific bone?)


Offline mexicouger

  • Newbie
    • Posts: 4
Thanks! And you just do what you normally would with a tag. Basically, make sure your armature is in pose mode. Position your tag where you want it, then select your tag and the bone you want to parent it to, and then parent. The tag will follow the bones animations perfectly.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
OK. Will get this up ASAP. Thanks for the fix.

(split and merged these last couple of posts so all 'tech' issues are in one place).


Offline D-Meat

  • Defunct
  • Newbie
    • Posts: 8
    • portfolio
Hello again,

I'm trying to export an md3 and I get this :
Quote
Traceback (most recent call last):
  File "C:\Users\D-Meat\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\io_export_md3.py", line 798, in execute
    save_md3(settings)
  File "C:\Users\D-Meat\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\io_export_md3.py", line 574, in save_md3
    my_scale = round(25/scene_minimum,2)
ZeroDivisionError: division by zero

location: <unknown location>:-1

The error seems simple : there is a division by 0, which might be the value of the "scene_minumum" variable here ...

I guess this variable might be the starting frame specified in the timeline, but it's variable name seems to be "frame_start".
Also, by default, the starting frame is 1, so it shouldn't divide by 0 ... I moved the starting frame to 2, and I'm getting the same error.

The only thing I have not followed from the tutorial is the separation of the armature in 2 different parts (for upper and lower), because I thought it might be complicated to animate some things ...


Offline D-Meat

  • Defunct
  • Newbie
    • Posts: 8
    • portfolio
Problem solved : you have to select the object you want to export, and export separately head, torso and legs.

I haven't tested in the engine yet :)


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
Yup, it's always best to export objects separately (at present) otherwise the compounded mesh data (the export of several things at once) may cause various errors on export. Glad you got it sorted though.

You *can* export a full skeleton (not all MD3 usages need the upper/lower/etc split), but yes it will likely cause problems come time to test in the tech you're using because it'll be looking for 'properly' set up content. Certainly agree that having to do that can make animating confusing!

P.S. moved your post to this tech topic and tidied the old one (how to) up so there's less confusion over where these types of question can be asked.


Strategee

  • Guest
Hi !
I use "MD3 export for 2.63a with "tag_" support" and i have always the same problem with size.
When i export it, the size of my model is really too big and even resize in blender doesnt work.
Also the option in export script fail.

By the way, i I tried export .3ds and the size is correct.

Idea to fix it ?

PS : I love this fix about tag <3.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
Have you tried using "Apply" ("Ctrl+A") on the mesh and armature before export? Be careful doing this with the Armature though, if it has Action sequences they may break (this happens because Blender set a keyframes positional data relative to the original coordinates attributed to individual bones, change those and it alters the resulting exported data, in other words Blender ends up exporting the model as if it were much larger than it actually is).


Strategee

  • Guest
Hi-bis
Thank you for your quick answer.
In reality i test with no bones/armature and with a unique frame (but i tried ctrl + a).
I guess i need armature and keyframe to fix size ?
I go work on it and i post here if i'm still stuck =D.

In all cases thx for your help :P


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
Yes, iirc you won't get a valid MD3 if you try to export without an Armature and Action - standard 'object' based animation doesn't work (that's where the object has no Armature and you're animating by simply moving the Object around). To fix the size of the mesh you need to use the "Apply" function as that resets Object data to "1" (1:1 size/scale).


Offline tea monster

  • Newbie
    • Posts: 10
Hello! Over on the Duke4.net community, we've approached Drek, who is our usual go-to guy to update the Blender export script for 2.8.
He's told us that due to the large amount of changes to 2.8, he won't be able to do this. Is there anyone else out there who could update the exporter for 2.8?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
Suspect this is going to be quite the issue for all scripts going forward so they're unlikely to be updated in the near future.