diff --git a/src/Conversions.cc b/src/Conversions.cc index 038134a852..2b71b1d4a4 100644 --- a/src/Conversions.cc +++ b/src/Conversions.cc @@ -366,8 +366,7 @@ sdf::Material ignition::gazebo::convert(const msgs::Material &_in) workflow.SetEnvironmentMap(pbrMsg.environment_map()); workflow.SetAmbientOcclusionMap(pbrMsg.ambient_occlusion_map()); workflow.SetEmissiveMap(pbrMsg.emissive_map()); - workflow.SetLightMap(pbrMsg.light_map()); - workflow.SetLightMapTexCoordSet(pbrMsg.light_map_texcoord_set()); + workflow.SetLightMap(pbrMsg.light_map(), pbrMsg.light_map_texcoord_set()); pbr.SetWorkflow(workflow.Type(), workflow); out.SetPbrMaterial(pbr); diff --git a/src/rendering/SceneManager.cc b/src/rendering/SceneManager.cc index 086dbd28ce..e8f0c1a0f8 100644 --- a/src/rendering/SceneManager.cc +++ b/src/rendering/SceneManager.cc @@ -543,7 +543,8 @@ rendering::MaterialPtr SceneManager::LoadMaterial( std::string lightMap = workflow->LightMap(); if (!lightMap.empty()) { - std::string fullPath = common::findFile(lightMap); + std::string fullPath = common::findFile( + asFullPath(lightMap, _material.FilePath())); if (!fullPath.empty()) { unsigned int uvSet = workflow->LightMapTexCoordSet();