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

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Thu Jan 21, 2010 3:11 am Post subject: textures2quake: Takes high res textures --> Quake/Half-Li |
|
|
Humble home page for it:
http://www.quake-1.com/docs/textures2quake
Download: textures2quake v1 (alpha; not tested on another computer ... should run I hope; 15 MB because it includes some Nexuiz textures to do an easy test)
Takes high resolution textures (Quake3 for example) and scales down 50%, sizes to them power of 2 (GLQuake only supports power of 2 textures) and makes 3 sets available:
1. 24-bit color versions
2. Quake paletted versions
3. Half-Life style: 256 color independent palette
Renames all textures to max length 15 because WAD2 and WAD3 only allow 15 characters in a texture name. Stores a log of those renames in a tab delimited file.
Supports using some other palette instead of the Quake palette, like say the X-Men Ravages of Apocalypse palette. Palette must be in JASC-PAL v 0100 format ... the palette format used by Paintshop Pro.
Only supports conversion from a single folder. Copy all the textures to a single folder to do a multifolder conversion. Source included in zip (uses FreeImage library). _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Thu Jan 21, 2010 5:36 am Post subject: |
|
|
can i upload this to moddb? - ill upload the later versions too _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Thu Jan 21, 2010 6:37 am Post subject: |
|
|
ceriux wrote: | can i upload this to moddb? - ill upload the later versions too |
If you want to ... barring an unexpected problem this tool might be final state as it is.
I made it with the idea of quickly converting GPL textures like Nexuiz or Open Arena or other similar projects into a Quake friendly format with replacement texture support as an automatic.
Although a tool like this would have likely made something like JPL's conversion of Doom 3 texture set to Quake from a "project" into a 15 minute whim  _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
goldenboy

Joined: 05 Sep 2008 Posts: 310 Location: Kiel
|
Posted: Thu Jan 21, 2010 11:30 am Post subject: |
|
|
I wonder how many people will follow the advice about using Tex Mex or another texture editor if you're not happy with the conversion's quality.
I wonder how many potential users will even understand that. Not to mention read it.
The tool is a two-edged sword, as we say here. _________________ ReMakeQuake
The Realm of Blog Magic |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Thu Jan 21, 2010 1:19 pm Post subject: |
|
|
goldenboy wrote: | I wonder how many people will follow the advice about using Tex Mex or another texture editor if you're not happy with the conversion's quality.
I wonder how many potential users will even understand that. Not to mention read it.
The tool is a two-edged sword, as we say here. |
Notes are always for the smart ones so they know what a tool is doing. Everyone else won't care because it is "click a button" easy.
The "pros" are the ones that ask questions and wonder things like why did this one texture resize to 64 x 32 instead of 48 x 32, etc.
The palette reduction is so good that it is probably better than any tool out there and might be better than the palette reduction in Paintshop Pro or Photoshop. I was kind of surprised. _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Thu Jan 21, 2010 3:26 pm Post subject: |
|
|
If you are converting Doom3 to Quake textures, I hope that you are baking the normalmaps and specular onto the diffuse with front-on lighting. The Doom3 diffuse textures are basically a couple of bland solid colours each.
And as for the palette reduction, you're taking fullbrights in mind right? I'm pretty sure that TexMex sucked because it would indiscriminately use fullbrights in the mipmaps it generated. But it's been 8 years since I've used TexMex (not that there are new versions since then, I'm pretty sure the author died of cancer a long time ago).
How is the palette reduction better? You're not doing dithering or error diffusion, are you? (That's uglier.) Otherwise you're doing "nearest colour matching", and there's only two ways to do that: Simple arithmetic, and with luminosity weighting. I'm pretty sure PSP uses the former. I wonder if the latter would look better.
I would download this but 15MB is too much for my limited bandwidth. Maybe you should make a minimal download without sample textures. _________________ 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 |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Thu Jan 21, 2010 3:55 pm Post subject: |
|
|
For fullbrights it's not actually 100% safe to assume that palette range 224-254 is the one to use. These are used alright by the Quake palette, and I'm pretty sure by convention elsewhere, but the fullbright range is actually defined by the colormap and can - in theory - be present anywhere within the palette (and does not even need to be a continuous range).
255 is always safe for alpha though. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Spirit

Joined: 20 Nov 2004 Posts: 476
|
Posted: Thu Jan 21, 2010 4:58 pm Post subject: |
|
|
This is fantastic. Thank you so much.
I do not care how the Quake'd textures look like. If someone wants high quality then manual work is needed in any case.
But to make high resolution texture sets Quake-compatible, this is great. The converted ones are just for mapping, ingame you have the full quality replacements. _________________ Quake Maps |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Thu Jan 21, 2010 5:27 pm Post subject: |
|
|
mh wrote: | 255 is always safe for alpha though. |
unless its conchars. _________________ What's a signature? |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Thu Jan 21, 2010 6:47 pm Post subject: |
|
|
Spike wrote: | mh wrote: | 255 is always safe for alpha though. |
unless its conchars. |
Or sky, for that matter.
Dontcha just love wacky non-standard Quake formats? _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Thu Jan 21, 2010 9:25 pm Post subject: |
|
|
Sajt wrote: | And as for the palette reduction, you're taking fullbrights in mind right? |
The palette reduction doesn't actually use the fullbrights. So it is reducing it to the 224 non-fullbright colors. It says this in the little conversion log panel.
Quote: | How is the palette reduction better? You're not doing dithering or error diffusion, are you? (That's uglier.) Otherwise you're doing "nearest colour matching", and there's only two ways to do that: Simple arithmetic, and with luminosity weighting. I'm pretty sure PSP uses the former. I wonder if the latter would look better. |
It uses the Xiaolin Wu algorithm from FreeImage ( http://freeimage.sourceforge.net ) and I really have no clue how it works except the reduction is so good looking I needed to convert some green textures to make sure my eyes weren't deceiving me.
Quote: | I would download this but 15MB is too much for my limited bandwidth. Maybe you should make a minimal download without sample textures. |
I'll make a minimal one.
Something I forgot to say, you can drag drop a texture into the "directory textbox" to specify the folder.
Add: the download without the samples folder - 681 KB - http://www.quake-1.com/docs/textures2quake/texture2quake_without_samples.zip _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Last edited by Baker on Thu Jan 21, 2010 11:11 pm; edited 1 time in total |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
Posted: Thu Jan 21, 2010 10:02 pm Post subject: |
|
|
I wish carmack made textures with fullbrighs use a magic name like uglyredwall_fb to able to use the full palette for everything else.
*sakes fist at carmack* |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Thu Jan 21, 2010 11:56 pm Post subject: |
|
|
Resampling quality and palette reduction quality illustration. Looking at these, you'll see why I didn't quite believe the Quake ones at first.
Nexuiz original texture:
"Low-Res 24 BPP" original texture (50% size reduction):
Half-Life style 8 BPP (256 colors palette reduction):
Quake Palette version - 256 colors locked to Quake palette [well actually 224 colors because I stripped out the fullbright color rows in the tool]:
The above image doesn't contain any Quake-adverse colors like bright green, but as you can see the conversion quality in palette reduction is outstanding (Thanks Xiaolin Wu for the algorithm (source) that happens to be incorporated into FreeImage!).
Now ... the nice advantage of the above process is that you can make a map with the Quake textures and toss the "high resolution original textures" from the "high-res" folder into "quake\id1\textures" folder as replacement textures. _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Fri Jan 22, 2010 2:09 am Post subject: |
|
|
That "Radioactive" image is probably the worst possible test subject. It will look almost the same no matter what algorithm you throw at it. You should pick something with actual gradations of colour, with all sorts of hues involved. That's what that algorithm seems to be tailored for, anyway. I'm interested in what results a "creative" algorithm (as opposed to simply "accurate") would actually have. _________________ 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 |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Fri Jan 22, 2010 2:21 am Post subject: |
|
|
Sajt wrote: | That "Radioactive" image is probably the worst possible test subject. It will look almost the same no matter what algorithm you throw at it. You should pick something with actual gradations of colour, with all sorts of hues involved. |
Nexuiz was my test subject and most of those textures are rather gray and black and white, really. So here is some random photo off the web with a lot of color in it ....
"Low-Res 24 BPP" original texture (50% size reduction):
Half-Life style 8 BPP (256 colors palette reduction):
Quake Palette version - 224 colors:
(Quake Palette didn't a stand a chance with the blue ....)
 _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
|