Newbie Modder

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

Graf Zahl wrote:
Boingo the Clown wrote: I am continuing to use the DooM palette, since that is what I am used to using at the moment.
Why don't you just allow each texture to have its own palette? You really don't need to remap anything and can keep it as optimized as possible.
How do you do this? Or does it only apply to texture/flats and not sprites?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

If you put a PNG in your WAD its original palette will be used.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Graf Zahl wrote:If you put a PNG in your WAD its original palette will be used.
What's the pallette's index for transparency in PNG in Gzdoom? Or do I have to set up an alpha channel?

I almost cracked how-to do 32-bit colored weaponry :D Stay tuned.
EDIT:
YAY! I solved it :)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

PNG transparency is done with the alpha channel. There's no need to define a transparent index for a format that stores this information internally.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Then it cannot be used in Gzdoom.

Alpha Channel and 8-bit exclude each other and when I tried making an alpha-chanelled png (32 bit) imported to the wad, it DID import (as raw data) but Gzdoom didn't recognize it as a texture.

Technical limitations or am I doing something wrong?

EDIT:
I did a test for 32 bit graphics (paletted pngs) AND masked pngs. Both work :)
This is important as we can now use 32-bit graphics for Arctic Wolf Redux! Or at least the weapons I'm planning to do.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Paul wrote:Then it cannot be used in Gzdoom.

Alpha Channel and 8-bit exclude each other
PNG supports full alpha channel information for a palette. Normally this is merely used for a traditional transparent color but it can really be any value between 0 (transparent) and 255 (opaque) for each palette entry.
User avatar
Boingo the Clown
Posts: 102
Joined: Sat Dec 03, 2005 17:40
Location: North of New York, West of Montreal, East of Toronto, and South of Hell
Contact:

Post by Boingo the Clown »

Enjay wrote: It's also worth highlighting how offsetting such a texture works because it confused me for a while - and there are now 2 options to try and combat the confusion.

By default, a texture will be offset by pixels in the original image. Therefore, if you have a 256x256 image scaled to be a 128x128 texture, as per Nash's example, and you give it an offset of 64, it will only be shifted by quarter of its width as opposed to a normal 128x128 texture that would be moved by half its width.

However, you can set an option to change the above. I'm not sure exactly how it's done in XWE (I use DeePsea) but it involves putting a value into the flags field for that texture. This option allows the texture to be offset by "world units" rather than pixels. So, again using the above example, an offset of 64 would move your scaled texture by half its width.

Option 1 allows for very fine control of texture offsets
Option 2 allows hi-res textures to be easily slotted in to replace existing ones or to behave as their effective size rather than their actual size.
I have just discovered that changing the flags field for a texture in XWE to $8000 will switch it to using world units.
Last edited by Boingo the Clown on Fri Jan 13, 2006 19:40, edited 1 time in total.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

$8000
Locked

Return to “GZDoom”