diff --git a/src/Conversions.cc b/src/Conversions.cc index 702658db3d0..ef1093cf71a 100644 --- a/src/Conversions.cc +++ b/src/Conversions.cc @@ -262,6 +262,7 @@ msgs::Material ignition::gazebo::convert(const sdf::Material &_in) msgs::Set(out.mutable_diffuse(), _in.Diffuse()); msgs::Set(out.mutable_specular(), _in.Specular()); msgs::Set(out.mutable_emissive(), _in.Emissive()); + out.set_render_order(_in.RenderOrder()); out.set_lighting(_in.Lighting()); // todo(anyone) add double_sided field to msgs::Material @@ -321,6 +322,7 @@ sdf::Material ignition::gazebo::convert(const msgs::Material &_in) out.SetDiffuse(msgs::Convert(_in.diffuse())); out.SetSpecular(msgs::Convert(_in.specular())); out.SetEmissive(msgs::Convert(_in.emissive())); + out.SetRenderOrder(_in.render_order()); out.SetLighting(_in.lighting()); // todo(anyone) add double_sided field to msgs::Material diff --git a/src/rendering/SceneManager.cc b/src/rendering/SceneManager.cc index 54fb330aa92..15f3153f2d9 100644 --- a/src/rendering/SceneManager.cc +++ b/src/rendering/SceneManager.cc @@ -439,6 +439,7 @@ rendering::MaterialPtr SceneManager::LoadMaterial( material->SetDiffuse(_material.Diffuse()); material->SetSpecular(_material.Specular()); material->SetEmissive(_material.Emissive()); + material->SetRenderOrder(_material.RenderOrder()); // parse PBR params const sdf::Pbr *pbr = _material.PbrMaterial();