Decals Should Be Included

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Ty Halderman
... in rememberance ...
Posts: 282
Joined: Thu Jul 17, 2003 9:53 pm
Location: New Orleans LA
Contact:

Post by Ty Halderman »

Related?
rh-log.txt wrote:September 27, 2003
- Changed the transparent color index from 255 back to 0. 0 is more convenient
because:
1) Images that are used as alpha masks (primarily decals) already
use color 0 as transparent, so they no longer need special processing.
2) PNG images need 255 fewer bytes to mark color 0 as transparent than they
need to mark color 255 as transparent. But this won't really be important
until I add support for PNG images (which will probably happen, but who
knows when).
The only reason I switched to 255 was because that was what BUILD used, so by
using the same transparent index, I could memory map its tiles read-only and
use them directly.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

Enjay wrote:how do I set up an PNG to have offsets that will be read by Zdoom?
With the attached program I wrote. It is a very simple command-line utility that can create alPh and grAb chunks in a PNG image. It can also recompress them in an effort to make them smaller. (Definitely do this if you save the PNG with PhotoShop, because its PNG writer is horribly inefficient.)

Code: Select all

Usage: setpng [options] <source file> <output file>

Options can be:
        -alph         Create alPh chunk in output file
        -noalph       Remove alPh chunk from source file
        -grab <x> <y> Set contents of grAb chunk in output file
        -z            Recompress IDAT chunks
Example: To set the offset of an image to (16,16):

Code: Select all

setpng -grab 16 16 oldfile.png newfile.png
Example: To mark a grayscale PNG as a decal:

Code: Select all

setpng -alph oldfile.png newfile.png
Example: To do both of the above and also recompress the image:

Code: Select all

setpng -alph -grab 16 16 -z oldfile.png newfile.png
Attachments
setpng.zip
This program creates ZDoom-specific chunks in a PNG image.
(38.36 KiB) Downloaded 1063 times
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

Enjay/Randy:
Hm, how about merging Enjay's hhdecals.wad into zdoom.wad?
User avatar
Enjay
 
 
Posts: 26979
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

randy wrote:the attached program
I've DL'd it and will get round to giving it a try later.

Thanks.
User avatar
Sparky
Posts: 233
Joined: Sat Jul 19, 2003 10:04 am
Location: Kitchener, Ontario, Canada

Post by Sparky »

enjays decals are just doom ones
im sure randy could make some weapon specific ones
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Why don't YOU make them if it bothers you that much? Now you know how randy feels...

:evil:
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Nobody likes my decals? =(
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

I thought your decals were good - Id change the frost one though, I think it would be nicer as a fading blue blob of something.
User avatar
Enjay
 
 
Posts: 26979
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Ty Halderman wrote:Related?
I suspect so. That was the bit of RH-LOG.TXT that caught my eye when trying to find a reason too.
User avatar
bimshwel
Posts: 725
Joined: Tue Jul 15, 2003 5:15 pm
Location: misplaced
Contact:

Post by bimshwel »

Am I the only person who uses the stretch and shade features for decals?
(don't answer that, I want to think I am the only one)
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Chilvence wrote:I thought your decals were good - Id change the frost one though, I think it would be nicer as a fading blue blob of something.
Yeah, I made them real late and night and couldn't think of anything else to use. Besides, they're shards of ice so I didn't think a fading blue decal would be logical.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

I think it would work, they are MAGIC shards of ice after all
Post Reply

Return to “General”