And A Post With Content...
#1 posted by Preach on 2009/05/17 18:54:50
I tried to keep the title post nice and short in the hope that this thread is as long lived as the coding one. So here's a slightly longer one with more information (and also more of my opinions you've heard three times before)
The mdl format was one of the first 3D model formats for games, and naturally is a little less advanced than anything seen today. Here's a rundown of the most important mdl limits:
1000 vertices
2048 triangles
256 frames
The other important limitation of the mdl format is that the vertices are stored with a precision of 8 bits per coordinate axis. The vertices are in effect "snapped" to a grid of 256x256x256 points. This means you can't create intricate detail in your model without it being lost when it moves. It is worth noting that the origin and spacing of this grid can be specified, so the level of detail which can be retained is relative to the overall size of the model.
Editing
One of the greatest barriers to making models for Quake 1 is the lack of good tools. The best tool which works with .mdl format natively at the moment is QMe. You can grab the full 3.0 from:
http://www.fpsbanana.com/tools/2544
and you can upgrade it to version 3.1 with the patch in
http://www.xs4all.nl/~renep/quakeme/qme31_p2.zip
Although QMe is useful for this reason, I'd personally recommend working with the mdl as little as possible. It is generally easier(in my opinion) to create your model in another format entirely, preferably one with a powerful editor which saves the vertices at high precision. Then just export the model to mdl each time you want to test it, much like you compile a new copy of the BSP each time you add to a map.
QuArK ( http://quark.planetquake.gamespy.com/ ) also handles .mdl format natively, as well as other more popular formats such as MD3. I've never been able to use it for any serious editing, but found it a useful tool for converting file formats. So it sits somewhere between working directly with the .mdl and just a waystation for converting files.
If you work in Maya, you are fortunate to have the most direct route to export to .mdl. Lunaren has written:http://lunaran.com/files/lunmodelgen.zip
One package which handles everything directly!
If you work in Blender, you can give a script for exporting to mdl directly a go:
http://www.btinternet.com/~chapterhonour/mdl_export.py
I wrote it a while ago, for blender 2.4.4, and I don't intend to ever revisit it. But it's written in python, so it should be straightforward for people to modify themselves. Alternatively, you can export your model to MD3, using either http://tremx.svn.sourceforge.net/viewvc/tremx/trunk/blender/
or http://cube.wikispaces.com/MD3+Export+From+Blender+Tutorial
Once you have an MD3 of your model, you can run it through QuArK to convert it to mdl. Alternatively (blowing my own trumpet here) you can use "MD3 to MDL"
http://www.btinternet.com/~chapterhonour/md3tomdl.zip
This is my new work in progress, and I welcome any feedback on it. It's a simple command line tool, requiring only a short text file and an MD3 to work from. I'm planning on extending the control file format to include things like model flags, multiple skins, named frame ranges and stuff, so suggestions of what could be useful will not go ignored.
Since MD3 is so well supported amongst editors, you can use the above to get to .mdl format from most major 3d modelling packages. If you don't have any of the more expensive programs (like me), then you could do a lot worse than getting a copy of Gmax. It's a stripped down version of 3d studio max intended for making gaming models, and it's free. Official support for the idea ended a few years ago, and http://www.turbosquid.com/gmax took over distribution. Make sure you also download the Tempest Game Pack, to get the md3 export you will need. Personally, I can't do without gmax...
This thread is pretty much a continuation of http://www.celephais.net/board/view_thread.php?id=60262 , a thread I'd forgotten about until I started researching for this post. Hopefully putting all this information at the top of the thread justifies starting a new one.
Finally, if the low polygon requirements of Q1 seem constraining, take a look at:
http://boards.polycount.net/showthread.php?t=41232
The things some of those posters do with 500 polys are just amazing.
Good Thread
#2 posted by ijed on 2009/05/17 19:03:35
I Like How My Browser Autocompletes Arrrgh As A Post Title
#3 posted by Preach on 2009/05/17 20:05:06
Lunaren's mdl export is at http://lunaran.com/files/lunmodelgen.zip
I previewed to check which links worked, and then messed up actually fixing that one.
Also, to get the ball rolling on actual models, here's a pair of screenshots of the ogre I made ages ago based off metlslime's drawing:
http://www.btinternet.com/~chapterhonour/ogrescr1.jpg
http://www.btinternet.com/~chapterhonour/ogrescr2.jpg
Last time I posted it, it didn't have any blood splatters, and that criticism has been answered. One of the reasons the first version lacked them was that the entire skinmap was mirrored, and so any blood splatter on the chest ended up looking like a rorschach blot. So I carefully unmirrored a few polys here to do the chest.
The other reason I hesitated to do it before is because quite a few of the original id models rely on excessive amounts of blood to mask horrible UV failures. I wanted to make sure this model didn't do that anywhere, which is why the blood is a bit restrained. Hopefully he still looks like a butcher!
I Must Say
#4 posted by meTch on 2009/05/17 21:22:14
that ogre looks awesome,all it needs is a small amount of blood specks and splashes on its clean face and it will most likely be a widely used replacement
#5 posted by madfox on 2009/05/17 23:48:46
Thanks for the toppic.
After my own experience with quake models I must say you skinned the Orgue well. In the overall making of models I find the texture part the hardest.
I must admit that if i hadn't had Quark4.07 I couldn't change the dimensions of the model, nor manipulate groups of vertices.
One of my greatest concerns of QMLE is the texture part.
What do I do with tex triangles that are mirrored after imported in Qmle?
If I delete the triangle and patch the vertices again the triangle:
comes back with the same texture, so it's useless work
comes back with a extensive texture subdividing, so texturing can only be done by percisely following the lines untill they make squares.
Mirrored Trick
#6 posted by Preach on 2009/05/18 00:37:22
Here's how I avoid the problems with the mirrored textures in qme: I don't use qme for that model - at all!
Now this is something I'd like you to try MadFox. Have a go at making a quake model without using qme, and see how it goes. If you don't like it, then that's fair enough. But based on the problems you've posted, I think you will like it.
Ha!
#7 posted by madfox on 2009/05/18 01:52:15
feels like asking how to learn riding a bike,
and then say don't use the bike. Start walking.
^^
I don't make the model with Qmle, I'm glad I can import them into Qmle with 3DS files. This goes with an animation programm which is more specificated. I have to change the export to one patch per polygon.
And as it only goes with squads, all triangles get doubled.
Then I'm confronted with importing the New Model from frame.
Saving this first frame also makes my skin frame.
Then I have the choise to turn this first 3DS frame by changing the skin adapture. According the import file it will be a front sight or a side one. So when a triangle gets mirrored I'm delivered to Qmle weary workarounds.
I already tried other ways, but the thing that knocked me out was the import/export to Max3D.
Everytime I seem to get two vertices more by exchanging.
Just Make Sure
#8 posted by inertia on 2009/05/18 03:49:10
to put it under a restrictive license.
#9 posted by madfox on 2009/05/18 04:04:15
Do you mean Qmle or Max3d?
Here's a new version of my Granito monster.
The first one was rather blocky.
http://members.home.nl/gimli/granito.gif
#10 posted by Trinca on 2009/05/18 12:27:56
still need many fixes but is looking great!
I Don't Wanna Be A Candidate For Vietnam Or Watergate...
#11 posted by Preach on 2009/05/18 20:16:03
feels like asking how to learn riding a bike,
and then say don't use the bike. Start walking.
But the bike keeps crashing, mostly because it has bent wheels, no handlebars and a loose chain. Under those circumstances anyone would recommend you try walking!
I don't make the model with Qmle, I'm glad I can import them into Qmle with 3DS files. This goes with an animation programm which is more specificated. I have to change the export to one patch per polygon.
And as it only goes with squads, all triangles get doubled.
Yes! The point at which you start importing the frames into qme is the point where the problems arise. This is what I'm driving at. You can avoid that problem by creating an mdl with all the frames in first, and then open it in qme.
I'm not saying it's impossible to make a model importing it frame by frame in qme. But if you import frame 1 into QMe, then change the original model, then try to import frame 2 from it, then it's very likely to fail. The import system from QMe just isn't designed well enough to do that(if indeed such a thing could be made).
The only reliable method is to re-export all the frames from the latest version of the model, and import them into a fresh qme file. Since then you need to scale them all, reimport the texture each time, etc - EVERY TIME the source model changes, it becomes a huge hassle. But if you stick with just QMe for the conversion, it's what you must do.
Pro Tip: GLQuake Flood-fills Skins
#12 posted by metlslime on 2009/05/19 00:19:43
this has bit me in the ass twice, once a few years ago, and then it happened again until i realized what was going on:
If you are modelling something like a laser or fireball or something, the temptation is to just fill the entire skin with the color or pattern that you want to use as a texture. The problem is, glquake and most variants will flood fill black into whatever color is in the top left corner of your skin. So if your blue laser has blue all the way to the corner, that blue will turn black and you will be saying WTF when you see it in the engine.
Fix: for solid-colored skins, put a single black pixel (or other un-used color) in the top left corner.
Errata
#13 posted by madfox on 2009/05/19 00:53:30
Trinca, thanks, but explain me the need of fixes.
Preach, don't care my foolish waistblam, it was just the first thing that came up to me. Being modelling so long on my own way made me more curious to other ways.
Hassling the first frame is because I want to have a good skin.bmp
When the basemodel is imported it can be on different sides. At that point my model is already done. So I can import them as one load, and the only problem I reach is some verticemeshes. The way I described it was somehow confusing. My fault.
Something else got my attention in trying to avoid the mirrored texture.
When I delete a triangle in Qml and add a new one the original count gets different. This seems odd as logically this shouldn't be so.
After that I can't add frames to the original.
But when the model is full of frames, these changes don't seem to bother.
Triangles And Verts
#14 posted by Preach on 2009/05/19 01:36:41
The reason why you can change triangles like that is because the first frame you import to qme is given special treatment.
When the first frame is loaded, the program loads the triangles and the vertices. The vertices are assigned numbers as they are loaded, and the triangles are recorded as sets of three numbers, each number corresponding to one of the triangle's vertices.
For all the subsequent frames, the triangle information is entirely ignored. All QMe does is load the first vertex from the file, and move vertex 1 to it's location, then load the next one, and so on. The list of triangles from the existing model is always used. You could import a frame from an entirely different model, as long as it had the same number of vertices.
The obvious danger is that your modelling program might not always export the vertices in the same order, particularly if you change the model somehow between two exports. This is how triangles can start to go astray. There's no way to control this kind of thing, which is why the import process can get frustrating. As far as the exporting 3d package is concerned, one ordering of the vertices is as good as another. But for the import, it's the only important thing!
|