We've recently decided to go from Tiling textures to Unwrapped Textures w/ Detail Maps to get more model-specific variation at a lower texture cost. The thing I can't get my head around though is how to ensure consistent Texel Density.
Currently, I've set an arbitrary Texel density based on an image size and a real-world size (1024px = 1m. It's GIGANTIC, I know, but the idea is that if it's consistent I can just batch downres them once we pick a final size). In Max, I set the mapping to the same real world size as the image (so, a 1024px image gets set as being 1m in the UVMap controls), and then I'm 100% positive that all my images have the same texel density.
With that setup, my current textures are basically my detail textures, and anything I'd add to them would be the actual texture. So currently, my problem is that I'd need to overlay a dirt or grunge texture, and then through Tiling in the material settings, scale the map so that it makes sense and varies the image correctly. Since my UV's correspond to a texel density already, there's no issue. But this is going to be a serious hassle moving forward, so, I'm probably going to end up unwrapping all the textures, and using the Detail textures as intended.
My question, then, is this: If your Unwrapped Texture is always in 0-1 UV texture space, and the texture itself is going to be lower res so that the detail texture handles the Texel Density, how do you know what to set your tiling to in order to ensure the correct density? For example, if your object is 0-1 UV and is 2 meters, the tiling must be X, but if your object is 0-1 UV and is 10 meters, the tiling would have to be Y. How do you know what to set your tiling to? Do you just eyeball it?
I'm sure this is way easier than I'm making it out to be; thanks in advance for your collective patience.
Replies
(MD * TD) / YTR = How many times you tile
MD = 3D Mesh Dimensions (lets say its 2 meters)
TD = Target Density (what your going for per meter, lets say 512)
YTR = Your Textures Resolution (Lets say you have a 256x256 texture)
Then you would just do this...
2 * 512 / 256 = 4
You would need to tile a 256 4 times on a 2 meter surface to get your target density if 512 texels per meter.
Does that help?
Jocose: I suppose that makes sense; I'd basically be measuring each mesh and dividing the result by my fixed amount. So if it's relative to meters, the number of tiles becomes "How many meters is it?". Is that the way it's done? Seems like a heck of a lot of measuring, isn't it? Although, I guess you could argue that I'm doing all of that measuring already; by mapping to a specific scale, I'm avoiding the math by having everything be fixed values, and the variable is all in the mesh size; the way you mentioned, the mesh size is fixed and the variable is the number of tiles.
I guess that works. Thanks!
Hey dude, your building a building. You eyeball the entire thing its gonna fall down. That does mean a house can't be artistic :poly124:
A LITTLE math never hurt anyone, this is just so basic I just do it sometimes and move on. Anymore more complicated than this though, you will probably be wasting your time, unless its shader code of course.
Guys! It was joke! People always said you would never need math. I wasn't dissing it! JOKE!!!!
I use math on a daily basis in this field. I love it and its the only way to stay accurate. Sarcasm doesn't translate well over the internetz.
http://renderhjs.net/textools/
In particular the texel density tools which let you:
- normalize
- pick / measure ratio
- apply ratio to objects
All without destroying the initial UV layout as it scales it only up or down in a proportional manner. Here is a older video that explains how it is used:[ame]http://www.youtube.com/watch?v=pi40W3SC5gw[/ame]
Just a few hours ago a new version was released so if your interested better get that latest one from here:
http://boards.polycount.net/showpost.php?p=1127133&postcount=125
as it is not yet updated on the site and scriptspot.
good model + good texture + good composition in the scene + good lighting > consistent pixel density
People tend to focus on polys and spend a lot of time hacking out 20-30 of them but then skip right over texture optimization, tossing out giant sheets like they where mardi gras beads.
It's when you relay on the rules to tell you what looks right and stop evaluating the aesthetics of the piece, that you get into trouble.
perhaps this is interesting for you. we do 3rd person role playing games, and in the current project we used renderhjs scriptidea for making an own script that automatically bakes different texel resolutions for different platforms or lod stages out of 3dsmax through xnormal. also its batch process enabled and can bake down the complete asset database with lower sizes if we see, that severe memory problems occour.
we also use a 5 times higher texel size for items (usable and takeable objects) than for environment props.
some environment props get a second uv channel for potential detail maps like grain or such. for that the detailmaps dont get that much seams and can respect line flows of wood grain i.e.
conclusion of this post is: if you want a good starting point, use renderhjs`s tools! they are greatness in bytes!!!