diff --git a/doc/AssimpDoc_Html/AssimpDoc.chm b/doc/AssimpDoc_Html/AssimpDoc.chm index a27dbd432..5fcd0768a 100644 Binary files a/doc/AssimpDoc_Html/AssimpDoc.chm and b/doc/AssimpDoc_Html/AssimpDoc.chm differ diff --git a/doc/dox.h b/doc/dox.h index 5d8b7d0c2..baf5d9d18 100644 --- a/doc/dox.h +++ b/doc/dox.h @@ -760,8 +760,7 @@ set if ASSIMP is able to determine the file format. @section General Overview -THIS SECTION IS NOT YET COMPLETE AND WIP!
-All materials are stored in an array of aiMaterial inside the aiScene. +Warn, WIP. All materials are stored in an array of aiMaterial inside the aiScene. Each aiMesh refers to one material by its index in the array. Due to the vastly diverging definitions and usages of material @@ -770,6 +769,33 @@ a set of properties accessible by their names. Have a look at aiMaterial.h to se properties are defined. In this file there are also various functions defined to test for the presence of certain properties in a material and retrieve their values. +@section mat_tex Textures + +Textures are organized in stacks, each stack being evaluated independently. The final color value from a particular texture stack is used in the shading equation. For example, the computed color value of the diffuse texture stack (aiTextureType_DIFFUSE) is multipled with the amount of incoming diffuse light to obtain the final diffuse color of a pixel. + +@code + + Stack Resulting equation + +------------------------ +| Constant base color | color +------------------------ +| Blend operation 0 | + +------------------------ +| Strength factor 0 | 0.25* +------------------------ +| Texture 0 | texture_0 +------------------------ +| Blend operation 1 | * +------------------------ +| Strength factor 1 | 1.0* +------------------------ +| Texture 1 | texture_1 +------------------------ + ... ... + +@endcode + @section keys Constants All material key constants start with 'AI_MATKEY' (it's an ugly macro for historical reasons, don't ask). @@ -896,7 +922,71 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor aiString n/a Defines the path to the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values. - See the 'Textures' section below. + See the 'Textures' section above. + + + + TEXBLEND(t,n) + float + n/a + Defines the strength the n'th texture on the stack 't'. All color components (rgb) are multipled with this factor *before* any further processing is done. + - + + + + TEXOP(t,n) + int + n/a + One of the #aiTextureOp enumerated values. Defines the arithmetic operation to be used to combine the n'th texture on the stack 't' with the n-1'th. TEXOP(t,0) refers to the blend operation between the base color for this stack (e.g. COLOR_DIFFUSE for the diffuse stack) and the first texture. + - + + + + MAPPING(t,n) + int + n/a + Defines how the input mapping coordinates for sampling the n'th texture on the stack 't' are computed. Usually explicit UV coordinates are provided, but some model file formats might also be using basic shapes, such as spheres or cylinders, to project textures onto meshes. + See the 'Textures' section below. #aiProcess_GenUVCoords can be used to let Assimp compute proper UV coordinates from projective mappings. + + + + UVWSRC(t,n) + int + n/a + Defines the UV channel to be used as input mapping coordinates for sampling the n'th texture on the stack 't'. All meshes assigned to this material share the same UV channel setup + Presence of this key implies MAPPING(t,n) to be #aiTextureMapping_UV + + + + MAPPINGMODE_U(t,n) + int + n/a + Any of the #aiTextureMapMode enumerated values. Defines the texture wrapping mode on the x axis for sampling the n'th texture on the stack 't'. 'Wrapping' occurs whenever UVs lie outside the 0..1 range. + - + + + + MAPPINGMODE_V(t,n) + int + n/a + Wrap mode on the v axis. See MAPPINGMODE_U. + - + + + + TEXMAP_AXIS(t,n) + aiVector3D + n/a + Defines the base axis to to compute the mapping coordinates for the n'th texture on the stack 't' from. This is not required for UV-mapped textures. For instance, if MAPPING(t,n) is #aiTextureMapping_SPHERE, U and V would map to longitude and latitude of a sphere around the given axis. The axis is given in local mesh space. + - + + + + TEXFLAGS(t,n) + int + n/a + Defines miscellaneous flag for the n'th texture on the stack 't'. This is a bitwise combination of the #aiTextureFlags enumerated values. + -