Texture
This feature is not supported on the Wolfram Cloud.

Texture[obj]
is a graphics directive that specifies that obj should be used as a texture on faces of polygons and other filled graphics objects.

DetailsDetails

  • Texture[] provides a texture that can be applied to faces of polygons and filled curves by setting VertexTextureCoordinates.
  • Texture can be used in both Graphics and Graphics3D.
  • Texture[image] can be used to specify a 2D texture based on an image.
  • Textures can be any one-, two-, or three-dimensional arrays of colors.
  • The following forms can be used to explicitly specify the color values for textures:
  • Texture[{c1,c2,}]a 1D texture of colors
    Texture[{{c11,c12,},}]a 2D texture of colors
    Texture[{{{c111,c112,},},}]a 3D texture of colors
  • Each color can be either a list of the form corresponding to RGBColor[r,g,b], or a list of the form corresponding to RGBColor[r,g,b,a].
  • Texture[obj] is equivalent to Texture[Rasterize[obj]] and will rasterize obj at the size and resolution it would normally be displayed in a notebook.
  • Opacity can be used with Texture to specify overall opacity of textures. »
  • Texture can be used in FaceForm to texture front and back faces differently. »
  • The colors in Texture are taken to be diffuse colors in their interaction with Lighting. »

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Apply a texture to a polygon in 2D:

In[1]:=
Click for copyable input
Out[1]=

Apply a texture to a polygon in 3D:

In[1]:=
Click for copyable input
Out[1]=

Apply a texture to a filled curve:

In[1]:=
Click for copyable input
Out[1]=

Apply a texture to several polygons in 3D:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Apply a texture to the surface of ParametricPlot3D:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)