Hey,
I've noticed alot of people use rectangular texture maps for some props (Ex. 2048x1024). I was always told to avoid this at all costs. But logically, it would only use half the power of a full 2048x2048 right? It would waste much less texture space depending on the shape of your UV unwrap.
Is it bad to make it rectangular? Or it is encouraged if it can save texture memory?
Replies
Thanks!
So whenever you create a UV map of lets say 512 x 256 in the end you will get a more or less square UV with coordinates ranging from 0.0 - 1.0 regardless of the aspect ratio. I am not a math person but from what I know or guess is that many methods used in the texture mapping to project UV to view coordinates are based on triangle math and square fixed or related things. I guess in the end it comes down to some kind of math or formula that just works best or assumes that U and V have the same size or a linear proportion.
I found for example that some methods in 3dsMax UVunwrap editor go off with non square proportional UV maps, which is why many people suggest to first map out everything in a square and then simply crop the UV canvas to the final size.
Some engines on the other hand or frameworks merge textures together in bigger texture atlas to optimize drawing calls and reducing memory footprint in runtime. It's usually artists that can't think in those ways and need for every particular object a separate texture whereas in the end in many engines it would be more efficient to have it in 1 or a few textures combined.
Another thing we run into is that, for some shaders, all textures in the pipeline have to use the same dimensions for the math to work correctly. So if everything you're using is 512x256, that's fine, but if you have a 512x256 diffuse and a 512x512 normal map, it'll cause problems. This one I can't really explain, as what renderhjs said is totally correct; the engine just sees 0.0-1.0 texture space, and that 512x256 texture is converted to a percentage anyways. But, that's what they tell me.
But for example, iPhone will convert a 512x1024 to a 1024x1024 automatically.
Some very old graphical card also do that.