# Display Images on Cube Faces

Hi all, I'm using Aruco markers to localize my robot in its environment. I've set up models for each aruco marker, and use a PNG file as texture.

However, it seems there is a "bug" in the display. When looking forward to the aruco, the image is displayed correctly. (see first image). And when I go behind the marker, the image is inverted, like a central symmetry (see second image).

Why is that? Do I need to specify the texture for each face of the cube in the aruco model? If yes, how do I do that?

Thank you very much for your help !

First image

Second image

EDIT Here is my material file

material ArucoVisualMarker0/Marker
{
technique
{
pass
{
texture_unit
{
texture aruco_mark_0.png
}
}
}
}


and here is my model.sdf file.

<?xml version='1.0'?>
<sdf version='1.5'>
<model name='aruco_visual_marker_0'>
<pose>0 0 0 0 0 0</pose>
<pose frame=''>0 0 0 0 0 3.14</pose>
<visual name='visual'>
<geometry>
<box>
<size>0.3 0.3 1e-05</size>
</box>
</geometry>
<material>
<script>
<uri>model://aruco_visual_marker_0/materials/scripts</uri>
<uri>model://aruco_visual_marker_0/materials/textures</uri>
<name>ArucoVisualMarker0/Marker</name>
</script>
<a mbient>1 1 1 1</ambient>
<diffuse>1 1 1 1</diffuse>
<specular>0 0 0 1</specular>
<emissive>1 1 1 0</emissive>
<normal_map>__default__</normal_map>
</material>
<pose frame=''>0 0 0 0 0 0</pose>
<transparency>0</transparency>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.3 0.3 1e-05</size>
</box>
</geometry>
</collision>
<static>1</static>
<allow_auto_disable>1</allow_auto_disable>
</model>
</sdf>

edit retag close merge delete

If using an Ogre material, I think that having the plane along the XZ (or YZ) plane instead of the XY plane as shown on the screenshots may solve the issue. Take a look at the Textured shapes model for an example.