diff options
| author | RevoluPowered <gordon@gordonite.tech> | 2019-09-08 18:10:12 +0100 |
|---|---|---|
| committer | RevoluPowered <gordon@gordonite.tech> | 2019-09-19 16:45:33 +0100 |
| commit | 269ba00fd32c379bda0862e386ebfb3677a59fa6 (patch) | |
| tree | 0524304a9c8163df714fd639bb08008c1a4931f5 /modules | |
| parent | efd6f6dbad69eb97366a9ad4ce42f9d2dc3d9f57 (diff) | |
Implemented maya stingray support
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/assimp/editor_scene_importer_assimp.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index fee2001a07..30778a182e 100644 --- a/modules/assimp/editor_scene_importer_assimp.cpp +++ b/modules/assimp/editor_scene_importer_assimp.cpp @@ -699,7 +699,6 @@ Ref<Mesh> EditorSceneImporterAssimp::_generate_mesh_from_surface_indices( } } - // Now process materials aiTextureType tex_diffuse = aiTextureType_DIFFUSE; { String filename, path; @@ -846,6 +845,20 @@ Ref<Mesh> EditorSceneImporterAssimp::_generate_mesh_from_surface_indices( } } + aiTextureType tex_ao_map = aiTextureType_AMBIENT_OCCLUSION; + { + String filename, path; + Ref<ImageTexture> texture; + AssimpImageData image_data; + + // Process texture normal map + if (AssimpUtils::GetAssimpTexture(state, ai_material, tex_ao_map, filename, path, image_data)) { + AssimpUtils::set_texture_mapping_mode(image_data.map_mode, image_data.texture); + mat->set_feature(SpatialMaterial::FEATURE_AMBIENT_OCCLUSION, true); + mat->set_texture(SpatialMaterial::TEXTURE_AMBIENT_OCCLUSION, image_data.texture); + } + } + Array array_mesh = st->commit_to_arrays(); Array morphs; morphs.resize(ai_mesh->mNumAnimMeshes); |