Home > Articles

  • Print
  • + Share This
This chapter is from the book

Texture and Material Workflow

Just like any time you move from one rendering software to another, you must face the requirement to re-author your materials to take advantage of the new renderer’s features, and UE4 is no different.

UE4 allows you to import materials with your Meshes, but the options for import are limited and require your source Materials to be authored in a very specific manner.

This is not to say that importing materials into UE4 is not worth your time—it can be a huge time saver for prototyping and assigning well-authored UE4 Materials. Don’t spend too much time working on your materials in your 3D application, however. A simple diffuse map or color will suffice (and is about all that will come in!).

Textures

UE4 imposes some strict rules and limits on textures. Some rules are strictly enforced and cause textures to fail to import; others might simply degrade quality or performance in your project.

Most of the rules are technical limitations imposed upon Unreal Engine 4 by the hardware and software UE4 runs on. The Graphical Processing Units (GPU) on graphics cards are specific about how textures are stored, accessed, and rendered, and UE4 is beholden to these limitations.

Supported Formats

UE4 supports a range of image formats:

  • .bmp

  • .float

  • .pcx

  • .png

  • .psd

  • .tga

  • .jpg

  • .exr

  • .dds

  • .hdr

The most commonly used are BMP, TGA, and PNG.

TGA files are the game-industry standard for 8-bit images. This is due to the explicit control artists have over the content of the image on a per-channel basis. UE4 accepts 24-bit (RGB) and 32-bit (RGBA) TGA files.2

PNG files are most widely used for UI elements because they use a pre-multiplied alpha that lets them blend properly. This alpha, however, isn’t typically suitable for other textures.

I recommend using TGA or BMP for all textures being used in materials.

Mip-Maps

Mip-Maps are reduced resolution versions of textures that are pre-calculated and stored as part of the texture. These allow the GPU to use the smaller texture sizes as objects get farther away from the camera. This avoids aliasing and can help performance.

Resolution

All textures should be scaled to a power-of-two resolution, such as 64, 128, 256, 512, 1024, and so on. With a maximum dimension of 8192 x 8192, higher resolution textures require source code modification and might not be supported on all video cards.

Textures can be non-square, but should still be a power of two on each dimension; for example, 128 x 1024 is fine.

You can import textures that are non-power of two, but they will not produce Mip-Maps, which introduces various visual artifacts in the project. You should almost always take the time to scale your textures to an appropriate size before importing.

Alpha Channels

You can include alpha channels in many of the formats; however, be aware that alpha channels double the memory footprint of your texture, so include them only if they are being used.

Another option is to include an alpha channel as a separate texture. This can help when you need to share alpha info between different textures or want to have a lower resolution alpha map than the other channels.

Compression

UE4 uses hardware-level texture compression. In most cases, this is a DDS format with some significant block compression artifacts, so having quality source images is very important (that is, avoid using compressed source images).

You can override compression on a per-texture basis, but you should only do this as required. Uncompressed textures can be up to eight times the size in memory.

Multiple Materials

UE4 fully supports multiple materials on a single Mesh. In your 3D application simply assign materials to your individual faces and use the usual FBX workflow. The only caveat is that each material increases the rendering overhead for that Actor. For actors that are used infrequently, such as architecture or buildings, this is fine. Author assets that get used liberally in scenes (vehicles, vegetation, props, and so on) to have as few materials as possible because not doing so will quickly present a performance issue in your project.

  • + Share This
  • 🔖 Save To Your Account