Page 1 of 2

Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Tue Feb 28, 2012 2:18 pm
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

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Tue Feb 28, 2012 6:55 pm
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.

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Tue Feb 28, 2012 7:02 pm
by Lishy
Will this work with Skulltag? I have some 3d models I want to work.

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Fri Mar 02, 2012 1:05 am
by Nero
:shock: It's like Christmas suddenly smacked me in the face again!

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Fri Mar 02, 2012 4:26 am
by Lishy
Can someone make a video tutorial or text tutorial? Please! Thanks!!

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Tue Mar 19, 2013 4:46 pm
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...

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Tue Mar 19, 2013 7:02 pm
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".

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Wed Mar 20, 2013 5:12 am
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.

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Wed Mar 20, 2013 6:02 am
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

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Wed Mar 20, 2013 6:17 am
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!)

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Thu Mar 21, 2013 6:34 am
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.

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Sat Mar 23, 2013 11:51 am
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.

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Mon Sep 23, 2013 2:13 pm
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. :?

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Fri Jul 04, 2014 2:25 am
by Galaxy_Stranger
TIMELINE!

This still work for 2.7?

Re: Blender 2.58a MD3 Exporter for GZDoom

PostPosted: Fri Jul 04, 2014 3:13 am
by Kappes Buur
Galaxy_Stranger wrote:TIMELINE!

This still work for 2.7?


Probably not.
You might want to check out this thread