What is Texel Density, and Why is it Important? Why Does UV Packing Matter in Game Development?

ilkyal3d
4 min readMay 14, 2024

--

The term texel density (or sometimes referred to as pixel density) describes how many tiny squares (pixels) fit on the surface of a 3D model in a game.

To illustrate, let’s imagine wrapping a gift: We want the wrapping paper (texture) to fit perfectly and look good without being too stretched or too squished. While having clean UVs helps with stretching, having higher pixel density results in less blurry, sharper, and better-looking textures.

In the following screenshots, no changes were made in the material editor, textures have the same resolution, and UV seams are placed exactly in the same locations. The only difference here is the texel density count. Which model do you think looks better? (Please ignore the stretching in some areas; it’s an unfinished model.)

Texel Density Amount: 128.0px/m
Texel Density Amount: 64.0px/m

How does texel density work?

Texel density is a way to tell our software how many pixels we want on our mesh per meter.

For example, let’s say we have a wall with a height of 1 meter and we choose a texel density of 500 pixels per meter (px/m) for this wall, and we think it looks really nice.

Now, if we want to make this wall even taller while maintaining the same sharp texture as it had when it was 1 meter tall, we would need to double its pixel density:

  • 1-meter-tall wall: 500 pixels per meter (And let’s say it already looks great!)
  • 2-meter-tall wall: 1000 pixels per meter (So we maintain a consistent pixel ratio across the surface of the mesh.)

So what happens if we take our wall and make it 2 meters long, but keep the texel density still at 500px/m?

Since the wall is now twice as tall but the texture height is the same, the detail will be less sharp. The pixels are now stretched over a larger area, reducing the detail.

In other words, for the new 2-meter wall to maintain the same level of detail as it did when it was only 1 meter, we would need to double its texel density count. (The original wall was 1 meter long with a texel density of 500px; now that it is 2 meters long, the texel density should also double to 1000px).

When we keep the texel density at 500 px/m while increasing the wall height from 1 meter to 2 meters, the UV mapping will spread the 500 pixels over 2 meters instead of 1 meter. This results in 250 pixels per meter, which is half the original density of 500 pixels per meter. Again, this means the texture will be less detailed because each meter of the wall now receives only 250 pixels instead of 500.

How do we adjust texel density in Blender?

Blender does not come with a built-in tool to perform this action, but fortunately, we have an excellent free add-on called ‘Texel Density Checker,’ which you can download here!

You can change your unit parameters at the top of the screen and select a desired resolution in the TD area to set the desired pixel density. (In the second area displayed above.)

1-) How do you find out the texel density of your asset?

  1. Select your mesh in ‘Object Mode’.
  2. Switch to ‘Edit Mode’.
  3. Select all the faces of your mesh in ‘Edit Mode’, then press the ‘Calculate TD’ button.”

2-) How do I make that my multiple assets share the same texel density?

  1. Set the desired texel density (set my ‘TD’) for one of the meshes.
  2. In object mode, select as many meshes as you want. As the last step, select the mesh for which you have just set the ‘TD.’
  3. Choose the ‘TD from active others’ button from the ‘Texel Density Checker’ addon menu. This will make that every asset’s UV shares the same texel density.

Extra Tip: UV Packing: What’s it, why do we need it?

Let’s say you have multiple meshes and want them to exist in the same UV space (This is especially important for real-time applications such as Unreal Engine/video games/etc, where performance and memory usage are critical.) without interfering with each other, so that you don’t waste any UV space. To pack UV’s properly without spending too much time on it yourself, you can use an automation tool called ‘UV Packer’, which is a free addon that you can download here.

These three meshes are sharing the same amount of texel density, but in the UV space they are all over the place.
And this is how the ‘UV Packer’ addon can arrange them appropriately.

Final Notes

One more thing about texel density: You can’t simply opt for the highest amount for every single asset because higher pixel density can and will be more taxing on the hardware. There isn’t a single guideline to follow since every game has its own specific design, polygon count, and asset choices, but this is something you should keep in mind. Other than that, if you find these text-based tutorials helpful and would like to see more of them, feel free to support me on Patreon by donating only $1 a month!

--

--