Bug in models or bug in g3dviewer ? Newer models have set opacity of Material set to 0 ( needed to see transparency in blender ) but this full transparency is ( correctly) exported, resulting in not beeing shown in G3d Viewer or when used as unit. Used as tileset Models all was ok. So fixed for the Moment, but not entirely happy with this now. Maybe the blender exporter should set opacity to 1 if its set to 0 instead.

This commit is contained in:
Titus Tscharntke 2013-04-08 22:01:38 +00:00
parent 1d8644bff5
commit 519ad0fbeb
1 changed files with 5 additions and 1 deletions

View File

@ -770,7 +770,11 @@ void Mesh::load(int meshIndex, const string &dir, FILE *f, TextureManager *textu
specularColor= Vec3f(meshHeader.specularColor);
specularPower= meshHeader.specularPower;
opacity= meshHeader.opacity;
if(opacity==0){
printf("found a mesh with opacity=0 in header, using opacity=1 to see it now \n");
printf("file: %s\n",modelFile.c_str());
opacity=1.0f;
}
textureFlags= meshHeader.textures;
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Load v4, this = %p Found meshHeader.textures = %d meshIndex = %d\n",this,meshHeader.textures,meshIndex);