Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
BlueBeast

Setting Transparencies in Sprites???

Recommended Posts

I'm pretty good at computer artwork, but it's funny that a thought had just occured to me about setting tranprencies.

After (or while ) creating a picture you have to use the Doom pallette. But the use of cyan for tranparency is because it's not in the Doom Pallette.... But then how do you use the Doom pallette to create a picture whe theres no cyan?

Whats more, how do you load the Doom pallette into an already created picture, needing tranparency, again, with no cyan in the pallette?


Ive replaced sprites in Wintex, but that was just a modification of an already existing sprite, so what tranparency was there never changed.

What do I do (using Paintshop Pro)?

Thanks in advance!

Share this post


Link to post

cyan is automagically made to be not there when doom loads up the sprites or texture of graphics, you don't need to set it as anything. As for getting the Doom pal, with PSP at least, simply open up an existing sprite on your hard drive, select Colors and Save Pallet (or something along those lines) and that will save the pal. Then when you want to load that pal, just click Colors again and Load Pallet. Tada!

If the picture lacks cyan everything will show up (for instance, if you extracted the imp sprites and made the cyan in all of them into red or something, they'd show up as imps with a red box around them in the game) so just fill in the parts you don't want to show with cyan.

Share this post


Link to post

Cyan is just a convention, used by some of the first tools, and many others from that point on. Other programs will use different colours - DeePSea uses magenta by default (although it can be tailored to your preference) and I'm aware of one other prog that uses a sort of dirty green colour.

The reason it is just a convention is that the Doom graphics format has areas with no colour. Doom does not simply not show areas that are cyan, the invisible areas have no colour - the cyan was removed when the editing tool put the graphics into a WAD. They are not cyan, or anything else. It's the editing tools that convert the PCX or BMP or GIF or whatever files to the Doom format. It's the tools that "see" an area marked with cyan, or whatever, and convert it to a "no colour" area when the conversion to the Doom format is done. When the process is being reversed, a Doom graphic with areas of no colour has those areas filled in with cyan (etc) by the Doom editing tool when it converts it to a PCX, BMP etc.

On how you get it when it's not in the palette - there are a few colours in the Doom palette that are exactly the same, so you can lose one of them and not lose the full range of colours present in the game by adding an additional colour to the range for editing purposes.

Edit: Heh, I think I must have said the same thing about 5 times in the second paragraph.

Share this post


Link to post
Enjay said:

Edit: Heh, I think I must have said the same thing about 5 times in the second paragraph.

Yeah, but you know you have repeat it at least 5 times, 5 different ways to get some chance of it sinking in:)

Share this post


Link to post

If I've understood the specs correctly, you can't actually use the color in palette entry 0xFF in a Doom graphic, because 0xFF marks the end of a column segment. Therefore, the most logical way to handle colors to avoid problems would be to replace the last entry in the palette with the color that you want to use for transparency.

Share this post


Link to post
Fredrik said:

If I've understood the specs correctly, you can't actually use the color in palette entry 0xFF in a Doom graphic...


Is that the sort of pinky brown colour (167, 107, 107)? If so, I certainly have it in a few graphics - paint shop pro tends to use it in a few pixels when you convert a "fleshtone" graphic to the doom palette. I just checked in Zdoom and PRBoom and both showed it correctly (ie I could see the colour on the sprite). I couldn't be bothered making an original exe compatible sprite patch with the sprites I had handy with the colour in it.

Of course, that was the colour that used to show up as "holes" in graphics (sprites, walls, console) in timmie's ZdoomGL, so there is quite possibly something in what you say. Although, timmie has since fixed that.

Share this post


Link to post
Fredrik said:

If I've understood the specs correctly, you can't actually use the color in palette entry 0xFF in a Doom graphic, because 0xFF marks the end of a column segment. Therefore, the most logical way to handle colors to avoid problems would be to replace the last entry in the palette with the color that you want to use for transparency.

Yes and no. There is column length info that lets one safely decode each column. Then one can use FF as a safety feature to make sure all is well.

So any color can be used for transparency to the tool being used to do the conversion to the DOOM graphic format.

IIRC stock DOOM did just use FF (ignoring the column length info) for a slightly faster code draw. This is a flaw that was exploited by something that I can't recall - but it does make for screwed up graphics in DeePsea and probably others too:)

As Enjay noted, ZDOOM, ZDOOMGL and PRBOOM plus LEGACY will display the FF indexed color correctly. I haven't checked others, but probably all the BOOM derivates do it the right way.

Share this post


Link to post

For what it's worth, I noticed when you edit a sprite from Wintex, that pallette replaces one of the repeated black pixels with cyan. I'm presuming as Enjay pointed out that this is wintex's reference to create that color transparent when reloaded into your WAD.

This is actually my newbie fault because I failed to mention that the sprites I was to edit this time were created using Doomview, which uses black to fill in the previously transparent areas, which of course isn't a problem since Doomview doesn't edit.


On a side note, I have catagorized all the file types in DOOM2 for my ease in locating and definitions, using many different folders in respective catagories. I'd like to share this 'file system' sometime for those like me who don't know every graphic and sound by their names. Maybe some suggestions? And I'm not wholly done yet since now I have found the list of what patches make up what textures. But soon.

anyway, Thanks again for all the help!

Share this post


Link to post

For what it's worth, and to those newbies like me, when editing an image from wintex, the pallette does indeed have the transparent color (cyan in wintex's case) replacinga rdundant color in the pallete.

Pretty much in line with everything mentioned above just to clarify.

My new sprites have worked just fine.


Just wanted to finalize this thread is all

Thanks everyone!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×