Alpha: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Nesciuse moved page Alpha/en to Alpha without leaving a redirect: Move en subpage to basepage)
 
(23 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[category:Glossary]][[category:Material System]]
{{LanguageBar}}
'''Alpha''' is an [[Integer]] [[variable]] that is often included as the "fourth" number in a [[RGB]] color format. '''Alpha''' is an [[opacity]] rating from 0 - 255. Smaller '''alpha''' numbers make objects appear more faded whereas larger numbers make objects appear more visable.
{{stub}}
[[File:Alpha sign.png|300px|thumb|right|This sign from Half-Life 2 is not a model, it's a texture that uses an alpha channel for transparency.]]
:''For the VMT parameter, see {{ent|$alpha}}.
'''Alpha''' is a [[byte]] {{wiki|variable}} that is often included as the "fourth" byte in a [[RGB]] color format. '''Alpha''' is usually an [[opacity]] rating from 0 - 255, where 0 is completely invisible and 255 is completely visible. Alpha is sometimes also used for other things, such as a self-illumination mask.


0 is completely invisible.
To store an individual alpha value in each pixel, an alpha channel is used as the fourth channel of the [[TGA]] file. This allows variable opacity, for example, in a single texture, such as the lettered Petrol signs in Half-Life 2.
255 is completely visable.


[[Alpha Channel]]s are also included inside of textures. A classic graphic format that supports [[alpha channel]]s is the Targa Graphics Format ([[tga]]).
{{paintdotnet|4.1}} is a good program for adding alpha to a texture. Be aware that a pixel with alpha set to 0 still has R, G, and B values, which may affect the texture in some cases; see [[alpha dilation]] for more information.


[[Alpha channel]]s will let you specify individual opacity values for each pixel.
{{todo|Mention {{code|renderamt}} KV and {{code|Alpha}} [[I/O|input]].}}


An example of where [[alpha channel]]s are used can be found in the Combine Forcefields.
[[Category:Glossary]]
 
[[Category:Material System]]
Even though parts of the forcefields are visable, other parts are not. That is because the [[alpha channel]] is hiding certain parts of the texture.

Latest revision as of 04:30, 12 July 2024

English (en)中文 (zh)Translate (Translate)

Stub

This article or section is a stub. You can help by expanding it.

This sign from Half-Life 2 is not a model, it's a texture that uses an alpha channel for transparency.
For the VMT parameter, see $alpha.

Alpha is a byte Wikipedia icon variable that is often included as the "fourth" byte in a RGB color format. Alpha is usually an opacity rating from 0 - 255, where 0 is completely invisible and 255 is completely visible. Alpha is sometimes also used for other things, such as a self-illumination mask.

To store an individual alpha value in each pixel, an alpha channel is used as the fourth channel of the TGA file. This allows variable opacity, for example, in a single texture, such as the lettered Petrol signs in Half-Life 2.

Paint.NET Paint.NET is a good program for adding alpha to a texture. Be aware that a pixel with alpha set to 0 still has R, G, and B values, which may affect the texture in some cases; see alpha dilation for more information.

Todo: Mention renderamt KV and Alpha input.