Page 1 of 1

Converting models from early generation games for use in GZD

Posted: Mon Oct 15, 2007 13:29
by Rex Claussen
I've read posts about converting from MD2 format for use in GZDooM. However, I have not heard of any conversions from older games (such as Half-Life, which I believe uses MDL format?)

For a GZDooM project that I've been working on I have converted three Half-Life models into sprites, which are somewhat satisfactory. However, if it is possible to use converted models I think the project will shine. [Unfortunately, I'll still have to use sprites for many of the other actors, as otherwise there will be far too many models, and I'm not prepared to spend that kind of time.]

Do any of you guys [Nash, in particular] have any experience in converting older models into GZDooM format? If so, please give me some tips (or point me to some comprehensive tutorials). Thanks.

Posted: Mon Oct 15, 2007 13:56
by Nash
For the animated characters in HL (players, monsters), the .MDL format is really a COMPILED format that consisted of several .SMD files.

(For example, upon uncompiling the Barney player model, is it revealed that it was indeed made up of 134 .SMD files!)

I have not worked with HL or HL modding so I don't know what tools will let you retain the original animations from the HL models and convert the animations into MD2 or something else.

It sounds pretty complex because Half-Life uses a skeletal animation format for the models, after all. It's not as simple as frame (or state, if you will) based models like what Doom and the first two Quake games used.

As for the decorations... I really can't say. Again, I've never modded for HL, and I don't know what model format the props are in. If you can perhaps look into HL's data files and extract the props and tell me what format it is, then maybe I can think of something.

But for the animated characters, I'm afraid it's just too complex to convert into GZDoom. The hard way I can think right of the bat right now is to import the reference mesh (which means having to uncompile the .MDL first and wading through the several .SMD files) and then re-animating them from scratch manually. Too much work.

Posted: Mon Oct 15, 2007 15:38
by Rex Claussen
Yes, I agree that it sounds like too much work.

I have only used a model viewer [Jed's Half-Life Model Viewer v1.35], from which I have taken screenshots to create the sprite frames. I have not used a decompiler, as so far I have not had any need to do so.

I am only interested in a couple of models of animated characters (scientist, Barney), and not in any decorations. From what you describe, it seems like the process of (i) learning the precedures, (ii) extracting/decompiling, and (iii) manually reassembling the models will take too much effort. I'll have to be satisfied with sprites, then.

Thanks for the clear explanation, Nash.

Posted: Mon Oct 15, 2007 18:02
by Nash
It wouldn't be so bad if I can find an impoter plugin for 3ds Max that would allow me to import the SMDs into it while retaining the animation data, if that was the case I'd just import the SMDs into 3ds Max and export as MD3 (which I already have an exporter of) but to be honest I don't feel like looking for one right now (it has always been a difficult task to find working importers/exporters for a specific 3-d modeler... it took me ages to find a fully working MD3 expoter for 3ds Max for example!)

Posted: Fri Feb 06, 2009 23:58
by Rex Claussen
My apologies for bumping this very old thread.

Nash & others: The discussion here has been focused on animated models (enemies, etc.) What about static models (such as weapons, battery packs, health packs, etc.)? The reason I bring this up is that I read about MilkShape being able to convert from .mdl format to .md2/3 formats. Before I install it I want to make sure that it will be as simple as extracting the original model and converting it to the new format (including properly mapping the skins).

Posted: Sat Feb 07, 2009 0:33
by Enjay
I have tried with a handful of HL static models and pretty much failed miserably. :( I managed to decompile the models (IIRC) but then I failed to get MilkShape to make anything meaningful of them after that. Again IIRC, it simply left me with a blank editing space when I opened the files.

Posted: Mon Feb 09, 2009 15:42
by Rex Claussen
Enjay wrote:I have tried with a handful of HL static models and pretty much failed miserably. :( I managed to decompile the models (IIRC) but then I failed to get MilkShape to make anything meaningful of them after that. Again IIRC, it simply left me with a blank editing space when I opened the files.
I have been exchanging PMs with Dan "Tormentor667" Gimmer on the ZDooM forums, and he told me he had successfully used MilkShape to convert one static model. I have asked him for a step-by-step description of his approach, and when he replies I will post it here.

EDIT: Here is a brief tutorial on converting .mdl format models to .md2 format.

Posted: Mon Feb 09, 2009 16:33
by Enjay
Thanks. That was basically the procedure that I followed but I didn't get very far. I was able to decompile the MDL file but when I tried to import the decompiled model, MilkShape would go through the motions of looking like it was going to import the model but then nothing would appear in the edit windows. It was just as if I hadn't imported anything. ie, no mesh or anything appeared.

Posted: Mon Feb 09, 2009 16:48
by Tormentor667
@Nigel - Make sure to get the reference file first before you start to load the animations themselves.
Rex Claussen wrote:[..] and he told me he had successfully used MilkShape to convert one static model.
That's a bit of an understatement, I actually converted a complete animated actor ;)

Posted: Mon Feb 09, 2009 17:28
by Enjay
See, that's the odd thing. I could get it to load an animated actor, but the static actors didn't import. :?

Posted: Mon Feb 09, 2009 17:58
by Rex Claussen
OK. I heard back from Torm, and here's a link to a very well-explained tutorial.

Posted: Mon Feb 09, 2009 18:13
by Enjay
Go back to Milkshape. Go to File->Import->Half-life SMD. Find the one that is named something mentioning "ref" or "reference". If there is only one smd, then open that. If you are unsure, then just go through any smds there are until you find the one.
I'll have to reinstall HL to try this, so it will be a while before I get around to it, but that step is exactly what I was doing, and it's the one that failed on all of the models that interested me the last time I tried. :?

Posted: Thu Feb 12, 2009 8:46
by Tormentor667
Does anyone of you have some more experience with MD3? I ran into a problem while exporting to MD3s in Milkshape if the resulting files get larger than 4,0 - 4,2 MB (mostly depending on the amount of polys and animations), and that kinda sucks, as some of the real interesting actors often lots of frames for animations.

Has anyone encountered that before? Or does anyone know how to efficiently decrease the file size without loosing any animation frames?

I am still not perfectly sure about that issue, but the size seems to be the reason for Milkshape crashing with a fatal error.

@Enjay - I also found out that this tutorial is much more difficult on player models as it is on simple actors (enemies and stuff), but if you need help, I also managed to convert a player model to a player skin, so just let me know :)

Posted: Thu Feb 12, 2009 18:58
by Nash
Pulled from some MD3 specs I found...

Maximum polys: 8192
Maximum frames: 1024

Have you reached this limit?