Advertisement

Creating a texture with an alpha channel...

Started by August 21, 2002 12:25 AM
7 comments, last by Moe 22 years ago
Recently there have been quite a few posts agains the use of color keys for specific reasons, which I won''t go into here. Instead, the best method seems to be using textures with alpha channels in them, and use the alpha channel as the ''color key'' to prevent certain parts of the image from being drawn. The alpha channel can also be used to create parts of the image so that they are partially transparent. I have been messing around with Paintshop Pro 7, and I am interested in creating my own .tga files with alpha channels, but I can''t figure out how. Basically I want to be able to edit the alpha channel in some way so that I can get a color key effect going. I have been playing around with masking, but I really have no idea what I am doing. Can someone please give me a few steps on how I could/should be creating a .tga texture with an alpha channel? Moe''s site
I''ve worked with Photoshop, but only the older Limited versions. But I know how to make alpha channels in Pain SHop Pro. Jasc Paint Shop Pro to be specific. You can download it for free too, so if ya get that, i can tell ya how to make an Alpha channel.

--Vic--
Advertisement
http://www.gamedev.net/community/forums/topic.asp?topic_id=85930

2DNow - for the 2D game developer in you
quote: Original post by Roof Top Pew Wee
I''ve worked with Photoshop, but only the older Limited versions. But I know how to make alpha channels in Pain SHop Pro. Jasc Paint Shop Pro to be specific.

Just take another quick look at my original post...



Moe''s site
Well, first off I am not too sure about using TGA, why dont you just use PNG which is a very nice file format ?
Anyway, your question is about alpha layer, right.
As I explained in another post recently, to create your alpha layer, you need to create a new channel, it''s not just a question of making some layer transparent, you also need to explicitly create a new channel in addition to the default Red Green and Blue.
To create a new channel, simply create a Mask.
It''s that simple.
When you do that, a new channel is added to the list of channels.
I am not sure if you decide to have several, but if you have only one, that''s it. To modify it, just select the Channel in question, and you should have a greyscaled image to work on.

If you dont understand, and if there is more people asking how this stuff works, I might just do a mini tutorial...


Sancte Isidore ora pro nobis !
-----------------------------Sancte Isidore ora pro nobis !
By all means, write a small tutorial on doing it! I will play around with a few more things and see if I can get it to work. Thanks!

Moe''s site
Advertisement
Ok, I am still not getting it. I create a new image and save it at a .tga (or a .png. I really don''t think that would make a difference because they both are 32 bits and support an alpha channel. I make a black background and paint whatever I want on top of that. Then I select Masks->New->From Image. I then select "This Window" and "Source luminance" and click ok. I save the image again, and exit PSP. I then try using it in a program that uses .tga files to show how the alpha channel can be used to make things transparent (you can find the program I am using at http://www.sulaco.co.za/opengl.htm under the section called ''Transparent TGA files and Fog''. I make sure to replace the .tga file that is included with the program with the same named file of my own.) Now where I thought there should have been a transparent area, it is white. This doesn''t seem to be having the effect that I thought it would. What am I doing wrong?

*http 500 x26 (Yeesh!)

Moe''s site
Never mind, I figured it out with a bit more playing aroound.

Moe''s site
and I created a little tutorial, maybe it should clear things up ?



Sancte Isidore ora pro nobis !
-----------------------------Sancte Isidore ora pro nobis !

This topic is closed to new replies.

Advertisement