User Tools

Site Tools


gamedev:textureproperties:transparency

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
gamedev:textureproperties:transparency [2019/05/09 08:40] – removed dragonlordgamedev:textureproperties:transparency [2019/05/09 08:40] – created dragonlord
Line 1: Line 1:
 +{{tag>graphic skin texture transparency}}
 +<WRAP youarehere>
 +[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **transparency**
 +</WRAP>
  
 +====== Skin Texture Property: transparency ======
 +
 +Defines the full or masked transparency.
 +
 +|Excepted Data Source|1 component image|
 +|Data Range|0 to 1|
 +|Default Value|1|
 +|Affected Modules|Graphic|
 +|Linked Properties|[[gamedev:textureproperties:transparency_type|transparency.type]]|
 +
 +====== Description ======
 +
 +The **transparency** texture property defines the degree of transparency of a material. Transparent materials allow to see through with varying strength. This texture property defines either a fully transparent material or a masked material (or holed material). Use the **[[gamedev:textureproperties:transparency_type|transparency.type]]** texture property to define what kind of transparent material this is.
 +
 +Fully transparent materials are required for semi-transparent objects like dark glass or for example a colored glass window. In this case a pixel covered by the material requires a blending operation between the pixel behind the object and the pixel on the object itself. This produces realistic and nice looking transparent objects but is in general more demanding on the hardware than rendering a fully opaque object. This kind of material should only be used if a correct transparent look is important for an object. In all other cases it is better to use masked transparency instead.
 +
 +Masked transparent materials are required for opaque objects containing holes. A typical example for such a material is a wire fence. In this case the material behaves like a fully opaque object concerning concerning rendering just with the difference that holes in the object are not rendered. This is a lot faster than using full transparency since object pixels are either drawn and fully cover the objects behind or not drawn at all in which case the objects behind are visible without alteration. The main problem with masked transparent materials is that they tend to look harder than fully transparent materials.
 +
 +The transparency value is typically an 8 bit image with 1 color component with the data located inside the range from 0 to 1. 0 represents 0% opaqueness (or coverage) while 1 represents a 100% opaqueness. For a fully transparent material values in between 0 and 1 results in a partial coverage allowing the objects behind the material to shine through more or less. For a masked transparent object values less then 0.5 are mapped to 0% transparency (hence a hole and not rendered) while all other values map to 100% transparency (fully opaque and rendered). In this case values except 0 and 1 should be avoided.
 +
 +The default value for this texture property is 1 hence fully opaque no matter if fully transparent or masked transparent.
 +
 +====== Examples ======
 +
 +<WRAP center 100%>
 +<WRAP center box 420px>
 +{{ :gamedev:textureproperties:transparency.png |Transparent glass material}}
 +<WRAP centeralign>Transparent glass material. Example of a fully transparent material. This glass uses 4% transparency hence 0.04 for the transparency texture property.</WRAP>
 +</WRAP>
 +</WRAP>
gamedev/textureproperties/transparency.txt · Last modified: 2019/05/24 23:43 by dragonlord