When you’ve ever performed video video games and appreciated the extent of consistency intimately (and even observed an absence thereof) among the many 3D parts round your viewpoint as you traversed the sport world, you’ve gotten skilled the nice (or unhealthy) utility of an idea generally known as texel density. Texel density refers back to the variety of texture pixels (texels) per unit of 3D floor space. To create a way that the varied props and units belong to the identical world, 3D artists should keep a constant texel density throughout all of the 3D fashions.
For video video games, texel density is especially necessary as a result of it straight impacts each the immersion of the gamers and the efficiency of the sport engine. A decrease texel density can enhance recreation efficiency however at the price of decrease texture high quality, whereas the next texel density can enhance texture high quality however can negatively affect recreation efficiency.
When creating 3D renders as stills or animations, managing texel density is simply as necessary for a similar causes, and on this article, we’ll take a better take a look at how to consider texel density because it pertains to creating 3D scenes usually, and the best way to do it in Blender utilizing an incredible addon by Ivan Vostrikov.
An intuitive understanding of texel density
Let’s take a look at these rock fashions:
One thing doesn’t really feel proper, does it? If we take a better look, we are able to see that the smallest rock has very crisp textures, whereas the biggest rock’s textures are blurred, and the remaining rock is at an ungainly center. These rocks all share a single UV area, however the sizes of their UV shells don’t replicate their precise dimension within the digital area they occupy.
By resizing the UV shells of every rock in accordance with its dimension, we’ll get a extra constant stage of constancy throughout all three. We will do that by making use of a checker texture on the fashions and resizing the shells till the checker tiles on all rocks are the identical dimension.
That, in essentially the most primary phrases, is texel density. Whereas the texel density of any given object or floor is an absolute worth, the true significance lies in how proportionate the densities of surrounding objects are to it. As an example, let’s say we have been making ready to create a render based mostly on a picture we discovered on Pinterest:
Texel density in scene creation
As we make our plans, it will profit us in a while to find out what texel density to work with as early as now. For this picture, the bottom might function a great place to begin because it’s comparatively near the place the digital camera could be. Let’s begin by making a aircraft with a checker map texture 4096 x 4096 pixels in dimension:
The feel element at this dimension and digital camera vary appears ample, so let’s go together with it! Now that now we have a degree of reference, we might begin creating our fashions and unwrapping them. Let’s assume that’s over and achieved with.
Right here’s our scene at this level:
For this text, we’ll be working with the foreground parts and the characters’ clothes, however we’ll save the mountains and the characters themselves for a future article about UDIMs. Keep tuned!
We might approximate the texel density for every of the weather based mostly on our checker mapped floor aircraft, however that may be tedious and due to the work of Ivan Vostrikov, pointless! As an alternative, we’ll use his helpful Texel Density Checker addon, which is accessible without cost, however definitely price leaving a donation for!
Let’s pull up the addon from inside our UV Editor:
We’ve got our floor aircraft’s UV shell occupying the complete UV grid, and we all know our checker texture has a 4K decision, so we’ll set our Texture dimension accordingly and (arbitrarily) have our models at pixels per meter.
By hitting “Calculate TD” we are able to see that our shell occupies virtually one hundred pc of the 0-1 grid, and has a density of 524.665 px/m. Let’s hit “ Calc-> Set Worth” to determine this worth as the purpose of reference for our different UVs:
Now if we choose every other unwrapped mesh, we are able to use the “Set My TD” button to scale the UV shells or islands in proportion to the reference worth.
Beginning with the tent flaps, let’s choose all of the islands within the UV Editor and select “Common” for the “Set Methodology” area within the texel density checker panel. Selecting common will scale the entire chosen islands proportionally to the worth that was set.
Let’s do the identical for the tent poles.
For the reason that poles are a lot smaller in comparison with the bottom, the islands have shrunk correspondingly, and we’re now left with plenty of empty area within the UV Grid, which might be a waste of texture area. Listed below are some methods we are able to optimize issues:
1. Change Texture Measurement
If we needed a devoted set of textures to this mesh, we might scale back the feel dimension.
By altering the Texture Measurement from 4096 to 2048 and hitting “Set My TD” once more, we are able to make use of extra texture area.
2. Set Customized Texture Measurement
A dimension of 1024 would have been preferrred, however the islands have been just a bit too large for the grid. We might set a customized dimension to get round this, however that may imply having to work round any unpredictable tiling throughout our texturing section.
3. Share UV Grid with different fashions.
Sharing the UV Grid with different meshes is the optimum strategy to maximize texture area and scale back the quantity of maps your render engine must compute throughout rendering. This makes the challenge file lighter and render sooner, although by how a lot depends upon the variety of fashions within the scene that use picture textures. If we have been to animate this scene and use an internet render farm to render out frames, this technique would assist immensely in driving down bills.
The draw back of this strategy nonetheless, is that texturing every mesh that shares this UV grid would require extra manoeuvring in our texturing utility, particularly if the meshes are supposed to have totally different floor traits.
In any case, we’ll use this tactic for our demonstration.
A notice about UV structure
When utilizing Texel Density Checker, there will be situations the place setting the texel density on a number of islands directly results in overlapping UVs. A workaround for that is as follows:
Use Blender’s annotate instrument to mark the size of a shell. Then use the Pack Islands operation to make sure that every thing is laid out nicely.
After, merely scale the islands down till the shell you used as reference aligns together with your mark.
For the sake of brevity, let’s take a look on the ultimate UV layouts for all of the objects that have been achieved utilizing the steps outlined up to now, (with just a few modifications right here and there to some seams in meshes for higher structure).
Here’s a density verify for the render:
Each component that we labored on within the shot has a constant Texel Density!
And right here’s an preliminary render to function our work in progress:
Whereas the idea of texel density is extra continuously mentioned amongst recreation artists, hopefully this text has proven how important it’s for 3D rendering usually, in addition to the best way to begin incorporating it into your observe in Blender. Consider nonetheless, that exterior of making property for video games there are a lot much less technical constraints imposed upon you, and so the age-old knowledge of “if it appears good, it IS good” bears remembering. I hope this text was helpful to you, and as at all times, Glad Rendering!