Page 2 of 5

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Fri Mar 29, 2013 8:44 am
by Nash
Enjay wrote:I meant to attach this earlier and just didn't.

http://www.mediafire.com/download.php?9klk7ja169bljkr

It may be useful for illustrating the scaling thing that Nash and I were discussing.

Image

Its a map and a simple box model. The box, according to the model editor, is 128x128x128. It has been used for two actors. In one actor (using the Baron marble face texture as a skin) it has a scale ratio of 1.0 1.0 1.0. The same model is used again with a ratio of 1.0 1.0 1.2 and uses the other (archvile?) marble face. In the map there is a box made from sectors that is 128x128x128 Doom units and has the pentagram marble face on it. In the map you can see that both models match the width and length of the Doom sector boxes but the 1.0 scaled Baron one is shorter whereas the 1.2 scaled archvile(?) one is the same height as the sector box.

The model-based actors have been left as non-solid so that you can wander around more freely looking at stuff. You can also see some nice z-fighting on the inside of the box. :P

Yes, and the code responsible for the short Baron box is - as demonstrated a few posts back - inside gl_models.h. I don't know why it's doing that, but that's the way it is. So to counter that, a Z ratio of 1.2 has to be applied in the actor's MODELDEF.

Interestingly enough, if you mod the GZDoom viewport renderer to draw square pixels (gl_scene.cpp), the 128x128x128 sectors (the one with the pentagram) will look perfectly square/cube, BUT the Baron box model will STILL be squashed.

So the conclusion here is that the code that draws models in GZDoom is working independantly of the viewport renderer.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Fri Mar 29, 2013 8:49 am
by Enjay
I haven't got around to trying a modified gl_scene.cpp myself yet but your conclusion is an interesting finding.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Thu Apr 18, 2013 1:49 am
by Nash
Just a small bump. I discovered that the object cannot exceed 511 Blender units or the exporter will fail. So to create really large objects (like mountains, etc)... just be sure the dimensions do not exceed 511 Blender units in all axii, export, then scale it up in MODELDEF. I tried taking a look at the scripts but haven't figured out how to fix this. It's apparently a limit with one of the data structures used in the whole thing (SHRT_MAX?) and I don't think it's fixable from the script.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Thu Apr 18, 2013 2:56 am
by LilWhiteMouse
Nash wrote:Just a small bump. I discovered that the object cannot exceed 511 Blender units or the exporter will fail.
Is this perhaps a MD3 limitation? I can't speak for Blender, but saving a model that exceeds that limit in Misfit Model 3d as an MD3 screws up the vertexes.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Thu Apr 18, 2013 3:20 am
by Nash
If that happens with models exported from Misfit too, then that may very well be the problem then.

Re: [GZDoom/Blender] Size Reference Template

Posted: Thu Apr 18, 2013 5:28 am
by Gez
Nash wrote:The code that renders the pixels to the screen, and the one that draws the models are separate.

You can try this yourself. To get the renderer to draw 1:1 pixels in the viewport, open gl_scene.cpp, look for #define RMUL (1.6f/1.333333f) and change it to #define RMUL (1.0f)

Now you will have 1:1 scaling in the 3-d view, but the models are still being squashed vertically in gl_models.h
The latter is there to compensate for the former. In technical terms, this is what people in the know refer to as a "hack". :P

Looking at Enjay's screenshot, the midgety Baron face in the marble row is the only one that is visibly square.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Thu Apr 18, 2013 4:52 pm
by leileilol
The size problem is a limit of the MD3 format intended for more precision.

Also don't worry about trying to satisfy this for Quake editing - the 2.6x MD3 export lacks empties for tags support and is more annoying to use. I still have 2.49 installed for MD3 exporting with a special edited version of the MD3 script that truncates .001's etc for LOD meshes.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon May 20, 2013 8:46 pm
by Virgil
I still plan to revisit the GZDoom engine for map design, so I am very much interested in this. However...

I can't download any of the scripts/files, because the links are dead. :(

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon May 20, 2013 11:05 pm
by Nash
DRDTeam is currently down. They will be back online soon.

note t self: read the documentation from script author regarding scale http://forums.duke4.net/topic/5358-blen ... _p__124627

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Sun Jul 07, 2013 2:15 pm
by Nash
Thanks to NeoHippo for uploading these to MediaFire

http://www.mediafire.com/download/tly76 ... _Export.7z

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon Sep 02, 2013 12:16 pm
by NeuralStunner
Just tried this out yesterday (in Blender 2.68a) and it worked great! I managed to make, map/texture, rig/animate and export a model, and got everything working right in GZDoom. :)

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon Sep 02, 2013 2:12 pm
by Nash
Oh it works in 2.68a, great. I haven't updated yet.

Just don't make your model too small (or its vertices will deform) and don't exceed 511 Blender units in any axis and you'll be fine. If you need to make really huge objects in GZDoom, scale it up using MODELDEF.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon Sep 16, 2013 12:58 pm
by Battlelord
hallow everyone
I have uses blender 2.63 with (io_exporter_md3 2.63) to exports md3 model. the models exported succesfully only when It's rigid, but when I tried to export any part of model which is movable with a frames an error heppened as well the Image will show up ..... any Ideas :? ?

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon Sep 16, 2013 1:52 pm
by Nash
Post the problematic .blend file please.

Also: this thread is about the GZDoom exporter, not the generic MD3 exporter. I don't have any experience using io_export_md3.py.

Re: [GZDoom/Blender 2.66a] MD3 Export, Size Reference Templa

Posted: Mon Sep 16, 2013 3:15 pm
by Battlelord
Also: this thread is about the GZDoom exporter, not the generic MD3 exporter
what is the gzdoom exporter using for? Md3 exporter case is most important case of gzdoom exporter
Allright here is file.blend
http://www.mediafire.com/?d2gyg61v3530q11