# Material from OGRE's Samples doesn't look the same when used in Gazebo

Hi. I'm trying to improve the visuals of objects in Gazebo's cameras, so I tried to look at examples from OGRE itself. I found there is a Samples folder inside OGRE's repository (1.9.0), and there is also an application that we can install to run the examples https://snapcraft.io/install/ogre/deb...

I'm quite impressed on what OGRE can do in these examples, so I tried to apply this on Gazebo side. Firstly I started by using a material from the examples. I picked Examples/OffsetMapping/Specular, used in Grass and Bump Mapping examples. On the code side, the mesh is loaded and the material is set to the loaded entity, without any visible extra setting through techniques and passes. So, I use the following world to load this on a box

<?xml version="1.0" ?>
<sdf version="1.7">
<world name="ogre">
<include>
<uri>model://sun</uri>
</include>
<include>
<uri>model://ground_plane</uri>
</include>

<model name="box">
<static>true</static>
<pose>0 0 1 0 0 0</pose>
<visual name="visual">
<geometry>
<box>
<size>2 2 2</size>
</box>
</geometry>
<material>
<script>
<uri>[path]/OGRE/Samples/Media/materials/programs</uri>
<uri>[path]/OGRE/Samples/Media/materials/textures</uri>
<uri>[path]/OGRE/Samples/Media/materials/scripts</uri>
<name>Examples/OffsetMapping/Specular</name>
</script>
</material>
</visual>
</model>
</world>


</sdf>

The [path] is the full path where I put the OGRE repo in my PC. The material is found here.

However it looks quite different from what I saw from the example (see the image below). We can't see any ups/downs on the box as we see on the ogre head.

Did I miss any paths inside the <script> block? at least the material and the texture are found, but probably the graphic scripts or the normal file doesn't work. Or is the OGRE configuration by Gazebo doesn't support this?

I'm on Ubuntu 18.04, gazebo 11.5.1 with GTX 1050 Ti mobile.

edit retag close merge delete