Quick Tip: Optimizing Textures In Unreal Development Kit


In today's quick tip, new author Ankash Kallyat will discuss optimizing textures in Unreal Development Kit and some of the key things to remember when importing textures into UDK. We'll look at a few ways to save memory by extracting Specular maps from Diffuse maps, as well as working with LOD settings to optimize game play.

Republished Tutorial

Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. This tutorial was first published in December of 2011.

Before we start, I would like to list out the formats supported by UDK. The following Texture formats are supported:

  • .bmp
  • .pcx
  • .tga
  • .float
  • .psd
  • .png

I mostly prefer TGA as it is now supported by most of the software packages, plus you can tweak the alpha. I often save textures in TGA format, but sometimes TGA files get saved in 32 bit and sometimes with a plain alpha, even though they actually don't contain any alpha information.

This is very bad because UDK imports TGA files and tries to compress them with it's built-in Compressor known as DXTC. However, the alpha is not completely compressed or sometimes not at all by Unreal Engine 3. So it's better to save the file without an alpha, if you really don't need any alpha information in the Unreal Engine. Also make sure the file is saved with 8 bits per channel RGB/RGBA format to avoid complications when importing.

Here I'll be starting off with a simple foliage texture (the Banana Palm leaf.)

Optimizing Textures In Unreal Development Kit Click To Enlarge

Extracting a Specular map from a Diffuse map

We all tend to save files in three different formats i.e. Diffuse, Specular and Normal maps. Although you really don't always have to save a separate specular map, because we can extract it from the diffuse map.

Optimizing Textures In Unreal Development Kit Click To Enlarge

As shown above in the the Unreal Material Editor, I extracted the Red and Green information from the Diffuse map, and then multiplied it. I again multiplied it with a constant value of 18 just to crank up the result.

You can adjust it according to your desires or you could import a 256 x 256 specular map instead of using the constant parameter.You will be able to see the second multiplied value starts to shine a little bit (which is exactly what we wanted,) after that just plug the result into the "Specular" node.

You can also plug the constant parameter value into the "Specular Power" node, if want a nice and shiny specular Result. That's it, we've just created a specular map from a diffuse map and have thus saved enough memory to load one more 1024 res map in engine.

Importing Tips n Tricks

Whenever we try to load or save a texture map we usually miss out and forget to check the resolution of the texture map. Always check the resolution of the map because UDK only imports textures with a resolution of 2 (x2.)

For example: 256 x 256, 512 x 512, 1024 x 1024, 2048 x 2048 and so on. Again make sure the file is saved in 8 Bits per Channel RGB/RGBA format, to avoid complications while importing. To check this out, open up the file in Photoshop and Go to Image-->Mode--> and there you should see 8 Bits/ Channel selected. If it's not, then just click on it. After you load the texture, make sure that you've set the LOD Bias.

LOD Bias Setting

Optimizing Textures In Unreal Development Kit Click To Enlarge

As shown in the above texture properties, I have imported the banana leaf texture with a resolution of 1024 x 1024 but I've set the LOD bias to 1. What Happens here is the resolution decreases by 1 step (x2) which is 512 x 512, so you don't have to load photoshop for that.

The reason I've set the load bias to 1 is because our mesh is simple foliage and 1024 x 1024 is going to drain a lot of memory. Below is the difference between "With LOD Bias" and "Without LOD Bias".

In UDK go to View and then the Browser window and select Texture Stats to see the statistics of the textures loaded in your scene.

Without LOD BIAS Setting

Optimizing Textures In Unreal Development Kit Click To Enlarge

As you can see in the above image, the textures are loaded in a 1024 x 1024 dimension with no LOD bias set. The Textures here are each using about 1366kb of memory.

With LOD BIAS Setting

Optimizing Textures In Unreal Development Kit Click To Enlarge

In the above pic, the textures are loaded in 1024 x 1024 dimensions but with the LOD Bias set to 1. Each Texture is using about 342 kb of memory.


For objects where you need high detail you don't have to do the above process. But for simple static objects like foliage, grass, leaves and any other such static meshes, you can go for the above process. This will save a lot of memory thus optimizing the gameplay.

Related Tutorials:

Related Posts
  • 3D & Motion Graphics
    Create a Realistic Shark in Maya using Subdivision Surfaces: Part 2Maya shark pt2 retina
    In this part of the tutorial, you'll learn how to unwrap and texture the shark model. This time we'll explore a different method of texturing inside Maya, which is called 3D paint. This is somewhat like painting in ZBrush or MudBox and allows for direct 3D painting in Maya's viewports.Read More…
  • 3D & Motion Graphics
    Creating an Advanced Hologram Material in UDKUdk hologram retina
    In this tutorial we'll be creating an Advanced Hologram Material in UDK, which animates to and fro with the help of Parallax mapping (Bump mapping) in Unreal Development Kit. We'll also be learning how to use RGB channels in Photoshop to create a single texture from three separate textures. To understand this tutorial thoroughly, you at least need to know the basics of Shading and Material creation in UDK.Read More…
  • 3D & Motion Graphics
    Setting Up Dynamic Cloud shadows in UDKThumb.1
    If we start UDK and load any default template map, we get a sky dome loaded with its pre-defined time of the day, set along with the animation of the clouds. Well that’s actually the material setup in UDK which is applied to a Skydome mesh and thus we can see the Sun and all the clouds moving, but no shadows on the ground. So today we’ll be learning how to get cloud shadows just by setting up a Cloud material and plugging it into the function of the Light. Yes it’s very easy and looks very Real too, so let’s get started.Read More…
  • 3D & Motion Graphics
    Working with Advanced Reflections in UDKThumb
    In this tutorial we'll learn how to setup both a Dynamic (realtime) and a Static reflection material in Unreal Development Kit, and create a Parameter Switch to switch from Dynamic to Static reflections, or vice versa in UDK. For the tutorial I'll be using the February 2011 version of UDK.Read More…
  • 3D & Motion Graphics
    Maya To UDK: Importing Static Meshes Using ActorX & FBXThumb
    In this tutorial you'll be learning how to import Static meshes from Maya to UDK (Unreal Development Kit) using the ActorX plug-in, as well as the FBX Importer plug-in in Maya. Most importantly we'll be setting up the Maya Grid system to match the Unreal Grid system. We'll be using Maya 2011 here as the ActorX plug-in is only available up until version 2011, after which Epic Games stopped developing ActorX due to the implementation of the FBX pipeline in UDK.Read More…
  • 3D & Motion Graphics
    Speedtree to UDK: Creating A Palm Tree In Speedtree And Importing It Into UDKThumb2
    In this tutorial Ankash Kallyat will cover the workflow of creating a great looking palm tree using SpeedTree and how to get it up and running in Unreal Development Kit (free). This is a great project for anyone interested in creating trees, plants or foliage for use in engine. Speedtree (included with UDK) features a unique and intuitive interface which allows you to quickly create various types of plant life using a very easy to understand node based system.Read More…