transparency -1 reply

  • 1
  • 2

Please wait...

17th December 2005

0 Uploads

447 Posts

0 Threads

#1 11 years ago

i made a bladed weapons pack that has blood effects, but the blood marks that show up when you hit someone always make the area around them black, and the same problem happens with a blood splater picture i made that is supposed to show up on the sword itself when you hit someone, but the area around that is black also. in the pictures for the blood. the parts ofitthat aren't blood are colored in black, so the black part shouldn't show up in jedi academy. but it does. ive included the pictures i used.




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#2 11 years ago

Black is not automatically treated as transparency. You must have an alpha layer, and you must have an appropriate shader.




17th December 2005

0 Uploads

447 Posts

0 Threads

#3 11 years ago

whats an alpha layer? and what would be an appropriate shader? this is the one im using for the cut marks: gfx/damage/cut_mark { polygonOffset { clampmap gfx/damage/cut_mark blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { clampmap gfx/damage/cut_mark blendFunc GL_ONE GL_ONE rgbGen wave noise 1 0.5 0 2 } }

and this is the one im useing for the blood splatter:

gfx/damage/blood_splat { polygonOffset q3map_nolightmap q3map_onlyvertexlighting { clampmap gfx/damage/blood_splat blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen lightingDiffuse } }




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#4 11 years ago

Alpha layer = alpha channel. Google it.




Crossbolt

Semi-Phenomenal Nearly Cosmic

50 XP

31st August 2006

0 Uploads

348 Posts

0 Threads

#5 11 years ago

http://qbranch.cottages.polycount.com/tutorials/shaders-3.shtml

That shows you how to make an alpha channel in PhotoShop. If you are using Paint Shop Pro, you need to go into the layer menu, throw a mask on the layer you want to make into the alpha channel, and go into the mask toolbar along the top (only shows up if you have a mask selected) and then choose convert to alpha channel.

Hope that helps.




17th December 2005

0 Uploads

447 Posts

0 Threads

#6 11 years ago

im not using any of those. the only picture programs i have are picture it 9 and HP image zone.




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#7 11 years ago

Then get GIMP.




Szico VII

We want FF7-2/remake!

50 XP

14th September 2003

0 Uploads

1,683 Posts

0 Threads

#8 11 years ago

You dont need an alpha channel for those effects, you can actually use a png with transparency, which is often preferred for decals.

And, as we can see with that shader, there is no 'alphafunc GE128' or 'LT128' meaning even if you did make an alpha layer, the engine doesnt know whether to use the black alpha layer to make thigns transparent or not. I think by default with the shader you posted, it just assumes black sections of an image are transparent, for example, if you look at the effect images files, you will find they have transparency and are Jpeg files, thus, not having an alpha layer.




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#9 11 years ago

Szico, what do you think the transparent part of a PNG is? It functions exactly the same way. A PNG basically is a targa anyway.




lassev

Degenerate scripter

50 XP

21st June 2004

0 Uploads

847 Posts

0 Threads

#10 11 years ago
Szico VII;3549116And, as we can see with that shader, there is no 'alphafunc GE128' or 'LT128' meaning even if you did make an alpha layer, the engine doesnt know whether to use the black alpha layer to make thigns transparent or not.

Those are cut-off alpha functions. So, in a certain sense when you use them, there is no actual blending. The engine just determines whether to draw a pixel fully or not at all, based on the alpha channel. In the case of those two funcs if the alpha value is 128 or over, or if it's less than 128. The characteristic of transparency created by alphafuncs is, thus, very sharp borders between fully transparent and fully opaque portions of the texture.




  • 1
  • 2