Textures

Textures are images mainly used in . Xenko maps textures to the surfaces the material covers.

Textures can add color information to a material — for example, to add a brick pattern to a wall or a wood pattern to a table. The values of the pixels in a texture (texels) can also be used for other calculations, such as in specular maps, metalness maps, or normal maps.

Materials typically contain multiple textures; for example, a material might contain a color texture, a normal map texture, and a roughness texture.

Textures can also be used outside materials; for example, you can draw them directly to the UI, or use them in .

You can use the following file types as textures:

  • .jpg
  • .jpeg
  • .gif
  • .bmp
  • .psd
Note
  • Xenko only imports the first frame of animated image files, such as animated gifs or PNGs. They don't animate in Xenko; they appear as static images.
  • Xenko currently doesn't support movie files.

In the Asset View, click Add asset > Texture, then select a template for the texture (color, grayscale or normal map):

Note

Render targets are a different kind of texture, and don't use images. Instead, they render the output from a camera. For more information, see .

Alternatively, drag the texture file from Explorer to the Asset View:

Then select a texture template (color, grayscale or normal map):

List of asset templates

Game Studio adds the texture to the Asset View:

The following properties are common to all textures.

Texture properties

The following properties apply if you set the texture type to color.

The following property applies if you set the texture type to normal map.

For more information about normal maps, see the Normal maps page.

Grayscale texture use only the R channel of the image (finalRGBA = originalRRRR).

Note

If you add a texture to a scene (as a sprite component), and set the texture type to grayscale, it appears red, not monochrome. This is because the image uses the R (red) channel.

To make the channel monochrome, in the Sprite component properties, set the Type as Grayscale. For more information about the sprite component properties, see .

You can use grayscale textures to provide values in material maps. For example, you can use a texture as a blend map to blend two material layers:

Blend map diagram

Note how the blend map texture corresponds to the patterning on the result.

For more information, see .

Texture settings