[Not a bug] Sector type 75

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hirogen2 wrote:In some stupid Doom palette editing util, it divided the 256 colormap up into 32 ones or so... which were red, green, etc. one was grayscale.
The grayscale one you're referring to is not the one that is used.

[Disclaimer]The following is conjecture based on my personal observations and assumptions. If it's wrong... bite me.[/Disclaimer]

Here's how it works: To render each texel, Doom uses one of the 256-color palettes from the PLAYPAL lump (depending on whether you've recently been injured or picked up an item, or if you're wearing the rad suit), but before the color is rendered to the screen, one more translation is done on it. The translation depends on how bright the texel in question should be, and whether you're currently under the effects of an invurn sphere.

If not, the color is located in the top area of the COLORMAP lump. If you look carefully, you'll see that a single row in this lump contains 256 colors, and that the top row contains the exact same colors as found in the first palette in the PLAYPAL lump. Hence, any color chosen from the default palette will use one of those first 256 color for its translation. Next, the game decides how bright the texel should be depending on the light in the area and how far from the camera it is. The darker it is, the further down it goes in the COLORMAP table, using the column the original color was found in. From this, you can see that red will fade down to brown, blue will fade down to gray, etc. Once the brightness is determined the texel is rendered to the screen using the entry in the COLORMAP.

On the other hand, if you have an invurn sphere, instead of shifting down depending on brightness, the brightness is completely ignored. Instead, the game jumps down to the 2nd-to-last row (the last is completely black) and uses the color it finds there to render the texel. This fits perfectly because when you have the invurn, 1) All colors are grayscale, 2) The brightness is reversed from the normal palette, and 3) Distance and brightness don't matter.

AFAIK, ZDoom doesn't use these translations anymore, which is why you can't change the palettes with a new PLAYPAL, and why each light level is distinct, rather than going in 16-step jumps.

Here's an image of DOOM.WAD's COLORMAP so you can see what I'm talking about...
User avatar
arcticwolf
Posts: 245
Joined: Mon Jul 28, 2003 4:52 am
Location: The world

Post by arcticwolf »

HotWax wrote:
Hirogen2 wrote:In some stupid Doom palette editing util, it divided the 256 colormap up into 32 ones or so... which were red, green, etc. one was grayscale.
The grayscale one you're referring to is not the one that is used.

[Disclaimer]The following is conjecture based on my personal observations and assumptions. If it's wrong... bite me.[/Disclaimer]

Here's how it works: To render each texel, Doom uses one of the 256-color palettes from the PLAYPAL lump (depending on whether you've recently been injured or picked up an item, or if you're wearing the rad suit), but before the color is rendered to the screen, one more translation is done on it. The translation depends on how bright the texel in question should be, and whether you're currently under the effects of an invurn sphere.

If not, the color is located in the top area of the COLORMAP lump. If you look carefully, you'll see that a single row in this lump contains 256 colors, and that the top row contains the exact same colors as found in the first palette in the PLAYPAL lump. Hence, any color chosen from the default palette will use one of those first 256 color for its translation. Next, the game decides how bright the texel should be depending on the light in the area and how far from the camera it is. The darker it is, the further down it goes in the COLORMAP table, using the column the original color was found in. From this, you can see that red will fade down to brown, blue will fade down to gray, etc. Once the brightness is determined the texel is rendered to the screen using the entry in the COLORMAP.

On the other hand, if you have an invurn sphere, instead of shifting down depending on brightness, the brightness is completely ignored. Instead, the game jumps down to the 2nd-to-last row (the last is completely black) and uses the color it finds there to render the texel. This fits perfectly because when you have the invurn, 1) All colors are grayscale, 2) The brightness is reversed from the normal palette, and 3) Distance and brightness don't matter.

AFAIK, ZDoom doesn't use these translations anymore, which is why you can't change the palettes with a new PLAYPAL, and why each light level is distinct, rather than going in 16-step jumps.

Here's an image of DOOM.WAD's COLORMAP so you can see what I'm talking about...
Nice explanation, and it's good to hear that ZDoom doesn't use PLAYPAL anymore, too. That should make it easier to convert it to doing truecolour instead of 256 colours, which I think would look a lot better (especially with low light levels etc.). And given the 273 fps screenshot Randy posted, I don't think it'll cause too much of a slowdown, either. :)
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hey, I just thought of something... Let's open up HERETIC.WAD... Go to COLORMAP. Yup, there down near the bottom is a gold translation for the gold invurn effect found in Heretic. Imagine that. :)

Heh, Heretic also has a green-shifted rad suit palette in it's PLAYPAL lump, despite having no equivalent powerup.....
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

ZDoom of course still needs PLAYPAL because it is the only source for the palette data. What it doesn't use are all the special palettes for injury, item pickup etc.

I know that ZDoom doesn't use the invulnerability colormap but I never checked whether it uses the other ones. I think it does but I am not 100% sure.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

HotWax wrote:Hey, I just thought of something... Let's open up HERETIC.WAD... Go to COLORMAP. Yup, there down near the bottom is a gold translation for the gold invurn effect found in Heretic. Imagine that. :)
could you show me the colormap of it? what's hexen's?
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Graf Zahl wrote:ZDoom of course still needs PLAYPAL because it is the only source for the palette data. What it doesn't use are all the special palettes for injury, item pickup etc.

I know that ZDoom doesn't use the invulnerability colormap but I never checked whether it uses the other ones. I think it does but I am not 100% sure.
Well, that explains why my modified COLORMAP/PLAYPAL wad I made the other day wouldn't work. Too bad there isn't a compatibility option to turn it on and off (Randy, hint hint...).
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hirogen2 wrote:could you show me the colormap of it? what's hexen's?
Ask, and ye shall recieve.
Last edited by HotWax on Mon Aug 18, 2003 9:48 am, edited 1 time in total.
Anonymous

Post by Anonymous »

I can't see the Heretic Colormap.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

The Absolinzee wrote:I can't see the Heretic Colormap.
Odd. I could see it when I first posted, but after clearing my cache and refreshing, I can't... Let me try again.

[EDIT]Picture removed. See above.[/EDIT]
Last edited by HotWax on Tue Aug 19, 2003 8:25 pm, edited 1 time in total.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Hotwax: Maybe you cleared your Attachment in the UACP? Wow cool Heretic gold down there :P
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hirogen2 wrote:Hotwax: Maybe you cleared your Attachment in the UACP? Wow cool Heretic gold down there :P
I added both attachements one at a time, and they showed up in reverse order. Me being picky, I wanted Heretic's to show up first, so I removed it (from the bottom) and readded it (which moved it to the top). That most likely had something to do with the problem. However, both files WERE added when I posted, and I COULD see both attachments when I first posted. Probably a bug in the forum software that doesn't handle removed/readded attachments properly.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Why anyway did id soft use such an ending for E1M8?
User avatar
arcticwolf
Posts: 245
Joined: Mon Jul 28, 2003 4:52 am
Location: The world

Post by arcticwolf »

Hirogen2 wrote:Why anyway did id soft use such an ending for E1M8?
Ask them. :)
User avatar
Enjay
 
 
Posts: 26498
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

Hirogen2 wrote:Why anyway did id soft use such an ending for E1M8?
This is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning." - Winston Churchill, November 10, 1942.


The end of E1M8 is the end of the sharware Episode, or to put it in perspective, the "teaser" episode. The end of E1M8 is suppose to represent you getting transferred to Deimos where the fight just gets bigger and badder. It's supposed to tell you there is more, lots more, to come and to make you want to part with your green folding stuff to see it.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Post by Hirogen2 »

Hm. id could have made a linedef with 9:LineHorizon to mark the way to Deimos. Oh well, 9 was not invented until 2003. :-)

Return to “Closed Bugs [GZDoom]”