diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 234931cbe..fd54c63f4 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -2128,6 +2128,10 @@ void FBXConverter::SetTextureProperties(aiMaterial *out_mat, const TextureMap &_ TrySetTextureProperties(out_mat, _textures, "Maya|emissionColor", aiTextureType_EMISSION_COLOR, mesh); TrySetTextureProperties(out_mat, _textures, "Maya|metalness", aiTextureType_METALNESS, mesh); TrySetTextureProperties(out_mat, _textures, "Maya|diffuseRoughness", aiTextureType_DIFFUSE_ROUGHNESS, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|base", aiTextureType_MAYA_BASE, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|specular", aiTextureType_MAYA_SPECULAR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|specularColor", aiTextureType_MAYA_SPECULAR_COLOR, mesh); + TrySetTextureProperties(out_mat, _textures, "Maya|specularRoughness", aiTextureType_MAYA_SPECULAR_ROUGHNESS, mesh); // Maya stingray TrySetTextureProperties(out_mat, _textures, "Maya|TEX_color_map", aiTextureType_BASE_COLOR, mesh); diff --git a/include/assimp/material.h b/include/assimp/material.h index a8c6282c4..244c6607e 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -292,6 +292,14 @@ enum aiTextureType { aiTextureType_DIFFUSE_ROUGHNESS = 16, aiTextureType_AMBIENT_OCCLUSION = 17, + /** 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 post-processing. + */ + aiTextureType_UNKNOWN = 18, + /** PBR Material Modifiers * Some modern renderers have further PBR modifiers that may be overlaid * on top of the 'base' PBR materials for additional realism. @@ -318,20 +326,20 @@ enum aiTextureType { */ aiTextureType_TRANSMISSION = 21, - /** 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 post-processing. - */ - aiTextureType_UNKNOWN = 18, + /** + * Maya material declarations + */ + aiTextureType_MAYA_BASE = 22, + aiTextureType_MAYA_SPECULAR = 23, + aiTextureType_MAYA_SPECULAR_COLOR = 24, + aiTextureType_MAYA_SPECULAR_ROUGHNESS = 25, #ifndef SWIG _aiTextureType_Force32Bit = INT_MAX #endif }; -#define AI_TEXTURE_TYPE_MAX aiTextureType_TRANSMISSION +#define AI_TEXTURE_TYPE_MAX aiTextureType_MAYA_SPECULAR_ROUGHNESS // ------------------------------------------------------------------------------- /** diff --git a/test/unit/utMaterialSystem.cpp b/test/unit/utMaterialSystem.cpp index 8b1691b3f..4d335a979 100644 --- a/test/unit/utMaterialSystem.cpp +++ b/test/unit/utMaterialSystem.cpp @@ -260,6 +260,10 @@ TEST_F(MaterialSystemTest, testMaterialTextureTypeEnum) { case aiTextureType_METALNESS: case aiTextureType_DIFFUSE_ROUGHNESS: case aiTextureType_AMBIENT_OCCLUSION: + case aiTextureType_MAYA_BASE: + case aiTextureType_MAYA_SPECULAR: + case aiTextureType_MAYA_SPECULAR_COLOR: + case aiTextureType_MAYA_SPECULAR_ROUGHNESS: case aiTextureType_SHEEN: case aiTextureType_CLEARCOAT: case aiTextureType_TRANSMISSION: