What is Texel Density and How to Master it

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey this is Malcolm three for one in this video we're gonna look at what Texel density is and some tricks to speed up UV mapping your models consistent Texel density is a must for any good UV pack so let's get into it okay so what is Texel density Texel stands for texture element and is the fundamental unit of texture space textures on 3d objects are represented by texels in the same way images are represented by pixels they are a unit of a texture they are not the same as pixels because a Texel is a container for the pixels sometimes people refer to Texel density as pixel density or texture density but they're usually all talking about the same thing super confusing right so the easiest way to describe this is in a texture the smallest unit you can have is one pixel but in UV mapping on a 3d model the smallest unit you can have is whatever you want because you can pile the texture or scale the UV shell so each pixel can contain a different number of pixels I guess a Texel is kind of like a virtual unit which can contain as few or as many pixels as you want but who cares about all that what you really care about is getting the highest and most consistent Texel density when you UV map your models so here you can see bad pixel density on the left and good Texel density on the right and here you can see bad Texel density consistency and good Texel density consistency so always aim for high Texel density that's consistent across the models in your scene it looks really bad when your assets have different Texel densities so the first thing you want to do is define the average Texel density for your scene or better yet for your whole game you need to do this before you build any assets if you're working a contract for someone else you need to ask them what Texel density they want the assets delivered in so I like to work in 400 units in Maya equals 2048 pixels this is the Texel density we've used for most of the games I've worked on this gives you good resolution versus repeated details since ground terrain textures can technically tile as much as you want but you want to maintain consistency with the props as which can't tile because they're unwrapped so how you look at this in Maya is create a plane and scale it to 400 units if the plane is uv-map exactly 0 to 1 this will be 400 units in maya equals 2048 pixels because we've got a 2048 texture applied to it ok so go to create and then go to polygon primatives and then plane and then whatever i'm to scale it a little bit so then you can go over to the channel box here and you can actually just select all these and type in 400 and hit enter and then boom so we know the plane is exactly 400 units big in maya and so now i'm just gonna go into or is it rendering editors hypershade here and just quickly go to my ref textures folder or drag that in there frame it select this right click and say assign and so now I have a plane which is 400 by 400 units in Maya and I've applied a 2k texture to it or 2048 by 2048 texture so now I've set my Texel density for the seams so I've got this grid texture on it so I know if everything else in my scene matches this grid I can use this as kind of the base for the whole environment so none of my objects if possible should have bigger or smaller checkerboard on them if I apply this texture and they're UV mapped correctly thanks to Cody Richie for this checkerboard pattern I've actually been using this thing since 2003 ok so this thing's map perfectly but what if I build something new or what if I were to duplicate this and move it over here let's see I'm just gonna snap the pivot there snap this there and then it's perfect right now but let's say I scale it so I'm gonna scale it way bigger and you're gonna see here's a Texel density mismatch where like this thing looks like really low res and it's all pixelated and blurry and this thing is nice and crisp so for simple shapes there's a trick you can do just select the one that's out of the Texel density range and into UV and then go planar and go to the options box and you want to do y and keep height so because we want to project from the top down and if it projects and then you'll see in the channel box here you'll actually get projection width height and you can type in 400 similar to how we scaled the other asset so it's kind of the same difference so if 400 and so you have the exact same Texel density now as the previous one and you might notice oh what the hell's going on here the edges all screwed up or whatever and that's because it projects it from the center out so if you wanted to fix that as well you could just select the UVs and snap the pivot down to there and then snap it to the corner grid and then I'll just kind of edge off here so you can see there it's actually perfectly exactly the same so if I select both the UV shells at the same time up just a second here there we can see it a bit better so you can see that's our original one there and this is in relative space it's exactly scaled the perfect amount to hit our ratio of 400 units in Maya equals 2048 pixels even though that this has been scaled to an arbitrary size now you might say well that's cool but that only works on simple shapes I have a complex prop where a planar map won't cut it and that's great I got you covered there are two additional techniques to achieve the same result so the first technique you can use the sew together tool to get the correct Texel density I'll show you how to do that it's kind of like a secret trick first I'm gonna select this face and I'm gonna use that little custom tool that I built you've copied the material to the clipboard and paste it onto this guy save myself some time so you can see this guy's Texel density is all at a wack he's all like super big that's random that's rotated this is bigger than that even within itself so what we can do here actually I'm just going to turn this on so you can see what we're doing and we can use a trick so let's just make this example even more obvious so I'm you select this unis shops already had it select it I'm gonna scale it up like whoops massive here so it's like way too high density compared to what we're shooting for which is the same as the rest of the set here so what you can actually do is you can we know that this guy let's select this guy here and we'll just use our other trick to do the planar map that we saw before with the Y and keep height width and apply that and set it to be 400 boom okay so we know that this part is the correct Texel density and then this is to wrong it's too high Texel density so the cool thing is what we can do now is we can just find a shared edge between the two so it looks like that edge is shared between both and we can hold down shift and right click on the keyboard and mouse and we can use this stitch together tool and if you go into the options box for this stitch together tool you can say the smallest to the largest so what that means is it's going to so the smaller one for the largest always so you don't have to fiddle with any options so we actually want to scale this guy down so you can get sewn to the one with the correct Texel density this will actually be a more obvious example as well so you can see here we've got super blurry and big and we're targeting this which was our 400 so we're gonna select this edge it doesn't actually matter which edge just any edge on the target surface and biggest sorry smallest is gonna go to biggest so shift let's right-click stitch together boom and you get perfect Texel density because it scales it and inherits it as it stitches together just turn that edge off see you better so it's actually perfect and now we don't actually want to layout the asset like that so all we have to do now is just find the edge here and just go to the cut tool and then just reset that it's a couple which one is it this guy I'll just cut them all cut that again and there we go it's separated so I've kind of tricked the tool into doing the scaling for me perfectly so I can get a really complex shape here stitch it into a single face temporarily cut it back out and then not have to worry about fiddling with UV settings or scaling it manually or lining up the grid or anything like that let's do that to the bottom part of the asset as well just for fun here so should I turn that on before so we can see more clearly but whatever so this thing's already been pretty matte so I'm just gonna scale it down so it is really small and again I'm gonna just choose a shared edge sure good enough and then just stitch together and boom done perfect Texel density once again and then quickly cut that guy out and then separate it and then pack it however you want and then if you look down here you'll also notice this is our reference object the plane that we had from before that we mapped originally and you can just check out checkers on our reference object and they're the same size as the checkers on our freshly map object so you can confirm that they are indeed mapped correctly the next trick is even easier than that and is super powerful so I'm just going to open up the UV toolkit here on the side if you don't have that open on your version of Maya where as it and tools hide show you can toolkit now let's just change this guys used to be like totally out of whack will scale them way down so they're way far out of our average Texel density that we're trying to achieve we just want to get these guys just we want a magic button that we just click and it just goes boom and and goes to our magic Texel density so what you can do is you can go into this hideous tool and you can open up the transform rollout and then at the very bottom of the transform rollout there's this hidden tool here so what you can do is you can type in 2048 because that's art exercise that we're going for and you can select your reference object which you already have pre mapped here and you can click the get button and the get button is going to take the Texel density from that asset and paste it into here this number here so I guess 400 units equals 2048 pixels somehow maps to 5.1 - I don't know what that means it's totally meaningless to me and you don't need to know either because it won't matter so once we have that value in there and we can just select our object and we can click set o1 click done so you can always just come back into this tool at any time and just click set set set sets that's its that's it so that is like super powerful the best part is it works on a UV shell basis so you don't have to change your whole model if you're just trying to set part of the Texel density so for example I don't want to affect these these are all done perfectly so I just want to get that one so you just do it on UV selection and boom set you're done magic so the next thing to talk about is to hit this Texel density down here that's awesome we hit it but this doesn't fit into the 0 to 1 UV space anymore so this can't be a prop but we want this we want this to be a prop so let me just press control L here to lay out the UVs into the 0 to 1 space and when I lay them out the checkers get much bigger because I'm not using enough of the UV space and this is a terrible pack obviously so my goal is to unwrap my prop so the checkers match with the reference object that we have below and so what that means is for everybody out there that's unwrapping their props uniquely and by that I mean every single UV she'll take space in the 0 to 1 UV space that's actually a terrible idea I highly don't recommend that that doesn't work in the games industry you need to hit your Texel density targets or your model will look blurry and pixelated so you have to use all types of hacks and tricks to try and to try and pack your UVs as tight as possible and as big as possible so let's just select that stuff again and we can use our magic set button cool so we've got our perfect Texel density but now you have to spend hundred hours trying to pack all these guys together and so how I would start that is I would start actually like mirroring faces and butterflying stuff and stacking UV shells so stack all of these guys on top of here I'm just gonna do a really shitty job of this and just for demonstration purposes this would never work to actually texture but you get the idea you stack those guys those four faces can repeat that same texture and that's fits into the shell a lot better than before but um same sort of thing you could stack all of these guys you could separate these into their own UV shell and stack them which rotate that right stack that guy on that guy and stack this one on this one not gonna bother lying it up because this is just for demonstration purposes stack back onto that guy but you really need to choose where you want unique texture detail and where you can repeat texture detail and then whatever you'll have to figure out a way to cut that guy up and stick him in there as well to it to achieve the highest Texel density and therefore the highest resolution textures so earlier we talked about consistent Texel density across all assets in the scene and that's what looks best because when you have mismatches it looks awful and now I'm going to tell you to break that rule so here's an asset that I made a little while back let's just apply the checkerboard texture from the other scene to it and you're going to see that this is all good it's all mapped as high residues it can be actually you can see here in the UV editor see all this red stuff that's how much I've repeated this empty space is actually this texture is shared from another asset so that's actually filled up if I brought the other asset into the scene with this but all this red stuff is reused and shared you can see actually on the back here because it's not that important on the back side of it this metal bit let me just do that this metal bit here it's actually quartered so I only map a quarter of it and then I stack it on top of itself if you look closely you'll actually see the butterflying happening right there so let's just turn the or back on so what I wanted to say is keep all this stuff consistent as much as you can and then when you're done with your uv-map if you have extra space left over I recommend that you take really small details and actually scale those up so you can see here bolts here I've actually scaled those up so you can see the numbers in the checker are actually higher res here and what I found in games is that if you map everything perfectly to this which is the highest I can get to fill in the space or whatever that's going to look fine but on smaller details that they'll look super blurry and they looked super pixelated and people will zoom in on the camera and they'll see a little bolt or a screw or something or a latch or whatever and it'll look really awful even though it is the same axle density and it's consistent it just looks too low res and awful so for like these little micro details which I think are actually mapped right up here once I've finished my general unwrap if I've got a little bit of space left over I'll take all my micro details and I'll scale them up roughly like a quarter more or half high right higher res than the general pack and I find that that just looks generally better it's kind of a perceptual thing although it's incorrect smaller details often look better if they are higher res than the more broad details so creating a little bit of inconsistency there when you're done with your UV unwrapping is actually desired so I would recommend doing that on all the models that you work on so this is the little road road sign set that I had to build with a bunch of different shapes and the constraint was they wanted me to use a single texture so if you see it I'll select so let me just select all of these guys here so you can see it's filled up as much as I could and overlapped as much as I could for the different shapes so that's the final UV pack there and let's just check the final UV wastage so to do that I believe you go into tools no sorry it's view heads-up display this is a it turns itself off even though it's turned on and go in the UV statistics and hit apply again and then you can see down here it looks like I've used 82% of the UV space so that's pretty good generally on games that I've worked on I would target a minimum of 70% I wouldn't go anything less if you're doing your unwrap and you're coming in below 70% and your model is probably going to look pretty soft and blurry and potentially have pixelated textures on it if you liked this video and want to see more game art tips and tricks please click the subscribe button as usual any links will be in the description if you got any questions post them in the comments area thanks for watching everybody have an amazing day
Info
Channel: malcolm341
Views: 71,590
Rating: undefined out of 5
Keywords: Maya, autodesk, time, saving, tricks, secret, secrets, tips, 3d modeling, 3d modelling, easy, fast, tutorial, workflow, pipeline, best, mel, script, malcolm341, 2018, 2017, 2016, 2015, video, quick, free, beginner, learning, how, to, learn, polygon, polygons, uv, uvs, uvw, unfold, unwrap, unwrapping, mapping, map, untangle, planar, automatic, box, texturing, unfolding, pelt, pelting, texel, density, pixel, smooth, relax, texture
Id: 5e6zvJqVqlA
Channel Id: undefined
Length: 18min 31sec (1111 seconds)
Published: Sun Jun 10 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.