Spider Mastermind
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > XWE > Transparency index in in loaded/saved graphics
 
Author
All times are GMT. The time now is 20:57. Post New Thread    Post A Reply
myk
volveré y seré millones


Posts: 15226
Registered: 04-02


Is it possible to change the index read as "transparent"?

As far as I know it's hardcoded per game, and in DOOM it's 247 while in some other games it's 251.

If it's not possible currently, I'd like to request it for the next version or beta. Perhaps it could be specified per game, but all I really care about is DOOM, so a single value that overrides the defaults would suit me fine.

If, for example, I were to set the transparency index to 255, it would treat color 255 in a loaded graphic as the transparent area, or it would give the transparent area of a saved graphic index 255 (instead of 247).

Also, it would be convient (in combination with the above) if you could define what color the transparency index uses. In DOOM this color is to be used instead of cyan for any graphics saved to the hard drive. Perhaps to remind the user, this color would also be used within XWE itself to surround graphics, instead of cyan (though if it's always cyan it's okay).

Old Post 09-06-07 15:52 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11223
Registered: 07-07


This is false. Doom uses all of the colors in its palette, transparency is handled differently. See this and this. In Doom's graphic formats, transparent pixels are simply not described.

Old Post 09-09-07 11:04 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15226
Registered: 04-02


I know that, but when a graphic is converted to a BMP or GIF to be saved to disk for editing, the program (XWE in this case) has to use one of the 256 colors Doom can use to represent the protions of the Doom graphic where nothing is drawn. All the programs I know take color 247 (black in Doom, being the last of the dark blues range) and uses it for the exported graphic's surrounding color, painting it cyan, magenta, dark green, or whatever. I don't know about DeepSea (I don't use it), but winTex, DeuTex and XWE don't let you change that 247 to something else, as far as I know.

Old Post 09-09-07 13:47 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6382
Registered: 12-00


The one you don't use (DeePsea) does allow you to change the colour and palette index.

By default, DeePsea uses index 251 which is magenta. It does not change this to any other colour but just uses the normal colour from the palette. Whilst this means an extracted graphic has a "correct" palette, it does mean that if you try to import/export a graphic that uses magenta, it will be treated as marked for transparency. However, this has caused me minimal problems over the years of using it.

I don't *think* any of the original Doom graphics use index 251. However, in the other games DeePsea uses a similar system and the colour/index used does appear in standard graphics (Strife seems to be particularly bad). However, with the options being customisable, it's less of a problem than it could be.

Old Post 09-09-07 14:26 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15226
Registered: 04-02



Enjay said:
I don't *think* any of the original Doom graphics use index 251.
That seems to be correct. Jack Vermeulen scanned all the graphics and found out only colors 251 and 255 is unused in the two DOOMs.

I plan to use 255 as the background, as I plan to edit a good deal of DOOM based graphics, and I think I'll likely use 251 at some point in my custom graphics since it's part of the magenta range. Color 255 is an unrelated color that (as far as I know) Doom uses only to draw the dots in the fps meter when in devparm mode.

My guess is that the id guys used 255 as the background for graphics when editing them in other programs.

Old Post 09-09-07 14:51 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6382
Registered: 12-00


Why do you need index 247 to be available though? Index 0 is black (0, 0, 0) just like 247. That's why most tools use it. Unless you are altering the palette, you aren't losing anything by taking away 247 because index 0 has the same colour.

Old Post 09-09-07 15:32 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15226
Registered: 04-02



Enjay said:
Why do you need index 247 to be available though?
Some graphics from the games using the blue range use it, and I'll be extracting resources and modifying them, so I don't want to have to color those in manually. And aside from my case, which could be labeled as nitpicky because there should be few such resources, I think being able to use 255 (or 251) for the background is convenient for working with IWAD resources, in general.

EDIT: Look at POSSD4D6 in XWE. One would think someone shot a bullet through its butt.

Old Post 09-09-07 15:58 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6382
Registered: 12-00



myk said:
EDIT: Look at POSSD4D6 in XWE. One would think someone shot a bullet through its butt.


Heh, yeah I see what you mean. :) Recolouring all the sprites manually would be a pain if quite a few were affected by this.

However, what XWE should really be doing (IMO) is, if it is using index 247 as cyan, it should remap any pixels that use 247 to index 0 when exporting. Perhaps that should be the feature request? Of course, the option should be togglable to allow cases of special/custom palettes.

Old Post 09-09-07 16:38 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 15226
Registered: 04-02



Enjay said:
Perhaps that should be the feature request? Of course, the option should be togglable to allow cases of special/custom palettes.
Maybe that could be added, but personally I'd rather just have a cuztomizable index and a customizable color (aside from the existing defaults). All around, it's better, as indeed it would be useful for any game or any TC.

The XWE INI file could have an entry for the index (0-255), and another for the color (RGB, 0-255 each).

Old Post 09-09-07 16:48 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11223
Registered: 07-07



Enjay said:
However, what XWE should really be doing (IMO) is, if it is using index 247 as cyan, it should remap any pixels that use 247 to index 0 when exporting. Perhaps that should be the feature request?


Or it could export to indexed PNG with an alpha map. It would allow full 256 colors + transparent pixels (just like Doom graphics) and solve this issue at least for people working with PNG.

PNG is Teh Awsum™.

Old Post 09-10-07 10:01 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6382
Registered: 12-00


ATM it is creating holes in graphics that shouldn't have holes so it should be addressed IMO.

I like both my and myk's suggestions simply because, even now, there are still quite a few tools that don't handle PNG transparency very well but plenty (all?) relevant tools will handle BMPs.

Old Post 09-10-07 12:51 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 20:57. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > XWE > Transparency index in in loaded/saved graphics

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.