From 47e7667071a9bf49de3fac7ed843feb5408976c2 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 9 Jul 2014 15:35:00 +0200 Subject: [PATCH] Added alpha texture map (map_d) --- code/ObjExporter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index 4ed2824e5..058133f8e 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -182,6 +182,9 @@ void ObjExporter::WriteMaterialFile() if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_SHININESS(0),s)) { mOutputMat << "map_ns " << s.data << endl; } + if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_OPACITY(0),s)) { + mOutputMat << "map_d " << s.data << endl; + } if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_HEIGHT(0),s) || AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_NORMALS(0),s)) { // implementations seem to vary here, so write both variants mOutputMat << "bump " << s.data << endl;