PNG Textures. Help?

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

PNG Textures. Help?

Postby Tragos » Thu Nov 12, 2009 12:01 pm

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:



viewtopic.php?f=19&t=22280&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
Tragos
2d > 3d "Remember: short, controlled bursts"
Banned User
 
Joined: 02 Jun 2009
Location: [Getting frisky with Xeno's]

Re: PNG Textures. Help?

Postby Big-Boss » Thu Nov 12, 2009 12:11 pm

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
Big-Boss
Du lager trist meg med svikten din
 
Joined: 06 Nov 2009
Location: East Coast United States

Re: PNG Textures. Help?

Postby Tragos » Thu Nov 12, 2009 12:12 pm

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!
User avatar
Tragos
2d > 3d "Remember: short, controlled bursts"
Banned User
 
Joined: 02 Jun 2009
Location: [Getting frisky with Xeno's]

Re: PNG Textures. Help?

Postby Gez » Thu Nov 12, 2009 12:13 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: PNG Textures. Help?

Postby Big-Boss » Thu Nov 12, 2009 12:13 pm

Anytime :). PM me if you need any help with SLumpEd and setting up a pk3 environment, I am always happy to help.
User avatar
Big-Boss
Du lager trist meg med svikten din
 
Joined: 06 Nov 2009
Location: East Coast United States

Re: PNG Textures. Help?

Postby Tragos » Thu Nov 12, 2009 12:24 pm

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
Tragos
2d > 3d "Remember: short, controlled bursts"
Banned User
 
Joined: 02 Jun 2009
Location: [Getting frisky with Xeno's]

Re: PNG Textures. Help?

Postby Big-Boss » Thu Nov 12, 2009 12:27 pm

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
Big-Boss
Du lager trist meg med svikten din
 
Joined: 06 Nov 2009
Location: East Coast United States

Re: PNG Textures. Help?

Postby Tragos » Thu Nov 12, 2009 2:17 pm

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
Tragos
2d > 3d "Remember: short, controlled bursts"
Banned User
 
Joined: 02 Jun 2009
Location: [Getting frisky with Xeno's]

Re: PNG Textures. Help?

Postby InsanityBringer » Thu Nov 12, 2009 4:36 pm

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
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: PNG Textures. Help?

Postby Tragos » Fri Nov 13, 2009 12:25 am

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
Tragos
2d > 3d "Remember: short, controlled bursts"
Banned User
 
Joined: 02 Jun 2009
Location: [Getting frisky with Xeno's]

Re: PNG Textures. Help?

Postby NeuralStunner » Fri Nov 13, 2009 4:02 pm

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 2343 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 2343 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 2346 times
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: PNG Textures. Help?

Postby Gez » Fri Nov 13, 2009 4:07 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: PNG Textures. Help?

Postby NeuralStunner » Sat Nov 14, 2009 11:42 am

Thank you, that's curious. :)

And Strife has one as well - but the lump is called XLATAB.
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: PNG Textures. Help?

Postby InsanityBringer » Sat Nov 14, 2009 11:49 am

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
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: PNG Textures. Help?

Postby NeuralStunner » Sat Nov 14, 2009 12:45 pm

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.
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit


Return to Editing (Archive)

Who is online

Users browsing this forum: A_D_M_E_R_A_L and 2 guests