User Tools

Site Tools


hpl3:engine:materials

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl3:engine:materials [2012/04/24 12:26]
thomas [Decal]
hpl3:engine:materials [2012/10/09 08:39]
thomas [Optimizing]
Line 26: Line 26:
   * Never add a texture unless it adds to the final material. For example, do not use black specular, flat blue normal maps, and so on. It is almost always better to just not set the texture at all.   * Never add a texture unless it adds to the final material. For example, do not use black specular, flat blue normal maps, and so on. It is almost always better to just not set the texture at all.
   * For textures that only use alpha, it is a good idea to embed it in the alpha of a texture. That way a single texture can fill up two texture slots. However, take note that if a texture with alpha is used in many materials and/or can have a lower resolution than the one it is part of, it might be good to keep it separate. ​   * For textures that only use alpha, it is a good idea to embed it in the alpha of a texture. That way a single texture can fill up two texture slots. However, take note that if a texture with alpha is used in many materials and/or can have a lower resolution than the one it is part of, it might be good to keep it separate. ​
 +
 +----
 +
 +==== Alpha ====
 +
 +Some of the texture types below will have the channel as alpha. There are two ways of doing this texture:
 +
 +  - It can simply be the alpha channel for a texture. If you have a DDS texture remember that DXT1 only has alpha that is either 1 or 0, so only use this if you do not want any gradients. (This is for instance OK with transparency for the solid material that does not support gradients anyway.)
 +  - Use a single channel (grayscale) texture. The engine will always load single channel texture as if the texture only consist of an alpha channel (even though the image editor might name it an red channel or similar).
 +
 +If possible, it often is faster and saves space to have it as an alpha in a texture, so use that when possible.
 +
  
 ---- ----
Line 92: Line 104:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc.\\+**File format:** dds, 3dc (aka DXN, BC5).\\
 **Suffix:** “nrm”.\\ **Suffix:** “nrm”.\\
 The normal map for the material and uses the standard format rgb = xyz and is in tangent space. Note that this needs to be converted to a format of XY only though! ​ The normal map for the material and uses the standard format rgb = xyz and is in tangent space. Note that this needs to be converted to a format of XY only though! ​
Line 171: Line 183:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc.\\+**File format:** dds, 3dc (aka DXN, BC5).\\
 **Suffix:** “detail_nrm”.\\ **Suffix:** “detail_nrm”.\\
 Detail normal works basically like the diffuse version, but on the normal map. Detail normal works basically like the diffuse version, but on the normal map.
Line 187: Line 199:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc, tga for high quality.\\+**File format:** dds, 3dc (aka DXN, BC5), tga for high quality.\\
 **Suffix:** “liquid”.\\ **Suffix:** “liquid”.\\
 This texture shows how liquid should fade in, move and fade out over an object. The red channel contains a mask for how liquid should fade in on the image, the brighter a pixel is the earlier the liquid will cover it. The green channel contains a mask for how the liquid should fade out. If a 3dc compressed texture produces poor results then a RGBA tga should be used with the red channel stored in the alpha channel and the green channel stored in the blue channel. This texture shows how liquid should fade in, move and fade out over an object. The red channel contains a mask for how liquid should fade in on the image, the brighter a pixel is the earlier the liquid will cover it. The green channel contains a mask for how the liquid should fade out. If a 3dc compressed texture produces poor results then a RGBA tga should be used with the red channel stored in the alpha channel and the green channel stored in the blue channel.
Line 265: Line 277:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc.\\+**File format:** dds, 3dc (aka DXN, BC5).\\
 **Suffix:** “nrm”.\\ **Suffix:** “nrm”.\\
 Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\ Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\
Line 299: Line 311:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc, tga for high quality.\\+**File format:** dds, 3dc (aka DXN, BC5), tga for high quality.\\
 **Suffix:** “liquid”.\\ **Suffix:** “liquid”.\\
 This texture shows how liquid should fade in, move and fade out over an object. The red channel contains a mask for how liquid should fade in on the image, the brighter a pixel is the earlier the liquid will cover it. The green channel contains a mask for how the liquid should fade out. If a 3dc compressed texture produces poor results then a RGBA tga should be used with the red channel stored in the alpha channel and the green channel stored in the blue channel. This texture shows how liquid should fade in, move and fade out over an object. The red channel contains a mask for how liquid should fade in on the image, the brighter a pixel is the earlier the liquid will cover it. The green channel contains a mask for how the liquid should fade out. If a 3dc compressed texture produces poor results then a RGBA tga should be used with the red channel stored in the alpha channel and the green channel stored in the blue channel.
Line 346: Line 358:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc.\\+**File format:** dds, 3dc (aka DXN, BC5).\\
 **Suffix:** “nrm”.\\ **Suffix:** “nrm”.\\
 Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\ Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\
Line 458: Line 470:
 **Channels:​** G and Alpha (must use special exporter for this!)\\ **Channels:​** G and Alpha (must use special exporter for this!)\\
 **Type:** 2D\\ **Type:** 2D\\
-**File format:** dds, 3dc.\\+**File format:** dds, 3dc (aka DXN, BC5).\\
 **Suffix:** “nrm”.\\ **Suffix:** “nrm”.\\
 Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\ Instead of changing the way light is shaded (like with solid material), here the normal map is used to distort the background (if refraction is set to true) and/or to change the way reflection is calculated.\\
Line 470: Line 482:
 **Suffix:** “env”.\\ **Suffix:** “env”.\\
 This will apply a cube to the mesh as if it is was reflecting it (hence called “environment map”). It will be used instead of the world reflection, thus making the water rendering ALOT faster! This will apply a cube to the mesh as if it is was reflecting it (hence called “environment map”). It will be used instead of the world reflection, thus making the water rendering ALOT faster!
- 
hpl3/engine/materials.txt · Last modified: 2012/10/09 08:39 by thomas