Engine definitions. Contains various definitions for the engine. The definitions are collected in this file and not at the appropriate place to make it more readable. More...
Defines | |
Skin Channel Names. | |
Those are proposed names for the channels. You are free to use whatever channel name for your own data channels. Be aware though that other modules have to work with your naming. Hence this list here providing some 'normed' channel names. | |
| #define | DESKIN_CHANNEL_DIFFUSE "diffuse" |
| Defines the diffuse color of a texture. | |
| #define | DESKIN_CHANNEL_TRANSPARENCY "transparency" |
| Defines the transparency of pixels in the texture. | |
| #define | DESKIN_CHANNEL_NORMAL "normal" |
| Defines the normal of pixels in the texture. | |
| #define | DESKIN_CHANNEL_SPECULARITY "specularity" |
| Defines the specular reflection value of pixels in the texture. | |
| #define | DESKIN_CHANNEL_REFLECTIVITY "reflectivity" |
| Defines the reflectivity of pixels in the texture. | |
| #define | DESKIN_CHANNEL_EMISSION "emission" |
| Defines the self emission of pixels in the texture. | |
| #define | DESKIN_CHANNEL_GLOWING "glowing" |
| Glowing channel. | |
Engine definitions. Contains various definitions for the engine. The definitions are collected in this file and not at the appropriate place to make it more readable.
| #define DESKIN_CHANNEL_DIFFUSE "diffuse" |
Defines the diffuse color of a texture.
The diffuse color describes the color reflected by diffuse lighting and is dependant of the direction of the surface normal compared to the light direction. Accepts 24-bit or 8-bit color values. If 8-bit is used the color is spread to all color channels. If no diffuse channel is defined black is assumed for all pixels in the texture.
| #define DESKIN_CHANNEL_EMISSION "emission" |
Defines the self emission of pixels in the texture.
Acceptes is 24-bit or 8-bit format. If 8-bit is used the value is spread to all color channels. The emission color is added to the object light contribution. Therefore the emission color is multiplied in the end with the object color which is why gray scale values usually are enough. Color values can be used to achieve special effects. If no emission channel is defined then all pixels are considered to emit no color at all.
| #define DESKIN_CHANNEL_GLOWING "glowing" |
Glowing channel.
The emission channel is doing now what glowing did before.
| #define DESKIN_CHANNEL_NORMAL "normal" |
Defines the normal of pixels in the texture.
The normal is required for proper lighting and allows to fake complex models where only low polygon meshes are used. The normal is stored as an encoded 24-bit color value. The x component of the normal points into the tangent direction, the y component into the bitangent direction and the z component into the direction of the face normal. The following formula obtains the normal from the encoded color whereas the color is stored as a decimal value from 0 to 1.
normal.x = ( color.red - 0.5 ) * 2.0; normal.y = ( color.green - 0.5 ) * 2.0; normal.z = ( color.blue - 0.5 ) * 2.0;
The normal is supposed to be normalized as good as the precision of the color values allows to. If no normal channel is defined then all pixels are considered to be (x,y,z) = ( 0.5, 0.5, 1.0 ) which is a normal pointing along the face normal.
| #define DESKIN_CHANNEL_REFLECTIVITY "reflectivity" |
Defines the reflectivity of pixels in the texture.
Accepted is 24-bit or 8-bit format. If 8-bit is used the value is spread to all color channels. The reflectivity is multiplied with a pixel of an object to be reflected. Black does not reflect and white reflects the entire pixel color. Usually grayscale values are used for which 8-bit is enough. Color values can be used though to achieve special effects. If no reflectivity is specified then all pixels are considered to not reflect at all.
| #define DESKIN_CHANNEL_SPECULARITY "specularity" |
Defines the specular reflection value of pixels in the texture.
The specular reflection defines the strength of specular hightlight caused by light sources. Accepted is 8-bit grayscale format. A value of 0 removes any specular highlight and a value of 1 yields heavy hilights. If the specularity channel is not defined then all pixels are considered to have 0 specularity.
| #define DESKIN_CHANNEL_TRANSPARENCY "transparency" |
Defines the transparency of pixels in the texture.
Accepted are 8-bit grayscale values with 0 indicating completely transparent pixels and 1 fully opaque pixels. Values in between represent a percentage opacity of a pixel. If a texture is not using full alpha values only 0 and 1 are relevant. Values above 0.5 are then considered 1 and all other values 0. If no transparency channel is defined then the pixels are considered to be all fully opaque.
1.7.2