Texture dialog

The texture dialog allows you to view and modify properties related to a texture attached to a shape or an OpenGl-based custom UI. It is accessed by clicking the Set texture-item in the shape properties dialog or by clicking the Set UI background texture-item or the Set button texture-item in the OpenGl-based custom UI dialog:

[Texture dialog]

A texture is a bitmap image that can be applied to surfaces in order to make them look more real. Imagine applying a brick texture to a rectangular surface in order to make it look like a brick wall. Following figure illustrates a textured surface:

[Textured surface]

The default way V-REP applies textures to a shape is by projecting it onto the shape's x/y plane as shown in following figure:

[Default texture projection method]

Following 5 texture mapping methods are supported:

  • Projection mapping: the texure is simply projected onto the X-Y plane of the object (see here above). Texture coordinates will be calculated.
  • Cylindrical mapping: the texure is wrapped around the object's Z axis. Texture coordinates will be calculated.
  • Spherical mapping: the texure is spherically mapped onto the object. Texture coordinates will be calculated.
  • Box mapping: the texure is applied to all 6 faces of a box-like object. Texture coordinates will be calculated.
  • Imported texture coordinates: specific texture coordinates can be imported at the same time as the mesh is imported, via the OBJ file format.
  • Following figure illustrates the 5 mapping methods:

    [Texture mapping methods: A) projection, B) cylindrical, C) spherical, D) box, E) imported texture coordinates]

    When loading a new texture, following dialog will open:

    [Texure scaling dialog]

    It is recommended to keep the default settings, in order to keep compatibility to older graphic cards high (when Scale textures to is checked, all textures will anyway be resized to a power of 2), and file sizes low.

    Once a texture is in memory, it can be scaled, shifted and rotated before the actual mapping takes place, in order to obtain the desired visual appearance.

    In case a texture is applied to an OpenGl-based custom UI as background, or to an OpenGl-based custom UI button, it cannot be scaled, shifted nor rotated: it will automatically be stretched over the whole custom UI surface or over the whole custom UI button respectively:

    [Textures applied to OpenGl-based custom UIs as background- and button-textures]

    An OpenGl-based custom UI background texture becomes only visible where buttons have the Transparent / show background texture-item selected. Refer to the OpenGl-based custom UI dialog for more details.

    Static textures can be loaded by clicking the Load new texture button. Following file formats are currently supported:

  • JPEG
  • PNG
  • TGA
  • BMP
  • TIFF
  • GIF
  • Instead of loading textures from file, you can also select already loaded static textures, or even dynamic textures generated by vision sensors. Just click the Select texture from existing textures button. Note that dynamic textures will only properly be displayed during simulation (and also only if the related vision sensor is properly handled).

    Recommended topics

  • Shape properties
  • OpenGl-based custom UI dialog
  • Vision sensors