Advertisement

Trasparent BMP texture

Started by October 09, 2006 05:27 PM
4 comments, last by Oluseyi 18 years, 4 months ago
How do you make a certain color transparent, for a texture? This would be a color such as red, and everything else is non-trasparent. I am making textures for an existing game, because the game allows that. All you need to do is just add the textures to a file and they show up in the game. I have tried many ways to save the image, and most of the time the trasparent areas just show up as green, but sometimes the're white. What am I doing wrong, how can I fix it? Program I'm using to make the textures: Photoshop CS2
The BMP format doesn't support alpha (transparent) channels, so you'd have to use a colorkey within the game. A colorkey basically says "treat this color as transparent"; typically magenta is used as a colorkey, but you can use whatever color is convienient.

If you're looking for a format that supports alpha layers, I think the PNG format does.
Advertisement
Well the game uses BMP, and the red areas are trasparent, but when I try to make it the same way, it treats the red as green in gameplay, and sometime not offten white(If I chage save settings).
Quote:
Original post by The Little Guy
Well the game uses BMP, and the red areas are trasparent, but when I try to make it the same way, it treats the red as green in gameplay, and sometime not offten white(If I chage save settings).

Are you sure you have the correct bit-depth? Common bit-depths for BMP are 8- and 24-bit; make sure the format of your images matches those of the game. Passing a 24-bit image to a program expecting to operate on an 8-bit image will not yield the results you expect.
The colors are 24 Bit, but I can't save it as a 24 Bit. They have the mode on indexed color, and that only lets me save as 8 Bit, but they also have 8 Bit images in the game too. Is there a setting that I can change in photoshop for the image?
24-bit is not and indexed color mode. For BMP, indexed color is 2-, 4- or 8-bit (2- and 4-bit are so old you almost never see them anymore).

This topic is closed to new replies.

Advertisement