KatsBits Community

[MD5] IMPORT for Blender 2.6

ShinAli · 13 · 54782

0 Members and 1 Guest are viewing this topic.

Offline ShinAli

  • Newbie
    • Posts: 1
Alternative local download
 - MD5 IMPORT script for 2.61


[EDIT] alt link added. kat


I wanted to use some assets from Doom 3 as a recourse from my programmer art so I've written some import scripts for Blender 2.61 based on der_ton's works. It works well enough, though I think animations are coming in weird but I'm not too sure.

I've included an option with the animation importer that would keep the animation in place in the case of animations that translate the mesh (like running, etc). You can turn it off by un-checking the corresponding check box in the importer window.

I'll probably throw in any scaling options later if people need them.

http://scisbot.com/blender26md5importer.zip


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
Cheers for the update, not had a chance to test it yet. Personally I'm not too keen on scaling being done via import/export, but it's worth adding if you can just so that it's there for those that prefer that approach.

(pinned topic)


Offline renderluz

  • Newbie
    • Posts: 3
I just realized yours is an importer not an exporter :P
In any case ill try it out, regardless of this, have you tried importing or exporting a model on 2.62?
I'm getting errors have you been able to export models with the exporter on the thread link I posted above,
on this version of blender?


Offline trebor

  • Newbie
    • Posts: 1
Very nice. I just wanted to start writing new md5 importers and this saved me a lot of work. Thanks :)


Offline robertzoone

  • Newbie
    • Posts: 5

Offline kat

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

Offline robertzoone

  • Newbie
    • Posts: 5
Why when I import md5 model I got error?
Use Blender 2.61, 2.62 and nothing.



Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
Have you got the appropriate version of Python installed for Blender 2.61? (I can't remember which that is off the top of my head, 3.2.0?). I just double-checked the scripts and it worked OK for me (loading in one of my own md5 meshes/anims). I loaded "io_import_md5.py" and "io_import_md5anim.py" via Blenders "User Preferences" ("File > User Preferences"), rather than dropping the files into the scripts folder ("C:\User" located files are notorious for causing import/export issues with scripts) so try that.

You also need to make sure you're using Blender 2.61, the internal differences with 2.62 may result in corrupt imports - when you import the mesh it should load intact using 2.61, with other versions the mesh appears collapsed in on itself.


Offline robertzoone

  • Newbie
    • Posts: 5
Yes I download for that Blender 2.61 and does not work.
I use MAC OSX no Windows maybe this is a problem? But I do not think.
I load importer to blender in user preferences and addons.
Error occurs when I choose import md5mesh.
When choose md5anim nothing happens. Model is not loaded. I do not get any error. Blender was empty as it is. Model does not load.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
Can you send me the file you're trying to import? If you can send it through and I'll take a look. The importer *does* work so either there's an issue with the file itself, or yes, something with the way a Mac or the Blender set up for that is causing the issue. info@katsbits.com


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
OK, had a look at the file. The problem wasn't the file or data per-say (i.e. the coordinates of the internal structure), it was the way the data was formatted. I'm not sure where you got the file from, but the way it's structured the coordinates causes an issue with the script (this may in turn be a result of the way OBJ data is structured - as it looks like the original file was actually an *.obj model?. Anywho...

What you have is this;
Code: [Select]
vert 0 (0.775083 0.388196) 0 1
What you actually need is this;
Code: [Select]
vert 0 ( 0.775083 0.388196 ) 0 1
Do you see the subtle difference? There's a space after the first bracket, "( ", and a space before the last, like so " )". These are important because they're what the importer uses as an 'end/start' indicator for the various blocks of data in the file; when there is no space Blender confuses the bracket symbols as a number, as that's invalid, it throws out the error.

To fix, you need to open the file in a text editor (Crimson Edit/ NotePad++) and do a simple find & replace on the "(" and ")", replacing them with "( " and " )". Save the file and then re-import. It should work.


Offline mathsgeek

  • Newbie
    • Posts: 1
Hi,
I am running blender 2.63 and when I import a .md5mesh I get this:

...How do I fix this?

Thanks


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3145
    • KatsBits
The script isn't compatible with 2.63 iirc.. you'll need to use 2.61 or 2.62 and then open the import into 2.63. A bit of a bind to do but it works OK. Also, you may get some errors depending on what made the original MD5, it's a general import script so may not work on all manifestations of the format.