News | Forum | People | FAQ | Links | Search | Register | Log in
Modelling Help\Screenshots\Requests
It has always been difficult to get decent models for quake 1. So a thread where people can get advice on making models and post a work-in-progress for critiques is long overdue.

Any requests for models may well get met with silence. Specific requests will likely stand a better chance; "I'd really like a knight but carrying a shield" might be better received than "we need a mdler to join our mod remaking counter-strike for darkplaces".
First | Previous | Next | Last
@Preach 
I think I figured it out. Its to do with local origin placement. The object's local origin needs to be equal to global coord 0 0 0, the world origin in the editor. Any deviation from 0 0 0 will cause an issue when converted to mdl. Multiple mesh objects doesnt affect it. It all converts fine so long as I have an object origin of '0 0 0'.

Perhaps md3tomdl should check that the md3 origin value is equal to 0 0 0 and if not adjust each vertex by the origin amount to zero out the md3's origin before converting. 
Think I've Nailed It 
I spent a long time looking at the code that was working out the bounding box for the model, thinking that's where the wrapping was occuring. MD3 files can have a different origin in each frame (but rarely bother), so when you mentioned non-zero origin, I thought it might relate to that. But the bounding box code accounts for that already.

Then I realised that it wasn't an overflow, but an underflow! The bounding box was accounting for the frame origins, but the code that actually exports the vertices does not. I need to get a compiler installed on this new computer, then I'll try and bash out a fix... 
@necros 
Yeah i do and I dont use skeletal animation. It really depends on the model. For a very simplistic robot it doesnt make much difference. For a floating blob of goo: http://www.spriters-resource.com/resources/sheets/28/30623.png Theres really no better way. Anyways, it helps me keep to the original style by having fewer frames. 
Negative Scale 
Is a bitch. 
Think That's Fixed 
I'm gonna put a proper post on the blog later on, but for now grab the patched version

http://www.quaketastic.com/files/tools/windows/misc/md3tomdl-0.4.zip 
Works But... 
The mesh itself is healthy, but the offset from the origin is getting doubled. If the md3 is 16 units from the origin the mdl will be 32 units away (regardless of axis).

I noticed you added in " + f.org[0]" in mdlexport.cpp (line 215) which I'm assuming is what fixed the origin mix-up. See line 7 in md3import.cpp where you already added this to the frame.mins and frame.maxs... so is this doubling it?

Psst...if I don't actually even have any line for a skinfile in the compile txt then it crashes (yes I know I'm a basket case).
I'm thinking that writedummyskin(mdlfile) doesn't actually get called if skinfile == "". I guess it's something to do with !q1skin.height not being true in mdlexport.cpp->export_to_mdl{} (see Line 147)?

I'd try compiling it myself with some trial and error, but I haven't bothered to install any c++ IDE at the moment. 
... 
Thanks by the way! It's awesome to get such quick feedback. You're a real coding guru around here, it means a lot that you can do all of this. You're the best! 
Working Through It 
I'll try and fix all these things before I put 0.4 up. got a favour to ask first though: my tools don't ever create MD3s with an origin key to test, and I could really use a specific pair of models here. Could you send me two MD3 models, which are identical except for having different offsets? Like maybe 32 units from the origin on one, and 50 units on the other. It will make it easier to spot the doubling taking place. Thanks!

The skin issue is due to me failing to initialise some values properly, looks like it works in my local copy now! 
 
the 'q3_frame.org' field in the frame info is strictly a culling origin. apparently it can also be used for fog. It will not move the mesh up/down, unlike mdl.
using it to determine either the bounding box or the verticies is a bug. probably you should ignore it completely (in theory, you'll find a decent model has it set to the center of the frame's bounding box). 
@Preach Check Your Email 
 
Thanks For That Spike And Qmaster 
That would explain everything, the correct fix (deleting the org stuff from the bounding box, not adding it to the vertices) is in place and the robot now hits a minimum of -24, which I assume was the intention. Here's a link to the new 0.4 download, once I hear a thumbs up from Qmaster I'll update the blog.

http://www.quaketastic.com/files/tools/windows/misc/md3tomdl-0.4.zip 
Uh... 
I'm not getting any different results? Maybe you uploaded the wrong exe or something? I deleted all md3tomdl's on my end and redownloaded again, but it still doubles away from the origin, and there's still the wierd crash without a skinfile line (not that it matters much, I have skinned it now, but it's nice to have for robustness). I checked the source code that you provided and it looks like you fixed it for both cases, but the actual exe doesn't seem to have the changes?

Dunno what's up. 
Alright Althea 
I'm going to the source. I think Preach's program works fine enough for his workflow...it's blender's exporter that doesnt provide a similar md3 file. From what I've read, Pop'n'Fresh's md3 exporter for gmax determines the bounding box for each frame. I found the source code for it here: http://forums.duke4.net/topic/1065-md3-exporter-for-3ds-max-2010-x86-and-x64/ I'll check it out when I get a chance and compare it with the katsbits exporter for blender. I might have to modify the blender exporter to match the gmax one. Translating from c++ to python here so wish me luck. 
Wrong Datestamp 
I think the uploads might havegot mixed up, yes, try this one.

http://www.quaketastic.com/files/tools/windows/misc/md3tomdl-0.4.zip 
Thumbs Up! 
All good. Animation is working fine too so far! :) 
 
So what's the easiest path for someone who wants to make a static prop to get it built and into Quake in MDL format? I saw, to my surprise, that Milkshape is still selling full licenses (wtf?) and I'd like to stay legit if at all possible. 
Blender? 
I know Gb got a pipeline to get models from it into Quake. 
 
Oh neat, will check that out... 
 
http://quakeforge.net/ has a Blender plugin, taniwha is super nice and helpful in case it should not work. 
 
If you have Maya at home I've written some python doodads. They go through a hacked modelgen.exe atm but I'm planning on merging it with Preach's pymdl so it all works within Maya. 
 
The blender route seems the most sane at the moment ... I can still make the model in MODO and then just export/import into Blender and spit it out from there. I hope! 
Blender Is Your Best Bet 
Of course I'm totally biased toward blender but I'm biased for a reason, it's awesome. I was considering looking at creating a blender addon using Preach's qmdl python package since all of blender's addon's are scripted in python, but it currently has an md3 exporter which works nicely with Preach's md3tomdl, especially for static props (don't forget to unwrap them before using blender's md3 exporter! got my goat several times for that one) 
Seconding Taniwha's Blender 2.6x MDL Script 
Exporting directly to it just feels so... liberating. No annoying conversion pipelines in between, no messing with qME to import a skin, etc.


There's a MD3 script too, but it has a horrible 'auto-scale' which makes my models too big by default having to input the manual scale to 1.00001 every time to turn that off.


There's also a nice ASE exporter script for q3map2 use, however it shits the UV on certain turned edges. Trial and error for that 
Blender Direct To Mdl Export 
You know I started trying it and I'm hooked on direct export to mdl. The only thing I haven't figured out is how to get it to export in a different palette. No matter though since darkplaces has a skin override feature: mymodel.mdl_skin0.pcx 
Weapon Model Orientation Scale 
I'm hoping to avoid the time to trial and error....what axis should weapon view models look down?

And how should the view model be positioned relative to the origin? 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.