Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Linguica

Alternate colormap falloffs

Recommended Posts

Here is the standard Doom colormap:



You might know that the colormap was generated by having each darker level of the colormap linearly move towards total black:

darken_factor = (32 - i) / 32.0


Of course, there's no reason why this must be the case. So I screwed around and made three alternate colormap falloffs:



Square:
darken_factor = (1 - ((i/32)*(i/32)))


Sine:
darken_factor = 0.5*(math.cos(math.pi * i/32)) + 0.5


Tangent:
darken_factor = 0.5 + math.tan(-(i+24)*math.pi/40) /(2*math.sqrt(5 + 2*math.sqrt(5)))





http://www.doomworld.com/linguica/colormaps/square.wad
http://www.doomworld.com/linguica/colormaps/sine.wad
http://www.doomworld.com/linguica/colormaps/tangent.wad

So yeah, whatever.

Share this post


Link to post

Nice ones, thanks for making! My favorite one is tangent, it makes everything brighter and reduces fake contrast on orthogonal walls, but also keeps a reasonable light variation between sectors of different brightness levels. The only downside of tangent is that there is too little light diminishing in sectors with "middle" brightness levels. Square makes even vaguely bright areas overbright, then jumps into darkness rather rapidly, and doesn't decrease fake contrast like tangent does, but it's still a decent colormap substitute. Sine ramps up all contrast the most, but I can imagine it very usable in maps specifically designed for it and in hands of a competent mapper.

Share this post


Link to post

Generating colormaps has been one of those things just outside my understanding of all things Doom. What method was used to generate the palettes for Heretic, Hexen, and Strife? Would Doom look okay/worse/better with such a colormap, or is the palette just too restrictive?

Share this post


Link to post
EarthQuake said:

Generating colormaps has been one of those things just outside my understanding of all things Doom. What method was used to generate the palettes for Heretic, Hexen, and Strife? Would Doom look okay/worse/better with such a colormap, or is the palette just too restrictive?

The primary palette was created by hand or however it was made, and all other palettes (for pain/item pickups/rad suit) are generated from the primary palette through simple blending. For each color in the palette, bring it X% closer to some predefined RGB value. This is explained in greater details on the Doom Wiki.
http://doomwiki.org/wiki/PLAYPAL

The colormap is generated similarly: for each color in the palette, bring it X% closer to black. Except here there's a second step: the color you get must then be brought back into the palette, through simple color matching (find the closest palette color in RGB space; you do that by adding together the sum of the squares of the differences between the color you got and each palette color, the smallest sum win, if the sum is zero then it's a perfect match). The invulnerability color map is done slightly differently: it transforms the color to grayscales (using values derived from the NTSC specs), and then inverts it, and then there's the mandatory color matching.
http://doomwiki.org/wiki/COLORMAP

If you can read relatively simple C code, then take a look at dcolors.c in the Doom utilities, because everything related to palettes and colormaps can be found here.

You can also take a look at the SLADE 3 code, or the Freedoom code Linguica already linked to.

Share this post


Link to post

Raven and Rogue colormaps were made differently. There's much less tolerance for "borrowing" colors from different ranges. Strife colormap in particular looks hand-made. They faded one range, then cloned the result for all other ranges, which lead to virtually no shared colors between colormap blocks.

You can't really make such a colormap using the Doom palette.

Share this post


Link to post

Yeah, Strife's colormap is very different. Notably it has a few full bright ranges. It also has the interesting effect that bright colors increase in saturation as they become darker.

Heretic's colormap looks a bit like Strife in that respect. Also its invuln map isn't inverted grayscale, of course.

Same comment for Hexen, and here the invuln map is non-inverted grayscale. I don't remember the effect being used in the game anyway; the icon of the defender doesn't apply a colormap for any of the three classes IIRC.

I wonder if it would be feasible to replicate these effects algorithmically perfectly, even if it means inputting range boundaries first...

Share this post


Link to post

When I saw your demo gif of the "hue" palette, I thought this will be a true color-swapping awesomeness, but it practice, most colors ended up turning grey for most of the time. I understand, you generated the palette by an algorithm that merely works with hue as a numeric value. But would you do a palette that actually turned all colors variously brightly colorful on all brightness levels as the demo gif implied? Please?

Share this post


Link to post

It's funny you're talking about colormap because I only recently realized its existence as a lump in IWADs.

I was wondering, are all those colors also part of the palette or is there some extra shade veriations in there?

Share this post


Link to post

All must be part of the palette. COLORMAP just translates palette color indexes to different palette color indexes according to light level.

Share this post


Link to post
scifista42 said:

When I saw your demo gif of the "hue" palette, I thought this will be a true color-swapping awesomeness, but it practice, most colors ended up turning grey for most of the time. I understand, you generated the palette by an algorithm that merely works with hue as a numeric value. But would you do a palette that actually turned all colors variously brightly colorful on all brightness levels as the demo gif implied? Please?

Sure.. I left the actual pure grayscales alone though.





http://www.doomworld.com/linguica/colormaps/circus.wad

Share this post


Link to post

The COLORMAP in circus.wad is a different one than what you showed in your pictures, though - greyscale shading is downright broken in the wad I downloaded.

Share this post


Link to post

Much nicer, thanks!

Really, not nearly as eye disturbing as before, the game is actually well playable now.

Share this post


Link to post
Marnetmar said:

I think the saturation colormap could actually look quite good if the effect was a bit more subtle.


subtlsat.wad?

Share this post


Link to post
Aliotroph? said:

The biggest issue I saw with the saturation colormap is the grays turn yellow.

Yeah, I'm not sure why that happened - I assume it's a side effect of the fact that I converted RGB to HSV, and the grays were probably not "perfectly" gray once they got converted and so raising the saturation magnified that small error.

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
×