KatsBits Community

Game Editing => Scripts & Support => Topic started by: ShinAli on February 01, 2012, 08:55:37 PM

Title: [MD5] IMPORT for Blender 2.6
Post by: ShinAli on February 01, 2012, 08:55:37 PM
Alternative local download
 - MD5 IMPORT script for 2.61 (https://www.katsbits.com/files/md5/io_import_md5.zip)


[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 (http://scisbot.com/blender26md5importer.zip)
Title: Re: [MD5] Import for Blender 2.6
Post by: kat on February 01, 2012, 10:30:48 PM
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)
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: renderluz on February 17, 2012, 05:12:05 PM
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?
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: trebor on March 28, 2012, 12:06:38 PM
Very nice. I just wanted to start writing new md5 importers and this saved me a lot of work. Thanks :)
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: robertzoone on June 22, 2012, 12:15:36 AM
Someone can reupload?
I can't download it
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: kat on June 22, 2012, 12:21:09 AM
Click the mirror link.
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: robertzoone on June 22, 2012, 12:50:05 AM
Why when I import md5 model I got error?
Use Blender 2.61, 2.62 and nothing.

(https://www.katsbits.com/community/proxy.php?request=http%3A%2F%2Fi.minus.com%2FidlveMEszvSrt.jpg&hash=d3c02cad07d0e904dcffb8220939d7381845ee03)
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: kat on June 22, 2012, 02:53:49 AM
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.
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: robertzoone on June 22, 2012, 02:18:24 PM
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.
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: kat on June 22, 2012, 03:42:24 PM
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
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: kat on June 22, 2012, 06:08:51 PM
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.
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: mathsgeek on July 04, 2012, 03:37:29 PM
Hi,
I am running blender 2.63 and when I import a .md5mesh I get this:
(https://www.katsbits.com/community/proxy.php?request=http%3A%2F%2Fdl.dropbox.com%2Fu%2F39327895%2Fscreenshot.png&hash=87b13aa1a958207c8bb3f29677bcfffe854c51a0)
...How do I fix this?

Thanks
Title: Re: [MD5] IMPORT for Blender 2.6
Post by: kat on July 04, 2012, 04:00:14 PM
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.