[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Messed up skins: what happened?

Messed up skins: what happened?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.

Moderator: InsideQC Admins

Re: Messed up skins: what happened?

Postby Spike » Sat Mar 02, 2013 2:44 am

gamma 1; contrast 1
colours should then match (except for light levels, anyway, so it won't be an exact match anyway).

A few people now have mentioned that you should be able to copy (via windows clipboard) your edited images into a file with the right palette, then save that with the right name. This should then use the data from the clipboard with the palette of the file you inserted the image into. I can't guarentee that of course, as I don't personally use any of these tools other than just to view stuff. Still, its a nice theory, and nice theorys are nice.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Messed up skins: what happened?

Postby goldenboy » Sat Mar 02, 2013 2:48 pm

Onemanclan, you can simply use GIMP to import the palette from any indexed image. This is what I meant when I said "please learn Photoshop or GIMP" in the other thread. :wink: If you need help with Photoshop or GIMP or Blender, it makes a lot more sense to ask people at the Photoshop / GIMP / Blender forums because chances are they will know what they are doing.

You can then use your imported palette when converting any image back to indexed.

1) Please open the Quake player model (or any Quake model) in QME. Right click on "skin0" and choose "Export". Save the skin as a BMP image.

2) Please open GIMP and load the BMP image you just created.

2a) In GIMP, open the palettes dialog; it's the one that has a lot of pre-made palettes in a list. Right click anywhere in it and from the popup menu, chose "Import palette".

Image

2b) The import palette dialog will open; under "Select source" select the radio button labeled "Image". This dialog should then already display the correct palette (the Quake palette in this case) in its preview window, as it does here:

Image

Click "Import". This will save the palette from the image into GIMP.

2c) When you convert any RGB image to indexed (palettize it), the dialog will ask you what palette to use. Click "Use custom palette". Select your previously saved Quake palette.

Image

You can then save your skin as a PCX image because that's the indexed format that Quake originally used.

After you convert an RGB image to indexed, we're no longer talking about a high-res skin, of course.
Last edited by goldenboy on Sat Mar 02, 2013 3:43 pm, edited 1 time in total.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Re: Messed up skins: what happened?

Postby Spike » Sat Mar 02, 2013 3:23 pm

@gb: export LANG= && gimp
might have helped, in case there are version/os differences. :P
but yeah, comprehension is easier when its in 'your' own language. :s
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Messed up skins: what happened?

Postby goldenboy » Sat Mar 02, 2013 3:27 pm

The difference between "convert" and "konverter" isn't earth shattering. I thought it would be clear from the images as well - the dialogues should look exactly the same in the English version. :mrgreen:
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Re: Messed up skins: what happened?

Postby OneManClan » Wed Mar 06, 2013 4:02 am

Last edited by OneManClan on Fri Mar 08, 2013 2:07 am, edited 1 time in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby Spike » Wed Mar 06, 2013 12:13 pm

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Messed up skins: what happened?

Postby OneManClan » Thu Mar 07, 2013 9:24 am

Update:

Work on what I've dubbed the 'DoomFace' mod has ground to a halt, as my mind struggles with the boggling complexity of how different Quake clients + mdls + skins + image formats + palettes all actually interract. To that end, I've been doing some experiments, and I thought I'd share the latest results:

First, here's our new buddy, MrPalette:
Image

FTE: looking at a Blue Team MrPalette
Image

FTE: looking at a Red Team MrPalette
Image

DP (a 2009 version): looking at a Red Team MrPalette
Image

EZquake: looking at a Red Team MrPalette
Image
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby Spike » Thu Mar 07, 2013 1:20 pm

#define TOP_DEFAULT 1
#define BOTTOM_DEFAULT 6

these ranges are 0-based (its only 1-based if there's a 'th' on the end - english makes things inconsistant!).
so the second row (one of the browns) is swapped with the topcolor row (so 1->4 for red team, and 1->13 for blue).
and the 7th row (that orange->yellow range) is swapped with the bottomcolor row (so 6->4 for red team, and 6->13 for blue).

the face mask thing looks to me to be the bright yellow from range 6 and is thus subject to the player's bottomcolor setting.
so when fte and ezquake both show blue or red (correctly for the team) instead of that yellow its hardly surprising.

The only inconsistancy here is that your DP build doesn't appear to be doing any colormapping at all, hence why DP's legs are using a colour from the middle of range 6 instead of being red or blue - the trouser colour in your pcx skin image.

So yeah, you need to avoid using the 2nd row, the 7th row, and the last two rows or you'll get colours changing to match teams or fullbright pixels.

Does that help clarify anything?
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Messed up skins: what happened?

Postby OneManClan » Thu Mar 07, 2013 3:09 pm

Last edited by OneManClan on Fri Apr 19, 2013 10:01 pm, edited 1 time in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby frag.machine » Thu Mar 07, 2013 5:48 pm

OneManClan, be aware that even if you correctly picked a color from the Quake indexed palette, sometimes a tool in the painting program you're using may replace it by another color index, in the same palette. At least with older versions of Paint Shop Pro this happened to me more than once: I painted some skin area with the an indexed color (say, index 0) and later, when using the color replacer tool, the program silently replaced it with another color index that closely matched the RGB values (but using a completely different color index).

That's the workflow I would use on this case:

a) create your skin using your preffered painting tool (Photoshop, PSP, GIMP, whatever). Don't worry about pants or shirts colors correctness at this stage: just focus on producing your 24-bpp texture;
b) save it in a engine-friendly format (TGA or PNG, I would advise against JPEG because they may look really bad on alias models);
c) from this TGA/PNG colormap texture, create shirt and pants versions (basically removing the undesired parts and using grayscale to the visible parts), again saving in a engine-friendly format (pay attention to the naming and folder conventions each engine uses). Now you have your high resolution skin with shirt and pants support in FTE/DP/etc, and if you don't care about engines that don't support external textures you're done;
d) go back to your first texture, scale down the color applying the Quake pallete to it;
e) knowing which color indexes represent the pants and shirt colors in the pallete, use them where appropriated;
f) save the resulting texture in a pallete indexed format (256 color BMP or PCX), so you won't incur in accidental color mismatch;
g) use the resulting image with your favorite utility to add/replace skins in the model. Bang, now besides the 24-bit resolution texture you have the lower version showing correctly, too. Of course, you won't be able it to look as good, but careful pixel drawing and hand-made dithering can bring surprising results.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Messed up skins: what happened?

Postby ceriux » Fri Mar 08, 2013 4:29 am

iv never had a problem with the palette when using photoshop. i usually just paint my texture. then index the colors by selecting an external palette.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Messed up skins: what happened?

Postby OneManClan » Fri Mar 08, 2013 5:22 am

OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby OneManClan » Fri Mar 08, 2013 10:56 am

OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby OneManClan » Fri Mar 08, 2013 11:38 am

If I may segue at this point to go over my current 'understanding' of this whole Quake Graphics issue. Please confirm, correct, lol, deny or nitpick the truth (or otherwise) of the following basic concepts /descriptions.

[DISCLAIMER: This list possibly (probably?) contains FACTUAL ERRORS! Any newbies reading this in future please read the responses that follow for corrections]


1. All 'bitmapped' computer images (ie as opposed to vector graphics) could be considered a '2D matrix of pixels'.

2. When 'saving' an image file, you are not saving the colours, you are in fact saving a 2D matrix of numbers, where each number refers to a colour.

3. The 'colour' that the number refers to can be different based on the renderer, the 'bit of software that does the displaying of the image' (whether it be the picture editing program, a monitor driver, or ... a Quake client)

4. A 'indexed palette' is an array of paired values where numbers are 'mapped' to specific colors. RGB is a different system where (IIUC) every 'cell' in the 2d matrix stores three numbers, the red, green and blue amounts.

5. When you open an image, the renderer reads each number in every element of the matrix, and matches every number to a colour, it then displays that colour in the pixel.

6. The 'Quake palette' is an array of 255 structures, containing pairs of values, which map specific numbers in the image file, to specific colours the original Quake could display (note the past tense(!), this is where I got confused!!)

7. THIS IS PURE GUESSWORK: The variables which store the 'pairs of values' are a set size, and if your image has a pixel/cell which contains a numeric value higher than the Quake Palette variable can store/ is expecting, it moves pointer to the next element to an 'invalid position', and this messes up/corrupts the entire 'read' of the array. This is the only reason I can imagine that one 'bad' (presumably too large) value results in the whole skin being messed up (???)

8. Skins originally HAD to use the Quake palette, because of hardware limitations in the mid 90's, and the consequent requirement to use software mode(?), HOWEVER:

9. Clients such as FTE / DP have been modified so they can load TGA or PNG formatted skins and 'bypass' the 255 limit. The 'high res head' model contains such a skin - but it cannot be viewed by EZquake, because:

10. EZquake has NOT been modified and thus IS still limited to only displaying pcx (and png?) skins with the Quake palette, as per the original Quake.

....... Hopefully the above is basically correct.

Now, the next bit I'm still fuzzy about:

11. EZquake can use (?) where multiple skins are placed on top of the same model (presumably via making some colours transparent?) and somehow this can be used with team colours? I'm still trying to understand this, and looking over my notes from Spike (thanks again Spike!). I notice there are bunch of mono coloured skins in my qw folder, green, cyan, red, blue, white.. Still trying to figure out what they do/how they work, and/or if they are in fact relevant.

.. how did I do? :|
Last edited by OneManClan on Sat Mar 09, 2013 4:40 am, edited 1 time in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Messed up skins: what happened?

Postby Spike » Fri Mar 08, 2013 3:25 pm

ezquake supports 24bit skins, but not colormapped 24bit skins.
that means you can load up a png just fine, but you can't figure out which team that player is on.
you can work around that by creating two copies of the skin, one for red team one for blue team.
you probably won't want to bother with shirt colours though.

the multiple skins added together thing is specific to fte and dp.
the shirt/trouser images are recoloured to match the player's settings, then added together onto a presumably black area of the base skin. so you basically make your skin as normal, with the player colours drawn in white. then cut those bits out and paste them into another two images in the same locations leaving only black behind.
then the engine draws basetexture+(shirtcolor*shirttexture)+(pantscolor*pantstexture) and you get team-coloured high-res skins that naturally respond to both colour settings.

fun feature of the day: 'color 0x00ff00' in fte will make your player colours bright green.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

PreviousNext

Return to Modeling

Who is online

Users browsing this forum: No registered users and 0 guests