Open ftedoldi opened 2 years ago
I have a problem when loading FBX objects, in particular the roughness texture is not found. To get the texture i use the following code:
if(material->GetTextureCount(aiTextureType_DIFFUSE_ROUGHNESS) > 0) { mat.hasRoughnessTexture = true; std::cout << "Has texture roughness" << std::endl; this->_gammaCorrect = false; std::vector<Texture2D> roughnessMap = loadTexture(material, aiTextureType_DIFFUSE_ROUGHNESS, this->_gammaCorrect); mat.PBR_textures.insert(mat.PBR_textures.end(), roughnessMap.begin(), roughnessMap.end()); }
"Has texture roughness" never get printed. The FBX object i use is a simple sphere with albedo, normal, metallic and roughness maps, exported from blender. gltf and obj objects works fine, the only problem i get is this one with FBX.
Try to look for aiTextureType_SHININESS . The roughness should be there. Not sure how correct this is but that's how it works from what I tested.
aiTextureType_SHININESS
I have a problem when loading FBX objects, in particular the roughness texture is not found. To get the texture i use the following code:
"Has texture roughness" never get printed. The FBX object i use is a simple sphere with albedo, normal, metallic and roughness maps, exported from blender. gltf and obj objects works fine, the only problem i get is this one with FBX.