Page 2 of 2
Posted: Fri Mar 18, 2005 3:20 am
by bdbodger
Useing wacko's method will work but if you want semi transparent areas you will need to use the alpha channel method . Grey in the alpha channel will make those areas semi transparent how transparent depends on what shade of grey that you use .
Posted: Fri Mar 18, 2005 5:25 am
by Balr14
bdbodger, your shader is doing white blending, scrolling and scaling. It would be awfully slow for a simple transparency, as it requires multiple texture passes.
mcunha98, I would not use nomipmaps / nopicmip unless it is a very small and fine texture (like a wire fence). These values will prevent the texture from culling at a distance, which hurts performance and can look kind of odd.
Wacko, my version of Photoshop is fairly old, but it is possible to create a 32 bit TGA, using CMYK channels. This is true 32 bit color and is not supported by MOHAA (or any other game). You have to create the TGA as RGB channels (24 bit) and add an alpha channel to make it 32 bit. Maybe your version of Photoshop defaults to creating RGB and an alpha channel, mine doesn't. In any case, you should edit the alpha channel and clean up the black and white areas for best transparent results.
Posted: Fri Mar 18, 2005 6:53 am
by wacko
Balr14 wrote:Wacko, my version of Photoshop is fairly old, but it is possible to create a 32 bit TGA, using CMYK channels. This is true 32 bit color and is not supported by MOHAA (or any other game). You have to create the TGA as RGB channels (24 bit) and add an alpha channel to make it 32 bit. Maybe your version of Photoshop defaults to creating RGB and an alpha channel, mine doesn't. In any case, you should edit the alpha channel and clean up the black and white areas for best transparent results.
CMYK would be true 32bit, u're right and that's why everybody is saying it won't work in MOHAA. I'm using Photoshop 7, and here I even cannot save a CMYK image as Targa: This option simply doesn't show up if the image is CMYK. Also, in my version, I can make layers semi transparent and this information would be saved in an alpha channel automatically by saving the image as 32bit Targa. As an example, u can d/l a
shadow texture (both psd and tga) and try it with the shader below. This image got no alpha channel, just one layer with a gradient in opacity.
Code: Select all
textures/test/shadow
{
qer_editorimage textures/test/shadow.tga
qer_keyword utility
surfaceparm alphashadow
surfaceparm nonsolid
surfaceparm trans
polygonOffset //makes it float above the face to prevent z-fighting
{
map textures/test/shadow.tga
blendFunc blend
depthWrite
}
}
Posted: Fri Mar 18, 2005 7:56 am
by bdbodger
hmm never though of trying to make a layer semi transpartent . I know you can do that but never tried it in mohaa maybe I have been doing the hard way .
Posted: Fri Mar 18, 2005 1:42 pm
by mcunha98
Work !!!!!!!!!
Like Pantera tell, my problem is the final format to save, i select 24bit, in true, the correct format is 32 bits.
Thanks for all replys !!!!!!!!!!!!!!!
Posted: Sat Mar 19, 2005 1:17 am
by Balr14
Wacko, you have some decent knowledge of shader functions. The polygon offset is a very cool trick.