Alpha shading -1 reply

  • 1
  • 2

Please wait...

Guest

I didn't make it!

0 XP

 
#1 11 years ago

Now, I have a picture (Just a simple fire picture, .Jpg format, and 512x512), and I added a Alpha channel to it. Now, I tryed it ingame, and it did not work.

I thought maybe it would use shading, and if so, how would I get it to work.

Thanks.




Guest

I didn't make it!

0 XP

 
#2 11 years ago

Edit: It did work, but I could not see through the Alpha channel.

I was wondering is some one could give me a tutorial on Shading, seeing as I can find none in the Master Sticky.




Black Hawk 86

Sentenced To Life

50 XP

12th January 2007

0 Uploads

289 Posts

0 Threads

#3 11 years ago

I'm not sure but I think that alpha channel doesn't work on .jpg format Try saving it as .tga format

I also have question about this kinda thing:

How do I make alpha channel on paint shop pro 9?




Szico VII

We want FF7-2/remake!

50 XP

14th September 2003

0 Uploads

1,683 Posts

0 Threads

#4 11 years ago

Either use tga format or just use a simple png with transparent sections.




_NRN_R_Fast_Eddie

1st Lieutenant of the NRN

50 XP

24th March 2005

0 Uploads

207 Posts

0 Threads

#5 11 years ago

PNG has file size superiority over TGA format, it gives you all the functionality without the size. Fact of JPEG format is you can NOT use transparencies with them, you must use TGA or PNG for JA if you want a transparency layer. You'll also need to mess around with a transparency shader in the .shader files (I have limited time so I can't help you there)

Good luck




Black Hawk 86

Sentenced To Life

50 XP

12th January 2007

0 Uploads

289 Posts

0 Threads

#6 11 years ago

It worked perfectly with .png format (my new favorite) thanks




Guest

I didn't make it!

0 XP

 
#7 11 years ago

But, can Ja or GTK radiant load PNG files? I will try.




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#8 11 years ago

Can they load png files? Raven used pngs exclusively for anything with alpha channel needs for map texturing and models. Only menu elements and other special cases still used tgas in JA.




Guest

I didn't make it!

0 XP

 
#9 11 years ago

Ok, good news, the PNG worked, but with no transperant parts.

So, I am wondering how I would go about making a shader file for it.

I'll try now, see if it works, if not could some one please help me.




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#10 11 years ago

Extract the existing Raven shaders from the pk3. They are overflowing with alpha channel shader code. The shining surface of many textures in game is an application of alpha channeled texture, so don't pick one of those as your example if you are aiming for a shader with totally transparent parts in game.

In any case, the core of your aim is either the blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA or alphaFunc (with an appropriate argument like GE128). This depends mainly on where you will use the shader and what are your basic needs for it.




  • 1
  • 2