FAQ  •  Register  •  Login

textures2quake: Takes high res textures --> Quake/Half-Li

Moderator: Inside3D Admins

<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Jan 21, 2010 3:11 am

textures2quake: Takes high res textures --> Quake/Half-Li

Image

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).
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

ceriux

User avatar

Posts: 2034

Joined: Sat Sep 06, 2008 3:30 pm

Location: Florida, USA

Post Thu Jan 21, 2010 5:36 am

can i upload this to moddb? - ill upload the later versions too
<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Jan 21, 2010 6:37 am

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 :D :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

goldenboy

User avatar

Posts: 885

Joined: Fri Sep 05, 2008 11:04 pm

Location: Kiel

Post Thu Jan 21, 2010 11:30 am

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.
<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Jan 21, 2010 1:19 pm

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.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Sajt

Posts: 1215

Joined: Sat Oct 16, 2004 3:39 am

Post Thu Jan 21, 2010 3:26 pm

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.
<<

mh

User avatar

Posts: 2181

Joined: Sat Jan 12, 2008 1:38 am

Post Thu Jan 21, 2010 3:55 pm

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.
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
<<

Spirit

Posts: 941

Joined: Sat Nov 20, 2004 9:00 pm

Post Thu Jan 21, 2010 4:58 pm

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.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
<<

Spike

Posts: 2386

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Thu Jan 21, 2010 5:27 pm

mh wrote:255 is always safe for alpha though.

unless its conchars.
<<

mh

User avatar

Posts: 2181

Joined: Sat Jan 12, 2008 1:38 am

Post Thu Jan 21, 2010 6:47 pm

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?
Like the fifth day of playing 24-hour Scrabble when you don't want to use any letters because each one means a world to you because you're so deranged.
<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Jan 21, 2010 9:25 pm

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.

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.

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/textures2qu ... amples.zip
Last edited by Baker on Thu Jan 21, 2010 11:11 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Teiman

Posts: 309

Joined: Sun Jun 03, 2007 9:39 am

Post Thu Jan 21, 2010 10:02 pm

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*
<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Jan 21, 2010 11:56 pm

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:

Image

"Low-Res 24 BPP" original texture (50% size reduction):

Image

Half-Life style 8 BPP (256 colors palette reduction):

Image

Quake Palette version - 256 colors locked to Quake palette [well actually 224 colors because I stripped out the fullbright color rows in the tool]:
Image

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.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Sajt

Posts: 1215

Joined: Sat Oct 16, 2004 3:39 am

Post Fri Jan 22, 2010 2:09 am

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.
<<

Baker

User avatar

Posts: 3237

Joined: Tue Mar 14, 2006 5:15 am

Post Fri Jan 22, 2010 2:21 am

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):

Image

Half-Life style 8 BPP (256 colors palette reduction):

Image

Quake Palette version - 224 colors:

(Quake Palette didn't a stand a chance with the blue ....)

Image
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft