diff options
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 6a11fd51e4a..e2a3cca4f33 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -1538,9 +1538,23 @@ public: if (t->mapto & MAP_REF) { ep.setReflective(createTexture(ima, uvname, sampler)); } + // alpha if (t->mapto & MAP_ALPHA) { ep.setTransparent(createTexture(ima, uvname, sampler)); } + // extension: + // Normal map --> Must be stored with <extra> tag as different technique, + // since COLLADA doesn't support normal maps, even in current COLLADA 1.5. + if (t->mapto & MAP_NORM) { + COLLADASW::Texture texture(key); + texture.setTexcoord(uvname); + texture.setSampler(*sampler); + // technique FCOLLADA, with the <bump> tag, is most likely the best understood, + // most widespread de-facto standard. + texture.setProfileName("FCOLLADA"); + texture.setChildElementName("bump"); + ep.setExtraTechniqueColorOrTexture(COLLADASW::ColorOrTexture(texture)); + } } // performs the actual writing ep.addProfileElements(); |