Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Vorpal

Palette Theory?

Recommended Posts

Image editing, and its software are like magic to me, it all makes very little sense.

I've read some tutorials but apparently I'm not understanding how to meaningfully get what you want out of a palette.

What made sense to me to do (and which isn't working so I guess it's not the correct method), was to take a screenshot of a representative room in Doom containing various colors, alter that image a bit to make the desired "look", and slap the resulting palette into doom. The results are quite horrible.

Is there a better way to alter palettes to get a desired result? When I look at a 256 color palette to edit manually I don't know where to start, half of the colors all look the same to me...

Share this post


Link to post

If you decide to draw something by using the Doom palette, don't go all random with the colors. If the object you're drawing has a set of distinguishable parts, make sure that the parts don't have colors in common, so that when it comes to palette translation (ZDoom can do it), they won't turn bad. For example, the lost soul has two parts: skull and fire. These two parts don't share any color, therefore it's very easy to replace all colors of the fire, without affecting the skull at all. For every frame of the sprite.

You can use XWE to easily remap palette colors in existing graphics, by the way.

Share this post


Link to post

Oh, actually my goal is just to alter Doom's palette, not to make new graphics using its palette.

Edit: I guess what I am getting at, is how were the doom palettes created?

Share this post


Link to post

I don't know if they used any special tools to do it, but the developers selected a few color ranges they found suitable (true gray, various brown ranges, bright red, fleshy red, green, dull greenish, blue, gold, yellow, orange and a bit of magenta-violet) and fit them into 256 colors arranged in a mnemonically and mathematically suitable manner. This would make them tend to remember color ranges, as well as grant the possibility of doing simple color remapping.

Various image editing programs let you save the palette as a file you can then edit and load. Paint Shot uses PAL files and GIMP uses PLA-compatible GPL files, for example.

Altering the palette involves also altering the alternate palettes used for pain, getting items, and the like, and may involve modifying the COLORMAP lump, which is an index that maps certain relatively similar darker colors to a color according to the light level. Altering the palette too much may make some stock graphics look weird, if the new colors have nothing to do with the old ones.

Share this post


Link to post

I'd like to know more about these "alternate palletes"

I used irfanview to extract doom's pallete from a graphic in doom and edit it, but I'm only really interested in modifying the colors of the screen when the player is damaged. How do i get at those?

Share this post


Link to post

According to http://doom.wikia.com/wiki/PLAYPAL

Palettes 2-8
"Progressively more red (8 is most red). Used to show pain when the player is hurt, and reddens the screen when the player picks up a berserk pack.

Each of these palettes tints the screen red progressively by 11%, so the highest pain palette makes the screen 88% red, by RGB(255, 0, 0)."

But yeah I'm still lost on how to get "good" results out of palette editing. Like hexen has different palettes than Doom, and I doubt anyone went in manually and made 256 (x27 palettes) decisions for each color.

There must be a way to alter a palette as a whole unit? Like what I've tried by changing a screenshot's overall hue/lightness/whatever, then saving this new screenshot's palette and importing it into Doom. The results just look like tutti-frutti all over the place though... I think I am missing a major piece of basic palette logic ;-(

Share this post


Link to post
Vorpal said:

There must be a way to alter a palette as a whole unit? Like what I've tried by changing a screenshot's overall hue/lightness/whatever, then saving this new screenshot's palette and importing it into Doom. The results just look like tutti-frutti all over the place though... I think I am missing a major piece of basic palette logic ;-(


Here's a fun experiment you can make. Take something like the GIMP which can show you the image's palette. Compare it with the graphic of the PLAYPAL you find on the Doom Wiki. You should understand the problem very soon then...

But basically, the part of palette logic that you're missing is that the order is very important. Paletted graphics are a paint-by-number exercise for your computer. When a screenshot is turned to RVB to do some graphic adjustments, it changes so that each pixel contains its color instead of an index to a color from the palette. When you repalettize the graphic, a new palette is created, according to the logic of the program you use, which will never be in the same order as the original palette.

Share this post


Link to post

40oz said:
I used irfanview to extract doom's pallete from a graphic in doom and edit it, but I'm only really interested in modifying the colors of the screen when the player is damaged. How do i get at those?

You can use inkworks.

Vorpal said:
There must be a way to alter a palette as a whole unit?

I'm not familiar with any palette-specific editors but there may be some. Something that allows you to select a series of colors and then alter different color properties on all of them at once.

It could be done with a pic. Let's say you get all of DOOM's blues onto a graphic with squares, apply color-changing functions with GIMP, Paint Shop or Photo Shop, and save the graphic as indexed (8-bit) with a palette with as many colors as there are unique colors in the graphic (I think there are like 24 blues, but one is repeated and another is black). Then you'd edit the DOOM palette, editing the RGB values of each color, to use those new colors instead of its usual blue colors.

Share this post


Link to post

Thanks for all the replies, I'm rather dense in the graphic design department, but I think I might be getting there mentally.

So Gez, you're saying essentially that once I start changing colors and other effects on a doom screenshot, the doom starting palette is ignored and written over? This does indeed seem to be the case, as now when I go and look at the edited palette it doesn't even contain 256 colors but just 160 or so.

So, I guess I do really have to go in and edit each color manually one by one. Let's see if this logic makes sense:

1. Mess around with doom screenshot to get desired "look" - record exactly what tools were used and the values of all the settings etc.

2. Take a screenshot of the doom palette, and apply exactly the same tools/settings to this palette screenshot.

3. Now take note of the RGB values for each unit of the palette (kinda buried in GIMP, need to go to Windows > Dockable Dialogs > Colors > Scales tab)

4. Apply each RGB value to its corresponding palette color square in XWE or other such tool.

That method sounds like it could take the better part of a day to do, and I don't even know if the end result is worth the trouble... I think probably it will have a dramatic impact however.

Share this post


Link to post
Vorpal said:

That method sounds like it could take the better part of a day to do


If not more. That's why there are palette editors such as the aforementioned inkscape or the in-progress one whose development thread I just linked to. They should, if they're well made, have ways to tint the entire palette.

Share this post


Link to post

Ah thankfully GIMP's color picker tool has an option "add to palette" on each click, so I don't need to write down 256 RGB combinations, I just need to click (carefully!) 256 times ;-P

But my method is still flawed, because now if I go back to the original unedited screenshot, and point it to my new edited palette, I don't get the intended result. Perhaps the order/organization of the colors in the palette has some effect?

But also, I seem to have another problem. Once I import a bmp containing any new palette using inkworks, in game everything looks very bad and "tutti-frutti" like.

Speaking of inkworks, myk and Gez you have hinted that it can edit the palette? Gez you even imply that it can "tint" all 256 colors at once. I don't see any way to do this in inkworks, all it seems to do is have the ability to import and export palettes from premade images, as well as the ability to view said palettes. Within the "view palette" function is a way to change the base palette, perhaps this is a way of editing the palette? The function seems broken however, like I tried making the reddish pain state palette as the base palette and exporting to a wad, but everything just looked normal.

I apologize, I really am this dumb, and don't think you guys are jerks or anything (on the contrary I'm really grateful that people are interested and trying to help my dumb ass!), but I'm just not getting it ;-(

Not giving up though...!

Share this post


Link to post

To restate what has been said: A palette is just an ordered list of 256 colors. Doom doesn't know or care what index 147 in the palette is. Each of the sprites/textures that Doom has is a big 'paint by numbers' image - paint these pixels using index 120 in the palette, use index 145 for these, etc. If you create a new palette where a color that used to be dark green is now bright purple, it will look terrible - the order is crucial.

If it can import a palette based on an image you can do what you want. Get an 8bpp screenshot of Doom and adjust the colors as you see fit. Make sure you keep it in 8bpp mode the entire time - converting it to 16 or 32 will destroy the palette. As long as the editor does not rearrange any colors in the palette (it shouldn't), you should be able to import it back and get your new colors.

Share this post


Link to post

Woohoo! Got it working. Thanks for the help conceptualizing what I was actually doing, I still don't fully get it but I can at least manipulate palettes somewhat intelligently now. Everyone's comments were useful in getting to my goal, even if I didn't understand them the first few times around.

A lot of my problems stemmed from the image editing software I was using (first paint.net, then GIMP). It seemed that every default setting in the book was working against me and ruining the palette after each save, but after messing with the various magical checkboxes I got my preferred palette embedded into a bitmap, through the inkworks gauntlet, and into a wad.

Now I just need to find a balance between being too dramatic and more subtle (and still remain noticeably different).

Edit: a comparison image, the result of a good 12 hours of fumbling with image editors, lump editors, and bothering doomworld locals for insight.

http://webpages.charter.net/bgspencer/design/altered_doom.jpg

If anyone is familiar with half-life 2 editing, I'm trying to mimic the light_environment entity functionality (it allows you to alter the color/direction of light that is thrown out by the skybox), where you can quickly turn a map into a nightscape or high noon. In my case I'm shooting for that dusk/early night "feel".

Share this post


Link to post
myk said:

You can use inkworks.


Hmmm. It's not very versatile but it does however have an option to do exactly what I wanted it to do :)

Share this post


Link to post

Gez brought up my post from a while back. Sorry, but at the time I was working on Prisma I was still jobless. Recently though, I've been looking at some color-mapping algorithms, because the colormap generation is going to need some serious accuracy. I promise I'll try to get back to work on the program and try to get it into a useful state, but my time is really constricted right now with everything else I'm involved in.

Share this post


Link to post
Vorpal said:

If anyone is familiar with half-life 2 editing, I'm trying to mimic the light_environment entity functionality (it allows you to alter the color/direction of light that is thrown out by the skybox), where you can quickly turn a map into a nightscape or high noon. In my case I'm shooting for that dusk/early night "feel".


Something I've always thought would be cool for Doom is a day-night cycle, where the game would slowly shift from the "day" palette to the "night" palette, and then back, to simulate the passing of time. Sierra used that technique in the Quest for Glory games to great effect.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×