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
hpl3:engine:materials [2012/05/09 14:18]
thomas
hpl3:engine:materials [2012/10/09 08:39] (current)
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.
 +
  
 ---- ----
hpl3/engine/materials.1336573114.txt.gz ยท Last modified: 2012/05/09 14:18 by thomas