Table of Contents

Textures

Textures come in multiple forms, each represented by its own asset type:

  • Texture 2D: Regular 2D textures and 2D texture arrays created from image files. This is the most common type.
  • Texture Cube: Cubemaps, mostly used for sky boxes and special effects.
  • Texture 3D: Volume textures, used for volumetric data and for color grading lookup tables.
  • Render Target: 2D textures that are filled by rendering into them at runtime, for render-to-texture (TODO).
  • Substance Texture: 2D textures generated from the graphs of a Substance Designer .sbs file. Requires the Substance plugin and a local Substance Designer installation.

Additionally, color gradients can be used directly as 1D textures, without creating a separate texture asset.

Solid color textures don't need an asset either. Wherever a 2D texture is referenced, you can enter a color name such as Red or CornflowerBlue (case-insensitive, optionally with a .color extension, for example White.color), or a hex value in the form #RRGGBB or #RRGGBBAA. This creates a 4x4 sRGB texture filled with that color. Unknown color names log an error and use RebeccaPurple instead.

When the source texture comes from a file, you can create a texture asset for that file by importing it. Otherwise you need to create the respective asset document manually, for example for render targets.

Textures are most often referenced by materials. Texture assets only specify how source files are imported and combined, they don't define rendering behavior. Therefore most components don't use textures directly, but rather use materials, which configure the overall rendering, unless the component in question already sets up the rendering itself, such as the SkyBox component.

Texture Asset Editor

Texture Asset

All texture assets show a 3D preview. Here you can move the camera around to observe how the texture looks. Using the Mipmap slider in the toolbar, you can inspect individual mipmaps. With the channel selection dropdown next to the slider you can choose which channels to show. In the bottom left of the viewport, some stats are displayed, for instance what compression format is used. Texture 3D assets use a different preview.

On the right-hand side you see the property grid where you choose the texture settings. The available properties are described on the page of each texture type. Since transforming a texture can take quite some time, these assets are not automatically updated when you change their properties or even save the asset. Instead, transform the asset manually either by clicking the transform button in the toolbar or with Ctrl + E. Render targets are the exception, they are transformed when saved.

Video: How to import textures

video

Texture Resolution Limits

The resolution at which 2D, 3D and cubemap textures are uploaded to the GPU can be reduced at runtime through CVars. This is meant for quality settings, for instance to reduce GPU memory usage on weaker hardware.

  • Rendering.Textures.DropMips (default 0): How many of the highest mipmaps to skip for every texture. This reduces all textures by the same factor, regardless of their size. For example, a value of 1 loads a 2048 texture at 1024 and a 512 texture at 256.
  • Rendering.Textures.MinResolution (default 64): Textures are never reduced below this resolution by DropMips. Textures that are already smaller than this are not reduced at all. This prevents small textures, from losing all detail.
  • Rendering.Textures.MaxResolution (default 16384): The maximum resolution a texture is uploaded at. Larger textures drop as many mipmaps as needed to fit. This is a hard limit. If it is smaller than MinResolution, it takes precedence.

DropMips is applied first, the two resolution limits then clamp the result.

All three CVars are saved and restored between runs.

The maximum resolution at which textures are stored can also be limited per asset profile, when the assets are transformed.

See Also