Texture dialogThe texture dialog allows you to view and modify properties related to a texture attached to a shape or a custom user interface. It is accessed by clicking the Set texture-item in the shape dialog or by clicking the Set UI background texture-item or the Set button texture-item in the custom user interface 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: Following figure illustrates the 5 mapping methods: [Texture mapping methods: A) projection, B) cylindrical, C) spherical, D) box, E) imported texture coordinates] The texture 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 a custom user interface as background, or to a custom user interface button, it cannot be scaled, shifted nor rotated: it will automatically be stretched over the whole custom user interface surface or over the whole custom user interface button respectively: [Textures applied to custom user interfaces as background- and button-textures] A custom user interface background texture becomes only visible where buttons have the Transparent / show background texture-item selected. Refer to the custom user interface dialog for more details. Static textures can be loaded by clicking the Load new texture button. For now it is only possible to load uncompressed 24 bits/pixel or 32 bits/pixel TARGA files ("*.tga" extension). Various applications are able to save bitmaps as TARGA format (e.g. the GNU Image Manipulation Program GIMP). If a 24 bits/pixel bitmap was selected for loading, following dialog will display: [Texture transparency color] Above dialog allows you to specify which (if any) color should be discarded and replaced with a transparent color. While editing your bitmap in a drawing application (e.g. GIMP), fill all parts that you later want to appear transparent with a specific color (e.g. 0,255,0). During texture loading in V-REP, you can then indicate that color as the transparent color. This only applies for TARGA file that store 24 bits/pixel. 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 |