PNG Textures. Help?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Tragos
Posts: 624
Joined: Tue Jun 02, 2009 5:59 pm
Location: [Getting frisky with Xeno's]
Contact:

PNG Textures. Help?

Post by Tragos »

What is the best method when using PNG textures for Gzdoom? Should they be contained in .wad or Zip file? My main problem right now is getting doom builder to recognize that I want to use the higher res textures, and not the doom palette versions.... I've had trouble inserting my .png textures as raw data. Either I'm missing a step, or not doing something right. Can Zdoom use png textures? If not, I can edit my textures to a 256 color 8 bit version with only slight loss in detail... But the problem of the DOOM palette ruining my textures still exists.... How can I insert a new 256 palette? My project looks fine in Gzdoom, but I'd like to also make the Zdoom version look better. I've heard that a 8 player Gzdoom session is far too laggy. Which means I can't use it for the final release of my project.

I found this in the wiki:
Spoiler:

http://forum.zdoom.org/viewtopic.php?f= ... 0&start=45
If you look at my project here, you can see that it still looks decent despite the washed out textures. I believe the error I'm making is when I go to insert my textures into the .wad. I load them all under PATCHES. If someone has a better method please explain why and how. THANKS!
User avatar
Big-Boss
Posts: 94
Joined: Fri Nov 06, 2009 4:18 pm
Location: East Coast United States

Re: PNG Textures. Help?

Post by Big-Boss »

I recommend using SLumpEd and a pk3/zip. It has full support for PNGs, directories and so on. And yes, G/ZDoom can use PNG textures, as I am using them in my own sorry excuse for a project. Using SLumpEd just import the PNG you want and follow the normal procedure for adding patches (don't worry, true-color is preserved in the case of PNG's), but remember to put them in the PATCHES directory. Or you can do the same in the TEXTURES directory.

But yes, I really using SLumpEd and the pk3/zip format, you wont regret it :D.
User avatar
Tragos
Posts: 624
Joined: Tue Jun 02, 2009 5:59 pm
Location: [Getting frisky with Xeno's]
Contact:

Re: PNG Textures. Help?

Post by Tragos »

Thanks for the fast response! I was just in the middle of editing my post, lol. I'll give this a shot when I have the time. Thank you!
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: PNG Textures. Help?

Post by Gez »

Tragos wrote:What is the best method when using PNG textures for Gzdoom? Should they be contained in .wad or Zip file?
Both work just as well.
Tragos wrote:My main problem right now is getting doom builder to recognize that I want to use the higher res textures, and not the doom palette versions...
What Doom Builder thinks isn't really important. What matters is what the ZDoom uses, after all.
Tragos wrote:I've had trouble inserting my .png textures as raw data.
Use Slumped rather than XWE then.
Tragos wrote:Can Zdoom use png textures?
Yes. ZDoom supports PNG, JPG, TGA and DDS image formats in addition to Doom's native formats. Though only Doom graphics and PNG can have offsets AFAIK.
Tragos wrote:How can I insert a new 256 palette?
With a custom PLAYPAL.
Tragos wrote:My project looks fine in Gzdoom, but I'd to make the Zdoom version look better. I've heard that a 8 player Gzdoom session is far too laggy. Which means I can't use it for the final release of my project.
There's no reason GZDoom multiplayer would be laggier than ZDoom multiplayer. It's the same netcode.
User avatar
Big-Boss
Posts: 94
Joined: Fri Nov 06, 2009 4:18 pm
Location: East Coast United States

Re: PNG Textures. Help?

Post by Big-Boss »

Anytime :). PM me if you need any help with SLumpEd and setting up a pk3 environment, I am always happy to help.
User avatar
Tragos
Posts: 624
Joined: Tue Jun 02, 2009 5:59 pm
Location: [Getting frisky with Xeno's]
Contact:

Re: PNG Textures. Help?

Post by Tragos »

Thanks a bunch! I really love the community here. :) How exactly to I make my own playpal? Last time I tried, this happened:
Spoiler:
I've not been able to test anything over 4 players in Gzdoom which runs just fine. In my own experiences with Gzdoom, I've almost always read the complaint that is was laggy and unstable. Who started this myth? I think the blame should be placed on kids with poorly maintained rigs and limited understanding of how to setup a multi-player game.
User avatar
Big-Boss
Posts: 94
Joined: Fri Nov 06, 2009 4:18 pm
Location: East Coast United States

Re: PNG Textures. Help?

Post by Big-Boss »

GZDoom has (someone correct me if I am wrong) 24-bit texture support if you use PNG. So no need really. Same with sprites. As an example, in my mod, even though it is DooM based (i use the DooM2 wad so the DooM playpal would apply if I used DooM format images), I use PNG textures and sprites that are not anywhere near the DooM palette like the Stalker from Hexen and it appears just fine.

PlayPal butchers things too much, so in the end, PNG or other image formats work the best with G/ZDooM.


EDIT: You're probably right about the rumor as GZDooM runs just fine on my 5-year-old P.O.S. laptop.
User avatar
Tragos
Posts: 624
Joined: Tue Jun 02, 2009 5:59 pm
Location: [Getting frisky with Xeno's]
Contact:

Re: PNG Textures. Help?

Post by Tragos »

My main reason for developing my project on Zdoom over GZdoom is because not everyone's machine handles Gzdoom well. Also, I prefer the software renderer despite how nice everything looks in Gzdoom. The only reason I went to Gzdoom is because of my issues with the textures. Though I may change my mind about this at some point once I finish the sprites...
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: PNG Textures. Help?

Post by InsanityBringer »

Be sure, when creating a new PLAYPAL to also create a new colormap. That lump is a lookup table that maps one palette index to a darker one in lower lighting conditions. There are tools to do it, XWE included, but your results may be better using other tools.
User avatar
Tragos
Posts: 624
Joined: Tue Jun 02, 2009 5:59 pm
Location: [Getting frisky with Xeno's]
Contact:

Re: PNG Textures. Help?

Post by Tragos »

Though this may not be the best method, I feel like kicking myself for how easy it was... I just imported all the bmp, then created png versions and imported as raw data. Worked like a charm. I must have been suffering from a chronic brain fart..... I'm ecstatic that my textures finally look the way their supposed too! In Gzdoom at least..... Now I'm going to tackle the playpal and colormap.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: PNG Textures. Help?

Post by NeuralStunner »

Here's a good way to do that. I'll use my own palette, which I created, as an example.

1. Lay out your palette as a bitmap or PNG. 16x16 works well. Mine looks something like this:
PlayPal.png
PlayPal.png (1.44 KiB) Viewed 4096 times
2. Use Spidey's Palette Dump Tool from the DoomCrap utilities to make an orderly, indexed palette from this image. This ACT file will become your PlayPal lump.

3. Create a new 256x34 bitmap or PNG, and apply your palette. The top row will be all the entries from your palette in order, 1 pixel apiece. The next 30 rows will be the varios fade levels for each palette color. (The 32nd row should be black.) The 33rd row was used for Inverse/gold mappings and may not even be useful in ZDoom. The last row should be all black as well. Here's the ColorMap for my palette:
ColorMap.png
ColorMap.png (3.26 KiB) Viewed 4096 times
4. Save this image in RAW file format. This will save 1 byte per pixel, but no color information.( Each byte inderectly indexes a color in your palette.) Import this RAW file directly as your ColorMap lump.

5. Enjoy your unique palette! :)

Also of note:
Using your palette in the ye olde versions of Heretic etc. will require a mixing table. The easiest way to do this is in a good image editor with layering. Create a 256x256 bitmap, each column of pixels from left to right will be one color as ordered in your palette. Copy this as a new layer, which should be 50% opacity, and rotated 90 degrees left. Then merge the layers together and apply the palette. This bitmap is imported like a paletted "DooM" format image, to be your TintTab (or however it is called) lump. Example TintTab (which I don't actually need for ZDoom, but it was fun to do):
TintTab.png
TintTab.png (29.87 KiB) Viewed 4099 times
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: PNG Textures. Help?

Post by Gez »

NeuralStunner wrote:Also of note:
Using your palette in the ye olde versions of Heretic etc. will require a mixing table.
Heretic and Hexen. Heretic's table corresponds to about 60% translucency, and Hexen to 40%, or the reverse.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: PNG Textures. Help?

Post by NeuralStunner »

Thank you, that's curious. :)

And Strife has one as well - but the lump is called XLATAB.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: PNG Textures. Help?

Post by InsanityBringer »

NeuralStunner wrote: This bitmap is imported like a paletted "DooM" format image, to be your TintTab
Actually I think it should be in the flat format (which is different than the picture format)
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: PNG Textures. Help?

Post by NeuralStunner »

InsanityBringer wrote:
NeuralStunner wrote: This bitmap is imported like a paletted "DooM" format image, to be your TintTab
Actually I think it should be in the flat format (which is different than the picture format)
Huh. I just checked this out, and you are right. Thank you, too. :wink:
Saved as "image" format, the blending is, uh, not correct at all. This makes sense: Flats are 1-byte per pixel, the TintTab would be a RAW format image as well (as it, too, needs only reference the indexes).

So here is the size each lump should be:
PlayPal: 10,752 = 768 x 14 (with all the damage/pickup blends included, 768 for a basic ZDoom-only palette.)
ColorMap: 8,704 = 256 x 34
TintTab: 65,536 = 256 x 256

BTW, to make all the damage/pickup blends, just make extra copies of the original palette with varying degrees of tint and save them separately. Then Palette Dump those too, and append them one at a time to the end of your first PlayPal lump with a byte editor. (MS-Dos Editor with the switch /256 works well, each line is 256 bytes in "binary" format.) All in all you will need 1 straight palette, 8 degrees of pain tinting, 4 degrees of pickup tinting, and 1 extra copy of the main palette (for what I'm not sure, but it should be there just in case). 14 sets of 768 bytes each.

Other Notes/questions:
- Interestingly, in vanilla Heretic (Hexen too maybe) translucent foes' colors are negotiated before the "GoldMap" is applied, while the HUD weapons (when the Shadowsphere is enabled) are not. And the skies are apparently not recolored at all. Strange.
- When I'm finished getting corrected ( :P ) I think I can add a short "how-to" in the Editing forum, what do you think?
- BTW, is there a way to change the tint color for pickups in ZDoom? If not, would be nice if there were.
Locked

Return to “Editing (Archive)”