BRE12
|
Defines the material system of the library. More...
#include "types.h"
Go to the source code of this file.
Classes | |
struct | aiUVTransform |
Defines how an UV channel is transformed. More... | |
struct | endif |
*/ More... | |
Macros | |
#define | AI_DEFAULT_MATERIAL_NAME "DefaultMaterial" |
Variables | |
struct aiUVTransform | PACK_STRUCT |
Defines the material system of the library.
enum aiBlendMode |
Defines alpha-blend flags.
If you're familiar with OpenGL or D3D, these flags aren't new to you. They define how the final color value of a pixel is computed, basing on the previous color at that pixel and the new color value from the material. The blend formula is:
where <DestColor> is the previous color in the framebuffer at this position and <SourceColor> is the material colro before the transparency calculation.
This corresponds to the #AI_MATKEY_BLEND_FUNC property.
Enumerator | |
---|---|
aiBlendMode_Default | Formula: SourceColor*SourceAlpha + DestColor*(1-SourceAlpha) |
aiBlendMode_Additive | Additive blending. Formula: SourceColor*1 + DestColor*1 |
enum aiShadingMode |
Defines all shading models supported by the library.
The list of shading modes has been taken from Blender. See Blender documentation for more information. The API does not distinguish between "specular" and "diffuse" shaders (thus the specular term for diffuse shading models like Oren-Nayar remains undefined).
Again, this value is just a hint. Assimp tries to select the shader whose most common implementation matches the original rendering results of the 3D modeller which wrote a particular model as closely as possible.
enum aiTextureFlags |
Defines some mixed flags for a particular texture.
Usually you'll instruct your cg artists how textures have to look like ... and how they will be processed in your application. However, if you use Assimp for completely generic loading purposes you might also need to process these flags in order to display as many 'unknown' 3D models as possible correctly.
This corresponds to the #AI_MATKEY_TEXFLAGS property.
Enumerator | |
---|---|
aiTextureFlags_Invert | The texture's color values have to be inverted (componentwise 1-n) |
aiTextureFlags_UseAlpha | Explicit request to the application to process the alpha channel of the texture. Mutually exclusive with aiTextureFlags_IgnoreAlpha. These flags are set if the library can say for sure that the alpha channel is used/is not used. If the model format does not define this, it is left to the application to decide whether the texture alpha channel - if any - is evaluated or not. |
aiTextureFlags_IgnoreAlpha | Explicit request to the application to ignore the alpha channel of the texture. Mutually exclusive with aiTextureFlags_UseAlpha. |
enum aiTextureMapMode |
Defines how UV coordinates outside the [0...1] range are handled.
Commonly refered to as 'wrapping mode'.
enum aiTextureMapping |
Defines how the mapping coords for a texture are generated.
Real-time applications typically require full UV coordinates, so the use of the aiProcess_GenUVCoords step is highly recommended. It generates proper UV channels for non-UV mapped objects, as long as an accurate description how the mapping should look like (e.g spherical) is given. See the #AI_MATKEY_MAPPING property for more details.
enum aiTextureOp |
Defines how the Nth texture of a specific type is combined with the result of all previous layers.
Example (left: key, right: value):
Written as equation, the final diffuse term for a specific pixel would be:
where 'diffContrib' is the intensity of the incoming light for that pixel.
enum aiTextureType |
Defines the purpose of a texture.
This is a very difficult topic. Different 3D packages support different kinds of textures. For very common texture types, such as bumpmaps, the rendering results depend on implementation details in the rendering pipelines of these applications. Assimp loads all texture references from the model file and tries to determine which of the predefined texture types below is the best choice to match the original use of the texture as closely as possible.
In content pipelines you'll usually define how textures have to be handled, and the artists working on models have to conform to this specification, regardless which 3D tool they're using.
Enumerator | |
---|---|
aiTextureType_NONE | Dummy value. No texture, but the value to be used as 'texture semantic' (#aiMaterialProperty::mSemantic) for all material properties not related to textures. |
aiTextureType_DIFFUSE | The texture is combined with the result of the diffuse lighting equation. |
aiTextureType_SPECULAR | The texture is combined with the result of the specular lighting equation. |
aiTextureType_AMBIENT | The texture is combined with the result of the ambient lighting equation. |
aiTextureType_EMISSIVE | The texture is added to the result of the lighting calculation. It isn't influenced by incoming light. |
aiTextureType_HEIGHT | The texture is a height map. By convention, higher gray-scale values stand for higher elevations from the base height. |
aiTextureType_NORMALS | The texture is a (tangent space) normal-map. Again, there are several conventions for tangent-space normal maps. Assimp does (intentionally) not distinguish here. |
aiTextureType_SHININESS | The texture defines the glossiness of the material. The glossiness is in fact the exponent of the specular (phong) lighting equation. Usually there is a conversion function defined to map the linear color values in the texture to a suitable exponent. Have fun. |
aiTextureType_OPACITY | The texture defines per-pixel opacity. Usually 'white' means opaque and 'black' means 'transparency'. Or quite the opposite. Have fun. |
aiTextureType_DISPLACEMENT | Displacement texture. The exact purpose and format is application-dependent. Higher color values stand for higher vertex displacements. |
aiTextureType_LIGHTMAP | Lightmap texture (aka Ambient Occlusion) Both 'Lightmaps' and dedicated 'ambient occlusion maps' are covered by this material property. The texture contains a scaling value for the final color value of a pixel. Its intensity is not affected by incoming light. |
aiTextureType_REFLECTION | Reflection texture. Contains the color of a perfect mirror reflection. Rarely used, almost never for real-time applications. |
aiTextureType_UNKNOWN | Unknown texture. A texture reference that does not match any of the definitions above is considered to be 'unknown'. It is still imported, but is excluded from any further postprocessing. |