Blender 2.58a MD3 Exporter for GZDoom

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
MaxED
Posts: 2246
Joined: Tue Feb 28, 2012 12:55 pm

Blender 2.58a MD3 Exporter for GZDoom

Post by MaxED »

Original script by Xembie, PhaethonH, Bob Holcomb, Damien McGinnes, Robert (Tr3B) Beckebans.
Modified by MaxED.

WARNING: This script is outdated. MD3 Exporter script for Blender 2.63+ is avaliable here: http://www.katsbits.com/tools/

What it is:
It's a modified version of MD3 Exporter v1.4, which allows to export animated models from Blender for use with GZDoom (perhaps with other source ports, which support md3 models, but I haven't tested that).

New features:
1. Offsets of objects are now exported correctly (object's origin don't have to be at 0,0,0 now).
2. Rotations of objects are now exported in a format GZDoom expects them to be.
3. No need to add "md3shader" custom property to objects (since it's not used in GZDoom).
4. New option "Convert quads to tris".

Requirements:
Blender 2.58a or newer (tested with Blender 2.62).

Installation:
1. Copy "io_mesh_md3" to "Blender/2.XX/scripts/addons"
2. Enable addon in User Preferences -> Addons -> Import-Export -> MD3 for GZDoom (.md3)

Usage:
1. Set correct start/end frame
2. Select you'r model part(s)
3. File -> Export -> MD3 for GZDoom (.md3)

Download it here

Original script can be found here
Last edited by MaxED on Wed Feb 27, 2013 9:11 am, edited 2 times in total.
User avatar
chopkinsca
Posts: 1325
Joined: Thu Dec 11, 2003 5:03 pm

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by chopkinsca »

MaxED wrote: 3. No need to add "md3shader" custom property to objects (since it's not used in GZDoom).
Figuring this out on the outdated script stumped me for hours. Such a simple thing, but easy to overlook. Good to see it works without it now. I'll have to update my script, as I use Blender.
Lishy
Posts: 32
Joined: Tue Mar 22, 2011 5:20 pm

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Lishy »

Will this work with Skulltag? I have some 3d models I want to work.
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Sarah »

:shock: It's like Christmas suddenly smacked me in the face again!
Lishy
Posts: 32
Joined: Tue Mar 22, 2011 5:20 pm

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Lishy »

Can someone make a video tutorial or text tutorial? Please! Thanks!!
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Nash »

Hey Max, any plans to update your version of the script to work with Blender 2.66a?

Also, I don't know if it's just me but I tried the script from http://www.katsbits.com/tools/ (since your version doesn't work with 2.66a) and it seems that MD3s exported from their script ends up being really large in size? :S

Too bad I already uninstalled my entire 3ds Max pipeline so I can't compare the exported MD3 file sizes between Blender and Max but it really looks to me that the files exported with the Blender script have bloated file sizes...
User avatar
MaxED
Posts: 2246
Joined: Tue Feb 28, 2012 12:55 pm

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by MaxED »

Nash wrote:Hey Max, any plans to update your version of the script to work with Blender 2.66a?
No. Current version from katsbits.com seems to work fine.

About scale. Just open "io_export_md3.py" (the one from katsbits.com) with notepad and change line "MD3_XYZ_SCALE = 64.0" to "MD3_XYZ_SCALE = 1.0".
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Nash »

Ahh thanks. Anything else I should change to make my models GZDoom friendly? With my Max tools back then, I always had to edit the MD3 after export because it's in the wrong rotation angle, etc.
User avatar
MaxED
Posts: 2246
Joined: Tue Feb 28, 2012 12:55 pm

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by MaxED »

Have no idea about Max (I use Modo), but here's how it should look in Blender:
arrow_blender.jpg
arrow_gzdb.jpg
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Nash »

That was precisely the problem I had with Max.

For Blender, the green line (Y axis) is actually supposed to be the direction facing the front:

Image

By following your screenshot, pressing the "Numpad 1" hotkey will actually show the arrow's side, not the front. In my model's case, switching to Blender's front view will show the monkey from the side.

Anyway, it's not that big of a deal; I will just do my work as normal, and before export, I will just rotate everything to match your screenshot. :)

(It would be great to fix it in the script though!)
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Nash »

I figured out why the script is exporting bloated MD3s:

By default, a Blender file has 250 frames of animation. If you leave this alone, the script will export an MD3 file containing 250 frames of animation, regardless of whether the object was actually animated or not.

For modeling static objects, you should change the total frame count to 1. For those who don't know how to do this: at the bottom of the UI is the animation timeline. You will see something that says Start: 1 and End: 250. Change the "end" value to 1.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Nash »

Just discovered an annoying behaviour with the script at KatsBits:

When you export anything out of Blender, it will scale down the object to match dimensions of the default Blender cube.

I tested by making the following cubes (in Blender units):

2 x 2 x 2 (default)
16 x 16 x 16
1 x 1 x 1

When exported as MD3 format and brought into GZDoom, they all appear to take the scale of the default Blender cube. It doesn't matter, even if I made a 256 x 256 x 256 cube in Blender, when exported, it retains the default 2 x 2 x 2 size.

I tried without and with "Apply Scale" (select the object in Object Mode, press Ctrl + A and choose Apply -> Scale)... regardless of whether I applied the scale or not, none of these seem to fix the problem.

Applying the change in the .py script for MD3_XYZ_SCALE = 1.0 just makes things worse - the exported model becomes very tiny in GZDoom (you can't even see it unless you look really hard).


Does this happen for you, MaxEd?


I fixed this behaviour in the script. I also made several changes here and there that it deserves a new thread. I have also renamed the script to "GZDoom Export" since it has changed so much and cannot be used as a generic Quake MD3 exporter anymore.
User avatar
Logan MTM
Posts: 678
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Logan MTM »

I follow all steps e doesn't work! :(

I think a good soul shoud create a full tutorial of how to do this crappy. This is a very importand feature.

Noobs need help. :?
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Galaxy_Stranger »

TIMELINE!

This still work for 2.7?
User avatar
Kappes Buur
 
 
Posts: 4114
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Blender 2.58a MD3 Exporter for GZDoom

Post by Kappes Buur »

Galaxy_Stranger wrote:TIMELINE!

This still work for 2.7?
Probably not.
You might want to check out this thread
Locked

Return to “Editing (Archive)”