Texture Atlas Material Function in UE4

I tried to find a good tutorial or a nice example of a Texture Atlas in UE4, but everything was half-working, extremely complicated or for an old version of the engine.

So I decided to make my own, based on the one from mAlkAv!An on Unreal Forums. It doesn’t differ much, but allows to be versatile and reused throughout your project.


Texture Atlas in UE4


With this simple version, you might have some artifacts around the edges if your textures in your Texture Atlas doesn’t share the same pixels on the edges. In my GUI Texture Atlas, all the textures have white borders so it’s not a problem.

This issue is because of MipMaps, the thing that diminish automatically your textures quality in the distance

So if you have artifacts, you might want to recompute those MipMaps on the fly like this:


Texture Atlas in UE4 with fixed MipMaps and no artifact.


However I won’t advise to build this MipMap recomputation inside a MaterialFunction. If you absolutely need it, use it on a per-material basis if the artifacts are too terrible.

I created a Texture Atlas Material Function for you to download, simplifying the whole process. It looks like this:


Texture Atlas Material Function to download for UE4

Download the Material Function here.

Once downloaded, open the .zip and copy-paste its content somewhere in your Content Folder. It should appear in your Material Function Library.