I'm trying to optimize my UVs for an asset I'm creating for mobile game, right now the model is deleted in half so I'll mirror everything at the end of the UVing stage to save space, parts that are not deleted, are already stacked on the UVs.
my problem is, that I can't fit some of the UV shells into 0-1 space without scaling down everything pretty significantly - losing texel res
I just wonder what would be the best approach to this kind of issue? because I'm facing this quite often and have no idea what to do.
split the mesh into 2x 256 maps instead of 1x 512 or just scale down and fit everything to 1x 512? :S
Replies
Let me start by saying that having a uniform Texel Density isn't such a big deal - and even less so for mobile assets (same goes for distortion).
That shell with the spire can be cut in half, mirrored and have it's halfs stacked on top of each other. You get the same quarter of the spire repeating radially, but that should be fine.
You can do the same with the shell for the arcs: You don't need a full arc +2 half arcs - you only need one half arc of unique UV space, so stack them all together (also applies to the small bit below).
Also, at what distance and angle is this asset viewed by the camera? I'm sure you can find some shells that doesn't need the same density as others.
Last but not least:
It is always a bad idea to load in several texture maps into memory when you can get by with less. For example, 4x 256 maps are more expensive to load into the graphics memory than a single 512 map (the concept of "mega textures" takes this optimization process to it's limits).
That being said, I agree with @Deadly Nightshade and think you can probably fit this all into a single 1:1 square effectively by mirroring more of your mesh.
The game will be in isometric view, I was thinking maybe to delete everything that the camera won't see, but I'm not sure if I should do it now, because I'm not 100% sure about the specific angle myself, also, it will effect the shadow cast by the object from light sources no? :S
What do you mean by second texture/lightmap texture to add large scale variations?
I know the engine needs a 2nd UV channel with no overlaps in order to build proper lightmap, so I can use the same channel to also assign textures to in the shader?
Also when creating tileable textures for mobile, what resolution is usually being used?
Thanks again, appreciate it.
You can use up to 3 UV channels in Unity 5 (two in Unity < 5), so you can use one for a second texture with big colours and modulate your tiling texture with that to try and remove obvious tiling and add some more visual interest. Generally the last UV set is reserved for light mapping.