|
@@ -290,12 +290,17 @@ void Discreet3DSExporter::WriteMaterials() {
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_SPECULAR);
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_SPECULAR);
|
|
WriteColor(color);
|
|
WriteColor(color);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (mat.Get(AI_MATKEY_COLOR_AMBIENT, color) == AI_SUCCESS) {
|
|
if (mat.Get(AI_MATKEY_COLOR_AMBIENT, color) == AI_SUCCESS) {
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_AMBIENT);
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_AMBIENT);
|
|
WriteColor(color);
|
|
WriteColor(color);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (mat.Get(AI_MATKEY_OPACITY, f) == AI_SUCCESS) {
|
|
|
|
+ ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_TRANSPARENCY);
|
|
|
|
+ WritePercentChunk(1.0f - f);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (mat.Get(AI_MATKEY_COLOR_EMISSIVE, color) == AI_SUCCESS) {
|
|
if (mat.Get(AI_MATKEY_COLOR_EMISSIVE, color) == AI_SUCCESS) {
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_SELF_ILLUM);
|
|
ChunkWriter curChunk(writer, Discreet3DS::CHUNK_MAT_SELF_ILLUM);
|
|
WriteColor(color);
|
|
WriteColor(color);
|