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:
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:
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:
Following figure illustrates the 5 mapping methods:
[Texture mapping methods: A) projection, B) cylindrical, C) spherical, D) box, E) imported texture coordinates]
[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:
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).