der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Fri Jan 13, 2006 7:34 am :
I didn't work on it that much yet, just got the skeleton export going but there's a problem with the orientation, maybe the same problem you mention.

I didn't update the mesh export section yet, it doesn't give an error but the exported meshes are empty, 0 vertices. If you can remember what you updated there, that would be cool.



der_ton@Posted: Thu Jul 31, 2008 11:49 am :
Importing a md5mesh only is possible, just don't fill in the md5anim field.

I don't get the second part of your post. Are you saying you put a md5mesh file into the md5anim field? That's what would cause such an error report.



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Fri Jan 13, 2006 7:34 am :
I didn't work on it that much yet, just got the skeleton export going but there's a problem with the orientation, maybe the same problem you mention.

I didn't update the mesh export section yet, it doesn't give an error but the exported meshes are empty, 0 vertices. If you can remember what you updated there, that would be cool.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



der_ton@Posted: Sat May 31, 2008 1:43 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

The script has been updated to 0.6 and supports importing of ETQW's MD5 Version 11 md5mesh and .animb files.
I just checked and it also works with the brand new Blender 2.46.

Someone with an account on the splashdamage forums, feel free to post a link there, an appropriate thread should already be there.



kat@Posted: Sat May 31, 2008 2:14 pm :
Thanks der_ton.. Has the exporter been updated? (that topic is a bit of a mess now)



Super Happy Cow@Posted: Sat May 31, 2008 9:55 pm :
http://community.enemyterritory.com/for ... post362020

Posted. ; ]



der_ton@Posted: Sun Jun 01, 2008 6:21 pm :
kat wrote:
Has the exporter been updated?
Not yet, sorry.



Super Happy Cow@Posted: Mon Jun 02, 2008 11:12 am :
Hey, quick question:

If I imported a mesh from ET:QW, edited it in blender with the strange way that the bones are placed and what not, if I exported them would the mesh be screwed up because of the way the bones were positioned?

Or does the angle positioning of the bones even matter, because I don't remember at all how it worked for Q4, it's been a while since I did anything with animation and this engine.



der_ton@Posted: Mon Jun 02, 2008 3:16 pm :
No it doesn't matter, you best leave the bones as they are if you want the newly created and exported animations to be compatible with the original md5mesh, or the newly created and exported mesh to be compatible with the original md5anims.



cuteunit@Posted: Tue Jul 08, 2008 10:49 pm :
I have both the export script and import scripts in my blender /scripts folder, but only the exporter script actually shows up... doom 3 MD5 is nowhere to be seen under Import. What's the issue?



der_ton@Posted: Wed Jul 09, 2008 2:43 pm :
In order to show up in those menus, a script has to have a special header. The exporter has one, the importer doesn't. I never access the scripts through those menus, so I didn't have my eye on that. You could copy this text into the start of the importer's .py file and it will show up.
Code:
#!BPY
"""
Name: 'Doom3 MD5'
Blender: 241
Group: 'Import'
Tip: 'Import md5mesh and md5anim files from a Doom3 engine game'
"""



cuteunit@Posted: Thu Jul 10, 2008 4:19 am :
Thanks a bunch! Blender's already one of those high-aspiring products that could really stand to use a few thousand dollars in usability testing like an Autodesk product, so anything to make it easier.

Did what I set out to do. Predator chaingun!

http://www.dropfiles.net//files/635/DOO ... -22-01.jpg
http://www.dropfiles.net//files/635/DOO ... -53-81.jpg



kissaki@Posted: Sun Jul 27, 2008 3:53 pm :
a way to only import the md5mesh would be cool,
without a md5anim file.

For me, on Blender 2.46 the import fails. With md5anim (converted from animb) and when using md5mesh as md5anim (to make it try import):
Code:
adding mesh 0 to blender
couldn't find [i]material[/i]
adding mesh 1 to blender
couldn't find [i]material[/i]
Traceback (most recent call last):
File: "<string>", line 1416, in handle_button_event
File: "<string>", line 1324, in load_md5anim
UnboundLocalError: local variable 'theanim' referenced before statement



der_ton@Posted: Thu Jul 31, 2008 11:49 am :
Importing a md5mesh only is possible, just don't fill in the md5anim field.

I don't get the second part of your post. Are you saying you put a md5mesh file into the md5anim field? That's what would cause such an error report.



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Fri Jan 13, 2006 7:34 am :
I didn't work on it that much yet, just got the skeleton export going but there's a problem with the orientation, maybe the same problem you mention.

I didn't update the mesh export section yet, it doesn't give an error but the exported meshes are empty, 0 vertices. If you can remember what you updated there, that would be cool.



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After tw



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.tiscali.de/der_ton/blender-md5importer.zip
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Thu Oct 21, 2004 8:57 pm    Post subject: MD5 Importer for Blender: http://home.tiscali.de/der_ton/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.tiscali.de/der_ton/blender-md5importer.zip
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.



Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! Mad
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5


Last edited by der_ton on Mon Jan 09, 2006 11:21 pm; edited 1 time in total



kat@Posted: Fri Oct 22, 2004 4:58 am    Post subject: : Cool to see this one final out of beta and appologies for not being around for final testing..!
_________________
Co-Admin - Modelling and modding tutorials and tips



8tintin@Posted: Wed Nov 03, 2004 7:40 pm    Post subject: : It works fine, thanks Very Happy

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am    Post subject: : I'm new to blender; how do you open the .tga file with the character's skin?


kat@Posted: Sat Nov 20, 2004 5:54 pm    Post subject: :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430
_________________
Co-Admin - Modelling and modding tutorials and tips



geppy@Posted: Sat Nov 20, 2004 6:11 pm    Post subject: : Thanks. Very Happy


Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm    Post subject: : Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am    Post subject: : Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am    Post subject: : Thanks, I'll take a look.


Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am    Post subject: : I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya Laughing

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am    Post subject: : The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""

_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm    Post subject: : I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show Laughing


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am    Post subject: : I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
           



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:12 pm :
the nmesh.nmesh.getVertexInfluences function is broken in 2.40 (a result of the new armatures,someone missed that since it was in the mesh code)

you need to create a table of the verts and their weights from getVertGroupNames, and getVertsFromGroup. It shouldn't be that complex, more or less:

Vert: name, weight, name, weight
Vert: name, weight, name, weight
Vert:
...

Someone posted the code somewhere on the blender python forums, but I can't seem to find it (I'm having bad luck with this lately...)



der_ton@Posted: Fri Jan 13, 2006 4:41 pm :
From elysiun.com, posted yesterday, Jan 10th:
Quote:
Hi we will have 2.41 out in a bit less than a week which is to fix API stuff among other things.

I'll wait until we have 2.41 then I'll continue updating the exporter.



PaladinOfKaos@Posted: Fri Jan 13, 2006 4:44 pm :
probably a good idea.

A bunch of the stuff will still probably have to be re-written, though.



chuckdood@Posted: Mon Jan 30, 2006 11:52 pm :
has this been updated to work with 2.41 yet?



der_ton@Posted: Mon Jan 30, 2006 11:56 pm :
No, seems like the skeleton import doesn't work in 2.41. I'll take a look in the next days.
In the meantime you can use Blender2.40 to import a md5mesh, then save as .blend and open with 2.41 to work on it with 2.41's features.



der_ton@Posted: Thu Feb 02, 2006 11:17 am :
My previous post was based on one single md5mesh that i tried to import but got no armature. Now I tried again with two md5mesh files and everything worked as it should. Might be that I didn't see the armature in my first test, or maybe it was some special md5mesh. So I think the importer is 2.41 compatible until someone proves me wrong. :)



der_ton@Posted: Mon Feb 20, 2006 7:48 pm :
It's updated and can now import animations! :)

I'm waiting for someone to load up all kinds of anims to offline-render a Doom3-cutscene in Blender.



mcbeth@Posted: Tue Feb 21, 2006 4:32 pm :
man you just made my day my max anim libs can now be brought into blender good work



Magnesius@Posted: Tue Feb 21, 2006 5:43 pm :
der_ton wrote:
It's updated and can now import animations!

I am curious. Currently, I am creating only static meshes for Doom 3 with Blender (it is going well, thanks to Kat!), and no MD5 models yet.
Is it possible with your import/export scripts to import a D3 model with animations, change the mesh and then export it - with the complete animation set - again to D3?



der_ton@Posted: Tue Feb 21, 2006 10:37 pm :
Yes but that was possible even before, without the animation import. You just change the mesh in any way you like (*without changing the skeleton*) and then export it to a new md5mesh with the same skeleton structure as the old md5mesh, and all the anims that were for the old md5mesh will be compatible with the new one.



doomkid3000@Posted: Sat Jul 01, 2006 5:27 am :
oh man this is soo great you guys,

its soo cool i can actualy see the animation frames being imported

it realy makes it easy to know the progress of importing a model

were with gmax you just sit there wandering if anything is happening

this is the greatest :)



fuag@Posted: Tue Aug 15, 2006 5:33 am :
I cant locate the script using blender 2.42a It doesnt show up in the import sections and I cant find it in the script window. :?



kat@Posted: Tue Aug 15, 2006 6:32 am :
Open a TEXT window and open the file like that. Move the mouse over the open script and then hit Alt+P. Chances are the script might not work for 2.42/a though



fuag@Posted: Tue Aug 15, 2006 7:33 am :
cool, tried it, doesnt work with 2.42a, np though, if i really need it I'll install an older version



kat@Posted: Tue Aug 15, 2006 7:35 am :
Definately works with 2.41 as I've used in on that one.



Tigre@Posted: Sun Jan 07, 2007 2:35 am :
ah that makes sense why I do not see anything, I got 2.42a plus I am a total noob as today is my first day.

der_ton can you please label the link with the supported version. :oops::):D



der_ton@Posted: Sun Jan 07, 2007 12:50 pm :
The 0.5 Version that is linked to in the first post of this thread works with Blender2.42a. :)
If you're not seeing your imported model, maybe the animation you loaded puts its origin far away, beyond Blender's rendering clip range (which isn't very wide). Bringing the scaling slider down to the minimum might help, or leave the animation field blank to see if the mesh import works at all, because an imported mesh will be in the center of the coordinate grid. Also, the script doesn't like it when you import a second model right away without closing the script inbetween ("quit" button), sorry.



Tigre@Posted: Mon Jan 08, 2007 4:32 pm :
OH thx der_ton. Like I said I am new to blender so I will read the help files or the offline manual to get it working. Sucks not having a online connection at home.



motorsep@Posted: Wed Jan 31, 2007 1:14 am :
der_ton,

MD5 importer doesn't work with current Blender CVS builds. Would you fix it please?
(I haven't tried exporter, but it might be broken too)

EDIT: Sounds like it is Python API bug, so let's wait and see what will happen when they fix it ;)



der_ton@Posted: Wed Jan 31, 2007 12:26 pm :
Yeah I never make adjustments to make it compatible to CVS versions. I'll make it compatible with release versions only, and only after they release documentation to the current Python API (anything else is a waste of time, especially because you can always use the old Blender for importing the md5, and then save, and open that .blend in whatever new version you use).

But thanks for trying it out and letting me know. :)



ajm113@Posted: Tue May 01, 2007 12:50 am    Post subject: : I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! Wink
_________________
Signatures R 4 Wimps!



der_ton@Posted: Tue May 01, 2007 9:07 pm    Post subject: : The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



ajm113@Posted: Tue May 01, 2007 11:27 pm    Post subject: : Let me know when to change the url when you can and I'll fix it.
_________________
Signatures R 4 Wimps!



ajm113@Posted: Tue May 01, 2007 12:50 am    Post subject: : I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! Wink
_________________
Signatures R 4 Wimps!



der_ton@Posted: Tue May 01, 2007 9:07 pm    Post subject: : The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.
_________________
Staff
Modelviewer | 3DSMax<->MD5 | Blender<->MD5



ajm113@Posted: Tue May 01, 2007 11:27 pm    Post subject: : Let me know when to change the url when you can and I'll fix it.
_________________
Signatures R 4 Wimps!



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



ajm113@Posted: Tue May 01, 2007 12:50 am :
I posted your plugin on my site just to let you know.

Your Plugin

Thanks for the plugin man! :wink:



der_ton@Posted: Tue May 01, 2007 9:07 pm :
The script's description on your site sounds somewhat strange if you just copy'n'paste it from my writing.
The URLs of my scripts will change in some weeks because I'm going to change my provider. You're linking to the threads which will have the updated direct link, which is good, but the direct links on your site will be dead.



ajm113@Posted: Tue May 01, 2007 11:27 pm :
Let me know when to change the url when you can and I'll fix it.



kat@Posted: Thu Jul 12, 2007 12:41 am :
Can anyone confirm if the script works with Blender 2.44/Python 2.5.x? I tried it recently and it bottoms out with an error message (will copy/paste error message next time I run it).



Nenon@Posted: Thu Jul 12, 2007 12:38 pm :
It won't even show up in my import list in Blender 2.44



ajm113@Posted: Thu Jul 12, 2007 4:20 pm :
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?



kat@Posted: Thu Jul 12, 2007 6:53 pm :
ajm113 wrote:
Did you try making it into a .txt file and opeing it up in Blender's text editor then go under File->Run Python Script?
All you need to do is open up a text editor view and 'open new', just Alt+P to run them. They don't need to be renamed



chuckdood@Posted: Thu Oct 18, 2007 7:21 pm :
has this script been updated to work with blender 2.44? I'm eager to open up some of the files for quake4 (that's right, I just bought it 3 days ago for 15 bucks).



der_ton@Posted: Fri Oct 19, 2007 8:29 am :
To be honest I haven't even tried it out on Blender 2.44 yet... :oops: So I assume there were some API changes and it doesn't work? If that's the case I'll take a look and update it sooner or later. :)



chuckdood@Posted: Fri Oct 19, 2007 9:02 pm :
actually, it works great. I used it on some quake4 models. However, it's really slow if the animation has lots of bones. I loaded up the 4-arm model, and the associate md5anim file, which has 70 bones and 700+ frames. it took over 30 minutes to load it. The only thing I've noticed is that I have to quit and restart the script every time I wish to import a model. I can't import more than one model using the same script instance. I guess it only likes to let you open 1 thing, and then you gotta restart the script to open a 2nd.

but it's solid. solid piece of code there, der_ton. thanks again for making it available. It has helped me realize that most of the awesome animations for map objects were not scripted, but were animated (which took alot of *wow* out of the movements for me). so, perhaps I will attempt to change my robot from being scripted, to being animated..

chuck



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After tw



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After tw



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searchin



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After tw



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two



der_ton@Posted: Thu Oct 21, 2004 8:57 pm :
http://home.mnet-online.de/der/blender-md5importer.rar

Outdated info:
With a bit of a delay, finally here it is:
http://home.mnet-online.de/der/blender-md5importer.rar
Based on an importer by Bob Holcomb, that had the mesh import working. I modified it to handle MD5 version 10, and added the skeleton import (which turned out to be quite non-trivial) and vertex group generation.

It doesn't import md5anims currently.

How to:
Start the script, select the md5mesh file and press "Import".
After the import, the meshes will not be parented to the armature yet.
You have to do that manually since there is currently no way to
do that with a python script.
Parent it like this:
- select a mesh
- shift-select the armature (both the mesh and the armature should be
highlighted, but the armature has a slightly brighter color)
- press CTRL-P. Select "Armature" from the upcoming dialog, in the next
dialog press "Don't create vertex groups".
- repeat this for each mesh that the model consists of

If vertices don't move with the armature, you probably have forgotten to parent
the mesh to the armature.


Image
Hey, this isn't hell! What am I doing here? *scratches head*
Aw, look what they've done to my pants! :x



kat@Posted: Fri Oct 22, 2004 4:58 am :
Cool to see this one final out of beta and appologies for not being around for final testing..!



8tintin@Posted: Wed Nov 03, 2004 7:40 pm :
It works fine, thanks :D

A md5anim´s import would be very interesting.

Byes.



geppy@Posted: Sat Nov 20, 2004 5:45 am :
I'm new to blender; how do you open the .tga file with the character's skin?



kat@Posted: Sat Nov 20, 2004 5:54 pm :
geppy wrote:
I'm new to blender; how do you open the .tga file with the character's skin?
Have a read thru this thread as it outlines 'step by step' what you need to do to get a model into D3. There is a section in there though that runs you through how to assign a texture to a material and a material to a mesh.
http://www.doom3world.org/phpbb2/viewtopic.php?t=7430



geppy@Posted: Sat Nov 20, 2004 6:11 pm :
Thanks. :D



Dr Evanzan@Posted: Sun Jan 30, 2005 11:14 pm :
Hi,

Are there any plans to add importing of MD5Anims?

If not, is there any intermediary format I can export MD5Anims to and then import into Blender?

Thanks!



der_ton@Posted: Mon Jan 31, 2005 12:00 am :
Sorry, I'm not sure if or when I'll do that.

There's a BVH importer script by Bob Holcomb, that's a format used in motioncapturing mostly. If you can export your animation to BVH then you should be able to import it into Blender, if everything goes well.

Bob Holcomb's website is http://bane.servebeer.com/index.html



Dr Evanzan@Posted: Mon Jan 31, 2005 12:02 am :
Thanks, I'll take a look.



Johnny B. Goode@Posted: Mon Jan 31, 2005 12:51 am :
I downloaded the modelviewer, the import script, and the export script. The modelviewer works great btw. I unzipped the files and placed the scripts in blenders scripts directory. I created the PYTHONPATH variable and set targets accordingly. The export script shows up in the scripts window, but the import script doesn't. Has anyone else had this problem?

I'm running Blender 2.36 on a Windows XP Pro machine, with Python 2.34 installed to C:\Python23. I'd really like for this to work, that way I wouldn't have to try and learn maya :lol:

Any help is appreciated.

Thanks


Johnny



der_ton@Posted: Mon Jan 31, 2005 9:29 am :
The import script doesn't have the header info that is needed for Blender to recognize it and make it available through the menu.
You can either start it conventionally (open a text edit window in one of Blender's windows, load in the script and start it with Alt-P), or you can copy&paste this header in the beginning of the importer .py file. That should enable Blender to recognize it (I just whipped this up and didn't check):

Code:
#!BPY
"""
Name: 'Doom3 MD5 Import'
Blender: 235
Group: 'Import'
Tip: 'Import md5mesh files'
"""



Johnny B. Goode@Posted: Mon Jan 31, 2005 8:42 pm :
I tried the header but that didn't work, however, opening it up via the text window did work. Thanks for your help der_ton, and thanks for the scripts. Back to work, maybe someday I'll have something to show :lol:


Thanks,

Johnny



PaladinOfKaos@Posted: Tue Jan 03, 2006 5:10 am :
I just spent about an hour making this 2.4-compatible. Replace the section starting on line 508 (the armObj definition) until just before the
"#dump the meshes into blender" bit with:

Code:
        armObj = Object.New('Armature', tempstring)
        armData = Blender.Armature.Armature("MD5_ARM")
        armData.drawAxes = True
        armObj.link(armData)
        scene = Blender.Scene.getCurrent()
        scene.link(armObj)
        armData.makeEditable()
       
        for bone in md5_bones:
            print scale
            bone.blenderbone = Blender.Armature.Editbone()
            headData = Blender.Mathutils.Vector(bone.bindpos[0]*scale, bone.bindpos[1]*scale, bone.bindpos[2]*scale)
            bone.blenderbone.head = headData
            tailData = Blender.Mathutils.Vector(bone.bindpos[0]*scale+bonesize*scale*bone.bindmat[1][0], bone.bindpos[1]*scale+bonesize*scale*bone.bindmat[1][1], bone.bindpos[2]*scale+bonesize*scale*bone.bindmat[1][2])
            bone.blenderbone.tail = tailData
            if bone.parent != "":
                bone.blenderbone.parent = md5_bones[bone.parent_index].blenderbone

            #rotate the bones correctly through this HACK (yeah it's ridiculous ;)
            #could probably be optimized a bit...
            boneisaligned=False
            for i in range(1, 359):
                boneisaligned=False
                m = Blender.Mathutils.Matrix(bone.blenderbone.matrix)
                mb = bone.bindmat
                cos = vector_dotproduct(vector_normalize(m[0]), vector_normalize(mb[0]))
                if cos > 0.9999:
                    boneisaligned=True
                    #print m[0], mb[0]
                    break
                bone.blenderbone.roll = i
            if not boneisaligned:
                print "Eeek!! ", bone.name, boneisaligned
            armData.bones[bone.name]=bone.blenderbone
        armData.update()
        armObj.makeDisplayList()
        scene.update();
        Blender.Window.RedrawAll()


NOTE: the headData and tailData definitions need to be on one line, make sure they end up that way when you c&p from the post.

as best I can tell, everything works properly. I moved a few bones, and the mesh deforms properly (as best I can tell). If anyone sees any issues, I'll try to get them sorted out. I did just try to learn python, old blender armatures, and new blender armatures at the same time, after all.



der_ton@Posted: Sat Jan 07, 2006 10:16 pm :
Nice work, thanks!
I'll take a look at the new API and update the scripts soon. If your modification is kept you'll be credited ofcourse.
In the meantime feel free to offer the script with your modification as a download and post the link here.



der_ton@Posted: Mon Jan 09, 2006 11:20 pm :
http://home.tiscali.de/der_ton/blender-md5importer.rar

- works with 2.40, thanks to PaladinOfKaos
- parenting of meshes to armature is now done by the script, thanks to api improvement

The old version is in there too because Blender2.37 is still of use until the exporter is updated for 2.40 too.



PaladinOfKaos@Posted: Tue Jan 10, 2006 6:08 pm :
I've been trying to get the exporter going, too, but I've been having issues with the bones... The whole skeletal system probably needs to be re-written, preferably to take advantage of blenders built-in matrix and quaternion functions, since its already been written (blender and D3 use the same coordinate system, right?)



der_ton@Posted: Tue Jan 10, 2006 7:18 pm :
I'm going to look into that too. If you have any results can you send me what you have?



PaladinOfKaos@Posted: Tue Jan 10, 2006 11:12 pm :
I'll send you a copy as soon as I get home.

quick summary:
Bones export fine if roll is zero, any roll garbles the quaternion. It seems to be outputting the mesh fine, since a test with a non-rolled skelleton gave a fine mesh, but I haven't really looked at the mesh code, other than to change a couple of syntax differences, so I don't know for sure.



PaladinOfKaos@Posted: Fri Jan 13, 2006 1:22 am :
grr...

After two days of searching, I can't seem to find any of my modified versions of that script... I must have deleted them at some point...

Sorry



der_ton@Posted: Fri Jan 13, 2006 7:34 am :
I didn't work on it that much yet, just got the skeleton export going but there's a problem with the orientation, maybe the same problem you mention.

I didn't update the mesh export section yet, it doesn't give an error but the exported meshes are empty, 0 vertices. If you can remember what you updated there, that would be cool.