Custom Palette Issue

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Custom Palette Issue

Postby Marscaleb » Sat Jul 16, 2016 2:38 pm

So the custom wad I have been tinkering with uses a custom palette. I had ported over all of Doom 2's graphics to this new palette as a starting point. Whenever I had loaded this wad, however, I found that the title pic had noticeable errors in it where some colors turned to black.


You can see a dark line through the edges of the "DOOM" letters, dark lines through the explosions in the background at the bottom and side of the image, etc.

I had shrugged this off as simply my missing some of the colors when I ported it over. But today I tinkered with the mod a bit to fix some other textures. When I did, I noticed that these color problems I was seeing in the title pic were not actually present; this is something 3DGE is doing with my custom palette.

I was able to confirm this by loading my wad in GXDoomGPL; it does not have any errors.

After poking around in Slade, I found that the problem color was index 247, which in the original Doom palette was the darkest shade of blue, which also happened to be pure black and an exact match for index 0. (Index 0 is pure black both in the original Doom palette and my custom palette.)

So something in 3DGE is f***ing up and ignoring the palette actually contained in the wad, and instead replacing index 247 with either a forced copy of palette index 0 or a forced pure black.

I was about to check if this problem is occurring in Heretic, since it uses a different palette, but that same palette index in Heretic is a very dark brown, so even if I did know a tile that uses it, I might not be able to tell if it is using the correct color or not.

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Custom Palette Issue

Postby Coraline » Sat Jul 16, 2016 4:24 pm

Are you using a custom PLAYPAL lump? Or a colormap lump? Example wad? :)
\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Custom Palette Issue

Postby Marscaleb » Sun Jul 17, 2016 6:59 pm

Err, yes, by "custom palette" I am referring to a custom PLAYPAL, (which technically is 14 palettes, so I guess I could have been more specific.) And logically yes, there is also a custom colormap.

Here is a wad example. I've stripped out most of the graphics so it can be run as a pwad. Of course, even among the tiles that are there, most of them are going to look like crap anyway because I have not properly tweaked more than a couple tiles to look proper with this custom palette. But you can see the titlepic in there, which is the easy basis for comparison.
If you open the wad in slade you will notice that the graphics in here are remapped from the original Doom2 graphics to work with the new palette.

http://eightballgaming.com/downloads/cPal.wad

But as I said, this a problem that does not occur with other source ports. So either there is some palette settings in the DDF files that I don't know about, or there is something improperly set in source code.

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Custom Palette Issue

Postby Coraline » Sun Jul 17, 2016 8:07 pm

You can try editing DDFCOLM (colormaps.ddf) for now -- I will be away from programming for a couple of days, but it sounds like something might be overriding the custom palette. In the past, these were always solved by editing COLORMAP.ddf directly.

Regardless, I will take a look at soon as I can. Main computer went down, and my replacement (an underpowered netbook, of all things) really sucks. Just decided it would be best to wait for my new part to arrive. So, let me know if you are able to get it working properly.

EDIT:
Also, I know the DEBUG outputs some stuff about palette colors, like Black, White, Red, Green, and Blue. Also, while I can't compile, I can still look through the code on Git, so I will check it out later.
\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Custom Palette Issue

Postby Marscaleb » Sun Jul 17, 2016 8:12 pm

...huh. I'm noticing a few interesting things about how 3DGE handles new playpal's.

When I have been tinkering with this , I've been running it as an iwad, which started off as a direct copy of Doom2's iwad. For the wad I posted above, I stripped out most of the content, (since at this point it still felt too close to Doom 2's iwad for me to feel comfortable with sharing it online.) And I've noticed a few other differences between how it runs as an iwad versus a pwad.
Except for the wall textures, every art asset 3DGE is getting from the Doom 2 iwad is colored to match how it looks with the original playpal. The flats, the weapons, the weapon effects... Everything is colored with the original playerpal. Wheras when I run that pwad in GZDoom GPL, those items are now colored wrong since they are using the new playpal I supplied.

I guess this isn't really a problem, just an amusing observation. After all, if someone were to make a custom wad with a completely new palette, why would they be using the original textures?

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Custom Palette Issue

Postby Coraline » Sun Jul 17, 2016 8:24 pm

\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Custom Palette Issue

Postby Marscaleb » Sun Jul 17, 2016 11:25 pm

Well I'm not in a big hurry to get this one fixed, but I wanted to mention it while I still remembered it.

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Custom Palette Issue

Postby Coraline » Tue Jul 19, 2016 2:05 pm

Installed my hardware yesterday so I can return to 3DGE now :-)

It seems this has been an issue from as far back as EDGE 1.25. I have some ideas on how to fix it, but it will take a bit of work.
\(סּںסּَ` )/ۜ

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Custom Palette Issue

Postby Coraline » Thu Jul 28, 2016 2:21 pm

\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Custom Palette Issue

Postby Marscaleb » Fri Aug 05, 2016 12:24 am

Huh. That might be the right path to follow, but it doesn't fully explain it.
I mean, it is using the new palette in that image, otherwise the image would look noticeably wrong (just testing in Slade, the Cyberdemon would be gray.)
So it IS using the correct pallette, but it is making secondary assumptions about the palette. Specifically, it is assuming that index 247 matches index 0.


Return to “Support and Help”

Who is online

Users browsing this forum: No registered users and 1 guest