Texture
✖
Texture

Details



- Texture mapping is also know as UV mapping or diffuse mapping.
- Texture is typically used in modeling to project an image to a 2D polygon or 3D surface.
- Texture can be used in both Graphics and Graphics3D.
- In Texture[obj,…], the object obj can be an image, a graphics or 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 {r,g,b} corresponding to RGBColor[r,g,b] or a list of the form {r,g,b,a} 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.
- Texture[obj,map] provides a texture obj that can be applied to faces of polygons and surfaces by assigning coordinates to vertices from the projection mapping map.
- Possible 3D projection mappings for 2D images include:
-
Automatic automatically choose the projection None no projection "Box" box projection "Cubic" cubic projection "Cylindrical" cylindrical projection "Front" planar project on the x–y plane "Planar" planar projection "Spherical" spherical projection - VertexTextureCoordinates can be used to specify a projection mapping for a given graphics primitive.
- 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.



Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Apply a texture to a polygon in 2D:

https://wolfram.com/xid/0cg4efice-ovc4gj


https://wolfram.com/xid/0cg4efice-gjm400

Apply a texture to a cube in 3D:

https://wolfram.com/xid/0cg4efice-q20cc8


https://wolfram.com/xid/0cg4efice-vqkwn3

Scope (20)Survey of the scope of standard use cases
Basic Uses (3)
Apply a texture to primitives in 2D:

https://wolfram.com/xid/0cg4efice-mkosmn


https://wolfram.com/xid/0cg4efice-y5wtig

Apply a texture to a plot in 2D:

https://wolfram.com/xid/0cg4efice-pn6h0p


https://wolfram.com/xid/0cg4efice-582631

Apply a texture to a GraphicsComplex:

https://wolfram.com/xid/0cg4efice-xyfu1o

Specification (8)
1D texture using a list of RGB colors:

https://wolfram.com/xid/0cg4efice-bmyxs3

https://wolfram.com/xid/0cg4efice-ooqcoc

1D texture using a gradient ColorData:

https://wolfram.com/xid/0cg4efice-kz81w

https://wolfram.com/xid/0cg4efice-qrcjn

1D texture on a polygon in 3D:

https://wolfram.com/xid/0cg4efice-enbo0i

1D texture on the surface of Plot3D:

https://wolfram.com/xid/0cg4efice-jfxkw

2D texture using a matrix of RGB colors:

https://wolfram.com/xid/0cg4efice-20ny3

https://wolfram.com/xid/0cg4efice-eiayg4


https://wolfram.com/xid/0cg4efice-kez8rx


https://wolfram.com/xid/0cg4efice-d6ksod


https://wolfram.com/xid/0cg4efice-i3j0i4


https://wolfram.com/xid/0cg4efice-o3wx4


https://wolfram.com/xid/0cg4efice-fw8d0q


https://wolfram.com/xid/0cg4efice-37ljj0

2D texture using stylized text:

https://wolfram.com/xid/0cg4efice-dq5m5l

https://wolfram.com/xid/0cg4efice-e66jse


https://wolfram.com/xid/0cg4efice-kzy9l9


https://wolfram.com/xid/0cg4efice-brxpjb

2D texture using 2D and 3D graphics:

https://wolfram.com/xid/0cg4efice-bonr69


https://wolfram.com/xid/0cg4efice-gm3gt


https://wolfram.com/xid/0cg4efice-ico3ih

2D texture using plot functions:

https://wolfram.com/xid/0cg4efice-okps6q


https://wolfram.com/xid/0cg4efice-bi4sj3


https://wolfram.com/xid/0cg4efice-hjfgci


https://wolfram.com/xid/0cg4efice-mevdsu

3D texture using an array of RGB colors:

https://wolfram.com/xid/0cg4efice-c8edpv
Display the 3D texture by stacking polygons:

https://wolfram.com/xid/0cg4efice-bpw10a

Cross sections of the 3D texture:

https://wolfram.com/xid/0cg4efice-35rne

Coordinates (5)
Texture coordinates corresponding to each vertex of Polygon can be specified by VertexTextureCoordinates:

https://wolfram.com/xid/0cg4efice-cx0sh9

https://wolfram.com/xid/0cg4efice-f72yxu

Specify a portion of 1D texture by using coordinates between {0} and {1}:

https://wolfram.com/xid/0cg4efice-h6dshj

Repeat 1D texture by using coordinate values outside of {0} and {1}:

https://wolfram.com/xid/0cg4efice-c6ad45

The 2D texture coordinates are assumed to range from {0,0} to {1,1}:

https://wolfram.com/xid/0cg4efice-ncrus

https://wolfram.com/xid/0cg4efice-fi4p33

Specify a portion of 2D texture by using coordinates within the range of {0,0} and {1,1}:

https://wolfram.com/xid/0cg4efice-d80nf

Repeat 2D texture by using coordinate values outside of {0,0} and {1,1}:

https://wolfram.com/xid/0cg4efice-j3fs1q

The 3D texture coordinates are assumed to range from {0,0,0} to {1,1,1}:

https://wolfram.com/xid/0cg4efice-b4xmmt

https://wolfram.com/xid/0cg4efice-ol5yv7

FilledCurve components are mapped to sublists of texture coordinates:

https://wolfram.com/xid/0cg4efice-mmful

https://wolfram.com/xid/0cg4efice-cq45xk

Texture coordinates of plot functions can be specified by TextureCoordinateFunction:

https://wolfram.com/xid/0cg4efice-ka06cv


https://wolfram.com/xid/0cg4efice-4h36s8


https://wolfram.com/xid/0cg4efice-ce0cgx

Styling (4)
Use Opacity to set overall opacity of textures:

https://wolfram.com/xid/0cg4efice-he985

Use FaceForm to set front and back textures differently:

https://wolfram.com/xid/0cg4efice-easf5p

https://wolfram.com/xid/0cg4efice-oiq3qh

Specularity of a textured surface can be set by Specularity:

https://wolfram.com/xid/0cg4efice-b2t3f

The colors in textures are taken to be diffuse colors in their interaction with Lighting:

https://wolfram.com/xid/0cg4efice-eci91o

Generalizations & Extensions (1)Generalized and extended use cases
Use a list of the form {r,g,b,a} to specify transparency of individual pixels of texture:

https://wolfram.com/xid/0cg4efice-hzwdjv

https://wolfram.com/xid/0cg4efice-coh963

https://wolfram.com/xid/0cg4efice-fvbkku

Use the transparency values to create texture with holes:

https://wolfram.com/xid/0cg4efice-b9vmf9

https://wolfram.com/xid/0cg4efice-4cpyo

Applications (13)Sample problems that can be solved with this function
Basic Applications (1)
Show the corresponding mapping to texture coordinates:

https://wolfram.com/xid/0cg4efice-3kdypa

https://wolfram.com/xid/0cg4efice-q7rple


https://wolfram.com/xid/0cg4efice-y0k117


https://wolfram.com/xid/0cg4efice-sa8743

Environment Maps (3)
Create a realistic background using a spherical texture:

https://wolfram.com/xid/0cg4efice-c7w2uc

https://wolfram.com/xid/0cg4efice-7yzu2i

Create a realistic background using a sky box texture:

https://wolfram.com/xid/0cg4efice-xdv4ik

https://wolfram.com/xid/0cg4efice-zoas8r

Apply sky box textures to the individual sides of a cube:

https://wolfram.com/xid/0cg4efice-btolal

https://wolfram.com/xid/0cg4efice-j6mn4p

Astronomy (2)
Create realistic planets and moons using texture maps with MaterialShading:

https://wolfram.com/xid/0cg4efice-mitpxi

https://wolfram.com/xid/0cg4efice-vpsk5o

Use the star map as the background:

https://wolfram.com/xid/0cg4efice-tpxbxm

Geography (2)
Display geographical data from GeoGraphics on an interactive globe:

https://wolfram.com/xid/0cg4efice-8xov4d

Style countries with their own flag:

https://wolfram.com/xid/0cg4efice-4fzw4z


https://wolfram.com/xid/0cg4efice-7pf2z4

Texture Models (1)
Visualizations (2)

https://wolfram.com/xid/0cg4efice-hosec6

Style a ListSurfacePlot3D with a texture:

https://wolfram.com/xid/0cg4efice-sd3ab7

https://wolfram.com/xid/0cg4efice-tp7n7s

Texture Examples (1)
ExampleData includes grayscale and color texture samples:

https://wolfram.com/xid/0cg4efice-j1cpes


https://wolfram.com/xid/0cg4efice-cusucp

Use the sample textures with a plot function:

https://wolfram.com/xid/0cg4efice-lde1g

https://wolfram.com/xid/0cg4efice-c9dtzf

Properties & Relations (4)Properties of the function, and connections to other functions
The projection mapping can be specified per object using TextureMapping:

https://wolfram.com/xid/0cg4efice-gjaaxr

The "Spherical" mapping transforms Cartesian points on a surface to spherical coordinates:

https://wolfram.com/xid/0cg4efice-cd6wd6


https://wolfram.com/xid/0cg4efice-m7n0i8

The "Cylindrical" mapping transforms Cartesian points on a surface to cylindrical coordinates:

https://wolfram.com/xid/0cg4efice-ovpnzq

https://wolfram.com/xid/0cg4efice-f7xtup

The "Planar" mapping projects 3D points to a 2D plane:

https://wolfram.com/xid/0cg4efice-pgyi1q


https://wolfram.com/xid/0cg4efice-gsv3ag

Possible Issues (1)Common pitfalls and unexpected behavior
Texture mapping is preceded by VertexColors:

https://wolfram.com/xid/0cg4efice-ew2q5d

Neat Examples (3)Surprising or curious use cases
Animated Textures (2)
Create a cube with an animated clock face on each side:

https://wolfram.com/xid/0cg4efice-zdrptn

Display an animation mapped to a polygon:

https://wolfram.com/xid/0cg4efice-cwrn8q

Show multiple animations in the same graphic:

https://wolfram.com/xid/0cg4efice-r1c5go

Textures on Polyhedra (1)

https://wolfram.com/xid/0cg4efice-2za6w

Wolfram Research (2010), Texture, Wolfram Language function, https://reference.wolfram.com/language/ref/Texture.html (updated 2024).
Text
Wolfram Research (2010), Texture, Wolfram Language function, https://reference.wolfram.com/language/ref/Texture.html (updated 2024).
Wolfram Research (2010), Texture, Wolfram Language function, https://reference.wolfram.com/language/ref/Texture.html (updated 2024).
CMS
Wolfram Language. 2010. "Texture." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Texture.html.
Wolfram Language. 2010. "Texture." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Texture.html.
APA
Wolfram Language. (2010). Texture. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Texture.html
Wolfram Language. (2010). Texture. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Texture.html
BibTeX
@misc{reference.wolfram_2025_texture, author="Wolfram Research", title="{Texture}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Texture.html}", note=[Accessed: 30-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_texture, organization={Wolfram Research}, title={Texture}, year={2024}, url={https://reference.wolfram.com/language/ref/Texture.html}, note=[Accessed: 30-April-2025
]}