Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

.MDL Creation solution for Linux? Goto page 1, 2 Next

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
dayfive Joined: 10 Nov 2006 Posts: 77 |

Posted: Sun Apr 29, 2007 2:45 am Post subject: .MDL Creation solution for Linux? |

Hi guys, At present is there any good software that works in Linux that can be used for explicitly creating Quake 1 .mdl files? I notice Blender3d can save as .md2, and I've used qME on Windows, but I'm wondering if there's something specific for Quake 1, like qME for Linux.
Alternatively, is there any user who has like a Python script for converting a Blender model to .mdl format with all of the special flags (rotation etc)? How good is converting to .mdl from .md2 created in Blender?

Back to top |

HeadThump Joined: 14 May 2006 Posts: 74 Location: Zin |

Posted: Sun Apr 29, 2007 3:07 am Post subject: |

What is happening to the word 'solution' over the past few years? I barely recognize it any longer. Anyway, this topic should help: http://forums.inside3d.com/viewtopic.php?t=654 Preach has made a exporter for the mdl format for Blender.

Back to top |

dayfive Joined: 10 Nov 2006 Posts: 77 |

Posted: Sun Apr 29, 2007 3:11 am Post subject: |

HeadThump wrote:
What is happening to the word 'solution' over the past few years? I barely recognize it any longer.

well i was using it in this context to mean a possible result that could be accomplished in any number of ways; or a "solution" to this non-trivial endeavor of exporting to .MDL format.

HeadThump wrote:
Anyway, this topic should help: http://forums.inside3d.com/viewtopic.php?t=654 Preach has made a exporter for the mdl format for Blender.

You are awesome! This is exactly the kind of thing I was looking for !!
I guess I should lurk more.

Back to top |

HeadThump Joined: 14 May 2006 Posts: 74 Location: Zin |

Posted: Sun Apr 29, 2007 3:23 am Post subject: |

he he

Quote:
well i was using it in this context to mean a possible result that could be accomplished in any number of ways; or a "solution" to this non-trivial endeavor of exporting to .MDL format.

Don't mean to pick on you, well a little bit maybe, and it wasn't really a bad example of usuage. When I see a bad example, I imagine myself back in a meeting room, listening to a vice president of yadda yadda wearing cheap dress pants,out of style blouses with pointed collars, a gawdawefull perm, slowly and excruciatingly raping my soul with the abstracted barely cognitive silver dollar words she bought with her MBA.

Back to top |

dayfive Joined: 10 Nov 2006 Posts: 77 |

Posted: Sun Apr 29, 2007 6:03 am Post subject: |

Ok, so I got the python script and am testing it here and I so far found one anomaly, I had to change

Code:
#check header (first line) if lines[0].stip()<>"# MDL Frame Name List":

to

Code:
#check header (first line) if lines[0].strip()<>"# MDL Frame Name List":

Also, what is the expected input format of the "frame list file" ?
I am using this and it says not a valid file

Code:
$modelname invulner $flags 8 // client side rotate $base base $skin skin $frame frame1

Is there documentation anywhere? I would assume that the format would be the standard QC stuff as seen in the iD software ../progs106/models.qc file.
Nonetheless, this seems like it could be great!

Back to top |

dayfive Joined: 10 Nov 2006 Posts: 77 |

Posted: Sun Apr 29, 2007 6:05 am Post subject: |

Also is there something similar for IMPORT .mdl file?

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sun Apr 29, 2007 8:09 am Post subject: |

Why again do you need to generate a modelgen file?

Back to top |

dayfive Joined: 10 Nov 2006 Posts: 77 |

Posted: Sun Apr 29, 2007 8:25 am Post subject: |

FrikaC wrote:
Why again do you need to generate a modelgen file?

for fun, just like any other quake mod file
I would just make all of them as .bsp files but then you lose the flags = 8 rotation.
I was successful using

Code:
# MDL Frame Name List frame 1

as the framelist file.
It appears that it was successful in blender too, but it still doesn't look right in game.
Here's the output from the export script

Code:
*********************************** MDL Export *********************************** Header Information ident: 1330660425
version: 6
scale x: 0.0078431372549
scale y: 0.0074592777327
scale z: 0.0078431372549
offset x: -1.0
offset y: -0.951057910919
offset z: -1.0
boundingradius: 2.95105791092
eyeposition x: 0
eyeposition y: 0
eyeposition z: -1.0
number of skins: 1
skin width: 256
skin height: 256
number of vertices: 49
number of faces: 80
number of frames: 1
synctype: 1
flags: 0
size: 10.0
Closed the file

Back to top |

Preach Joined: 25 Nov 2004 Posts: 122 |

Posted: Sun Apr 29, 2007 9:32 am Post subject: |

It's a work in progress, and there is something going wrong with the script I've not figured out yet. At the moment it exports something that other q1 model tools can open and then save as a proper mdl, but that's not much good if you're on linux. Can you supply a copy of the output model and explain what's gone wrong with it? Usually the problem I have is that the model shows up as black all over in some engines(but not darkplaces/winquake), so if you're finding the same thing then at least it's the same bug.
Thanks for the catch on the frame list thing. The code came straight from the md2 exporter that comes with blender, so I assumed it would work. Apparently not, but never mind. You've managed to figure out the format, although at some point I might actually take it back to the old modelgen format so you can control flags/sequence names etc from the script too.
I've not got around to writing the import script, for the same reason that it's fairly easy on windows to convert the mdl to a format that can be imported into blender. The exporting to mdl direction is where there's a shortage of options. If you remind me once my exams are over I'll look at adapting the md2 import code...

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Sun Apr 29, 2007 12:36 pm Post subject: |

Are you padding the skin width to a multiple of 4? _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

Preach Joined: 25 Nov 2004 Posts: 122 |

Posted: Sun Apr 29, 2007 1:01 pm Post subject: |

Sajt wrote:
Are you padding the skin width to a multiple of 4?

It's always set to be 256 by 256, I would have thought the model wouldn't even load in winquake if that wasn't the case...

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sun Apr 29, 2007 6:03 pm Post subject: |

Preach wrote:

Sajt wrote:
Are you padding the skin width to a multiple of 4?

It's always set to be 256 by 256, I would have thought the model wouldn't even load in winquake if that wasn't the case...

IIRC the skin height shouldn't be over 200 for DOS/WinQuake compatability. The width has a very high upper bounds, but for 3dfx users the texture will be automatically scaled to 256x256. Actually it may just scale in GLQuake regardless of card (dunno, engine coders definitely know more).

Back to top |

Preach Joined: 25 Nov 2004 Posts: 122 |

Posted: Sun Apr 29, 2007 6:13 pm Post subject: |

FrikaC wrote:
IIRC the skin height shouldn't be over 200 for DOS/WinQuake compatability. The width has a very high upper bounds, but for 3dfx users the texture will be automatically scaled to 256x256. Actually it may just scale in GLQuake regardless of card (dunno, engine coders definitely know more).

I think the 200 width restriction is only for dosquake, I can load these models fine in winquake(in fact they work better than in glquake as the skin displays correctly). I also thought that skins were rounded to the nearest power of 2 for all gl engines(and then possibly scaled down again by some variable like r_picmip). In any case, I'll add an option to set custom skin size in a future version.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sun Apr 29, 2007 6:22 pm Post subject: |

Or maybe read the assigned texture's resolution instead? _________________

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sun Apr 29, 2007 6:48 pm Post subject: |

Preach wrote:
I think the 200 width restriction.

Height.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group