Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

A texel density walkthrough for Blender artists

2

If you’ve ever played video games and appreciated the level of consistency in detail (or even noticed a lack thereof) among the 3D elements around your point of view as you traversed the game world, you have experienced the good (or bad) application of a concept known as texel density. Texel density refers to the number of texture pixels (texels) per unit of 3D surface area. To create a sense that the various props and sets belong to the same world, 3D artists must maintain a consistent texel density across all the 3D models.

For video games, texel density is particularly important because it directly affects both the immersion of the players and the performance of the game engine. A lower texel density can improve game performance but at the cost of lower texture quality, while a higher texel density can improve texture quality but can negatively impact game performance.

When creating 3D renders as stills or animations, managing texel density is just as important for the same reasons, and in this article, we’ll take a closer look at how to think about texel density as it relates to creating 3D scenes in general, and how to do it in Blender using a great addon by Ivan Vostrikov.

An intuitive understanding of texel density

Let’s have a look at these rock models:

A Texel Density Walkthrough for Blender Artists

 

Something doesn’t feel right, does it? If we take a closer look, we can see that the smallest rock has very crisp textures, while the largest rock’s textures are blurred, and the remaining rock is at an awkward middle. These rocks all share a single UV space, but the sizes of their UV shells don’t reflect their actual size in the virtual space they occupy.

A Texel Density Walkthrough for Blender Artists
A Texel Density Walkthrough for Blender Artists
The largest shells on the right belong to the smallest rock

 

By resizing the UV shells of each rock in accordance with its size, we’ll get a more consistent level of fidelity across all three. We can do this by applying a checker texture on the models and resizing the shells until the checker tiles on all rocks are the same size.

A Texel Density Walkthrough for Blender Artists
A Texel Density Walkthrough for Blender Artists

 

‍That, in the most basic terms, is texel density. While the texel density of any given object or surface is an absolute value, the real importance lies in how proportionate the densities of surrounding objects are to it. To illustrate, let’s say we were preparing to create a render based on an image we found on Pinterest:

A Texel Density Walkthrough for Blender Artists
A snippet of the painting “Bedouins in the desert” by Alexis Girardet (the full painting is much more grand, but for our purposes we’ll use this cropped version shared by Pinterest user Yassir Hadi).

Texel density in scene creation

As we make our plans, it would benefit us later on to determine what texel density to work with as early as now. For this image, the ground could serve as a good starting point since it’s relatively close to where the camera would be. Let’s start by creating a plane with a checker map texture 4096 x 4096 pixels in size:

A Texel Density Walkthrough for Blender Artists

 

The texture detail at this size and camera range seems sufficient, so let’s go with it! Now that we have a point of reference, we would start creating our models and unwrapping them. Let’s assume that’s over and done with.

Here’s our scene at this point:

A Texel Density Walkthrough for Blender Artists

For this article, we’ll be working with the foreground elements and the characters’ clothing, but we’ll save the mountains and the characters themselves for a future article about UDIMs. Stay tuned!

We could approximate the texel density for each of the elements based on our checker mapped ground plane, but that would be tedious and thanks to the work of Ivan Vostrikov, unnecessary! Instead, we’ll use his handy Texel Density Checker addon, which is available for free, but certainly worth leaving a donation for!

A Texel Density Walkthrough for Blender Artists
Once you’ve downloaded the zip from the link above, just install as you would any other addon.

 

Let’s pull up the addon from within our UV Editor:

A Texel Density Walkthrough for Blender Artists

 

We have our ground plane’s UV shell occupying the entire UV grid, and we know our checker texture has a 4K resolution, so we’ll set our Texture size accordingly and (arbitrarily) have our units at pixels per meter.

By hitting “Calculate TD” we can see that our shell occupies almost 100 percent of the 0-1 grid, and has a density of 524.665 px/m. Let’s hit “ Calc-> Set Value” to establish this value as the point of reference for our other UVs:

A Texel Density Walkthrough for Blender Artists

 

Now if we select any other unwrapped mesh, we can use the “Set My TD” button to scale the UV shells or islands in proportion to the reference value.

A Texel Density Walkthrough for Blender Artists

 

Starting with the tent flaps, let’s select all the islands in the UV Editor and choose “Average” for the “Set Method” field in the texel density checker panel. Choosing average will scale all of the selected islands proportionally to the value that was set.

A Texel Density Walkthrough for Blender Artists

 

Let’s do the same for the tent poles.

A Texel Density Walkthrough for Blender Artists
Before setting TD 

A Texel Density Walkthrough for Blender Artists
After setting TD 

Since the poles are much smaller compared to the ground, the islands have shrunk correspondingly, and we’re now left with a lot of empty space in the UV Grid, which would be a waste of texture space. Here are some ways we can optimize things:

1. Change Texture Size

If we wanted a dedicated set of textures to this mesh, we could reduce the texture size.

A Texel Density Walkthrough for Blender Artists

By changing the Texture Size from 4096 to 2048 and hitting “Set My TD” again, we can make use of more texture space.

2. Set Custom Texture Size

A size of 1024 would have been ideal, but the islands were just a little too big for the grid. We could set a custom size to get around this, but that would mean having to work around any unpredictable tiling during our texturing phase.

A Texel Density Walkthrough for Blender Artists
Using a custom size of 1250 x 1250 

3. Share UV Grid with other models.

Sharing the UV Grid with other meshes is the optimal way to maximize texture space and reduce the amount of maps your render engine will have to compute during rendering. This makes the project file lighter and render faster, though by how much depends on the number of models in the scene that use image textures. If we were to animate this scene and use an online render farm to render out frames, this method would help immensely in driving down expenses.

The downside of this approach however, is that texturing each mesh that shares this UV grid will require more manoeuvring in our texturing application, especially if the meshes are meant to have different surface characteristics.

In any case, we’ll use this tactic for our demonstration.

A note about UV layout

When using Texel Density Checker, there can be instances where setting the texel density on multiple islands at once leads to overlapping UVs. A workaround for this is as follows:

A Texel Density Walkthrough for Blender Artists

 

Use Blender’s annotate tool to mark the length of a shell. Then use the Pack Islands operation to ensure that everything is laid out well.

A Texel Density Walkthrough for Blender Artists

 

After, simply scale the islands down until the shell you used as reference aligns with your mark.

A Texel Density Walkthrough for Blender Artists

 

For the sake of brevity, let’s have a look at the final UV layouts for all the objects that were achieved using the steps outlined so far, (with a few changes here and there to some seams in meshes for better layout).

A Texel Density Walkthrough for Blender Artists
Tent poles and small props (Texture Size: 4096 x 4096) 

A Texel Density Walkthrough for Blender Artists
Male character clothes (Texture Size: 2048 x 2048) 

A Texel Density Walkthrough for Blender Artists
Female character clothes (Texture Size: 2048 x 2048) 

A Texel Density Walkthrough for Blender Artists
Dog (Texture Size: 1024 x 1024) 

A Texel Density Walkthrough for Blender Artists
Tent Flaps (Texture Size: 4096 x 4096) 

Here is a density check for the render:

A Texel Density Walkthrough for Blender Artists

 

Every element that we worked on in the shot has a consistent Texel Density!

And here’s an initial render to serve as our work in progress:

A Texel Density Walkthrough for Blender Artists

Parting words

While the concept of texel density is more frequently discussed among game artists, hopefully this article has shown how essential it is for 3D rendering in general, as well as how to start incorporating it into your practice in Blender. Keep in mind however, that outside of creating assets for games there are much less technical constraints imposed upon you, and so the age-old wisdom of “if it looks good, it IS good” bears remembering. I hope this article was useful to you, and as always, Happy Rendering!

About the Author

Avatar image for GarageFarm.NET
GarageFarm.NET

An affordable, cloud-based, user-friendly render farm with 24/7 real-time support. https://garagefarm.net

2 Comments

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×