View previous topic :: View next topic |
Author |
Message |
dayfive

Joined: 10 Nov 2006 Posts: 77
|
Posted: Sun Apr 29, 2007 9:20 pm Post subject: |
|
|
Preach wrote: | 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. |
That's exactly the problem I'm experiencing, the model appears black in game and one or two vertexes seem extruded.
Preach wrote: |
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. |
Well I figured out the format by looking at this line
Code: |
...
#read in the data
num_frames=0
for counter in range(1, len(lines)):
current_line=lines[counter].strip()
if current_line[0]=="#":
#found a comment
pass
else:
data=current_line.split()
frame_list.append([data[0],num_frames+1, num_frames+int(data[1])])
num_frames+=int(data[1])
return frame_list
|
Preach wrote: |
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... |
Well even if you choose to do nothing to the current script, the work you have put into making it is GREATLY appreciated. I am very interested in helping you to improve this script and increase the circulation of it.
One thing I was thinking about was that I saw this line
Code: |
mdl.synctype = 1
mdl.flags = 0
|
I can imagine that ideally a user would have a slider box or toggle boxes for the different flags; ie. rotation, purple vore tracer, etc Also a toggle for the synctype (random or not)
The other thing that seemed troublesome was the skins. I was using the default of a 24 bpp .tga Truevision Targa image file. I wonder if it might be worth it to try and use a conversion to 8 bpp Windows Bitmap file...
Luckily while I was working with this, I updated WINE and see that now it actually supports qME. I tried opening the exported .MDL file from Blender in qME and it showed the skin as uninitialized (gray) space and threw an Access Read violation.
In any event I appreciate your work very much on this front and I will continue to use and work with this. I will of course share whatever modifications I make. Again thank you for making this and also sharing it with the community !. |
|
Back to top |
|
 |
dayfive

Joined: 10 Nov 2006 Posts: 77
|
Posted: Sun Apr 29, 2007 9:32 pm Post subject: |
|
|
Preach wrote: | 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. |
Now that I think about it a bit more, it might actually be easier/more elegant to instead of use GUI toggle/sliders to actually parse optional data from the frame list file.
Maybe flags, synctype, and a location to a Windows 8 bpp Bitmap texture in addition to the frame list...
Even as a separate file! Like have 1 be the framelist and 1 be the optional parameters list, defaulting to the current behaviour |
|
Back to top |
|
 |
Preach
Joined: 25 Nov 2004 Posts: 122
|
Posted: Sun Apr 29, 2007 9:49 pm Post subject: |
|
|
dayfive wrote: | Preach wrote: | 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. |
Now that I think about it a bit more, it might actually be easier/more elegant to instead of use GUI toggle/sliders to actually parse optional data from the frame list file.
Maybe flags, synctype, and a location to a Windows 8 bpp Bitmap texture in addition to the frame list...
Even as a separate file! Like have 1 be the framelist and 1 be the optional parameters list, defaulting to the current behaviour |
It shouldn't be too much work to have both available, the GUI itself is easy to edit, so all the flags and stuff can be added to that. Then one of the additions would be having a box for a modelgen/framelist file which would override all of the other gui settings about flags etc.
The skin is possibly more problematic. I will do as cheapy said and make it read the dimensions from the actual skin file. At the moment it doesn't read any data from the image you use, I'm not sure how you'd access actual image content through blender. Which isn't to say it's not possible, just that I haven't looked at how to do it. At the moment it just fills the whole skin with grey.
As a stopgap for now, you could grab a copy of QuArK, which claims to run under linux. That would give you something else to open the models with, and replace the default skin with. It might not fix the problem but it's worth a try, replacing the skin with other programs has made the models work for me. |
|
Back to top |
|
 |
dayfive

Joined: 10 Nov 2006 Posts: 77
|
Posted: Sun Apr 29, 2007 10:08 pm Post subject: |
|
|
|
|
Back to top |
|
 |
Preach
Joined: 25 Nov 2004 Posts: 122
|
Posted: Sun Apr 29, 2007 10:20 pm Post subject: |
|
|
dayfive wrote: |
Ohhhh I see...
Well I was using Blender to skin the models, all you have to do is go into Edit mode, highlight all vertices on a line, do CTRL + E to "Mark Seam", then go into UV Face Select Mode and press U for Live Unwrap Transform. The problem is that Blender uses 24 bpp files and the Quake engine uses 8 bpp files
|
I mean I don't know how to get the import script to access the texture information. I'm unsure whether I'd need to open the skin file myself and add some kind of pcx/bmp loader to the script, or if there are commands in blender which allow export scripts to access the colour information of a texture applied to a model. The md2 gets away with this because they have external texture files, so this code has to be from scratch. I will look into it though. |
|
Back to top |
|
 |
dayfive

Joined: 10 Nov 2006 Posts: 77
|
Posted: Mon Apr 30, 2007 12:05 am Post subject: |
|
|
Preach wrote: | dayfive wrote: |
Ohhhh I see...
Well I was using Blender to skin the models, all you have to do is go into Edit mode, highlight all vertices on a line, do CTRL + E to "Mark Seam", then go into UV Face Select Mode and press U for Live Unwrap Transform. The problem is that Blender uses 24 bpp files and the Quake engine uses 8 bpp files
|
I mean I don't know how to get the import script to access the texture information. I'm unsure whether I'd need to open the skin file myself and add some kind of pcx/bmp loader to the script, or if there are commands in blender which allow export scripts to access the colour information of a texture applied to a model. The md2 gets away with this because they have external texture files, so this code has to be from scratch. I will look into it though. |
I totally misunderstood what you said originally. Perhaps a pcx/bmp loader would be the way to go. Since it is written in Python there may be some miscellaneous modules that could be of use in this regard, but may introduce a dependency to using the script itself.
In general when working with Quake modding I try to keep things as close to the original implementation as possible.. I really like the lo-fi look that Quake originally had. I still keep a 486 around with quake to test compatibility. I will try to find sources to qME to see how they're loading things but I imagine that the ultimate realization of this idea would be to use Blender's powerful modeling interface as well as the built in UV Texture Editor to skin and export .MDL files, making it an "all in one" sort of thing, analogous to qME. Likely all that would need to happen would be to write some Python implementation of Convert 24 bit per pixel .tga file to 8 bit per pixel .bmp file. Attaching it within the model as you mention will be another matter altogether, and certainly non-trivial. |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Mon Apr 30, 2007 4:50 am Post subject: |
|
|
qME was not and apparently will never be open source. If you can find the source to it...let me know! |
|
Back to top |
|
 |
Preach
Joined: 25 Nov 2004 Posts: 122
|
Posted: Fri May 04, 2007 10:50 am Post subject: |
|
|
Did the new version help with the problems you had before? Or did it just create new problems? |
|
Back to top |
|
 |
|
|
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
|