In computer graphics, the application of a type of surface to a 3D image. A texture can be uniform, such as a brick wall, or irregular, such as wood grain or marble. The common method is to create a 2D bitmapped image of the texture, called a "texture map," which is then "wrapped around" the 3D object.
The image above shows how a wooden texture is mapped to a cube. The coordinates of a texture are U
in the horizontal direction and V
in the vertical direction. In the demo below, the texture can be moved in either the U
or V
direction. Here, the texture is repeated when it goes off on one side, but there are other ways of handling this too.
Texture maps are useful for adding details to meshes without adding more vertices, which will hit performance.
The base texture map is used to set the base color of the mesh.
The normal texture map is used to set the normal at each point of the mesh.
The roughness texture map is used to set the roughness at each point of the mesh.
When you combine these texture maps you get fake details without a high polygon mesh. In the demo below, the textures are applied on a low polygon count cube mesh. The normal texture map affects where the light hits, giving a illusion of detail. The roughness texture map works in conjunction with the normal map. If you reduce the roughness you'll see that the wood looks wet.