Home Technical Talk

Unwrapping a bit more complex cylindrical shape (issue with vertical faces)

node

So I'm attempting to unwrap this "wheel thing". After the unwrap, the faces located vertically appear as big cirles on uv-space. When trying to turn them into belts, texel density becomes distorted like this:

I'm aware that it's due to the differences in edge lenghts, but even is I tried to scale one edge down, it doesn't seem to fix the distortion. 
Is there any trick, how to approach unwrapping such shape without turning every single face into it's own invidual uv-island ?

Replies

  • Ghogiel
    Options
    Offline / Send Message
    Ghogiel greentooth
    What is wrong with the vertical flat circular part having.... circular shaped UV?

    Why does that part of the UV have to be mangled into a strip shape and not just be a circular shape?
  • Creepezel
    Options
    Offline / Send Message
    Creepezel node
    Ghogiel said:
    What is wrong with the vertical flat circular part having.... circular shaped UV?

    Why does that part of the UV have to be mangled into a strip shape and not just be a circular shape?
    Simply because it takes quite a lot of uv-space, especially when there's few of them, like this

    So turning them into straight belts incerases the resolution for your mesh. It might not be important for some random portfolio piece, but in game industry it is.
  • icegodofhungary
    Options
    Offline / Send Message
    icegodofhungary interpolator
    There's always going to be some distortion. There's always going to be a slight variance in pixel density. You could turn all those circles into strips if you wanted. Then scale them to match densities. It's all about optimizing, not finding the perfect solution.


    The front face of your cylinder will always be distorted because you can't perfectly flatten it out into a strip without distortion. It's just a geometrical/mathematical consequence of trying to flatten a curved surface. Think about it. The interior radius (red) is smaller than the exterior radius (green). When you flatten it into a strip so that both radii are the same length, it creates distortion. You can planar map it as a circle and that will eliminate distortion. Either the shell must be curved or the texture will be distorted.


    Here it is without distortion on the front face. Just highlight the faces and do a planar mapping. But your UV shell will be a circle and take up more space. It's a trade-off.



    Another issue is that you have beveled every edge, why? The the "spokes" of your cylinder don't need to be beveled. You would just bevel the rims. And only the ones that you're going to see.




    I'm assuming you're beveling to eventually support a highpoly bake. If so, you should read these and really try to understand them. You're probably about to run into some problems and these threads will be relevant.







  • FrankPolygon
    Options
    Offline / Send Message
    FrankPolygon grand marshal polycounter
    Splitting and straightening the UV islands to increase the overall texture density makes sense in theory but in practice it's a bit more complicated than that since there's multiple factors to consider.

    In the overall scheme of things a single road wheel is a very small part of a tank and it's unlikely that every part of every road wheel would have it's own unique UV islands, much less it's own unique texture set. The reality is that having more UV islands requires more padding which in turn either reduces the overall texture density by taking up extra space or it reduces the overall efficiency by requiring the use of additional texture sheets.

    It's common practice to either pack all of the running gear together or to pack it into the extra space around the hull and turret sheets. So, at a minimum, it's much more efficient to reuse the same geometry and UV islands for as much of the running gear as possible. Reducing the number of unique road wheels and reducing the number of UV splits in each road wheel will also help increase the texture density since space that would otherwise be wasted on padding can be used on the single reusable UV layout. If the UVs need to support camouflage patterning then the face of each road wheel can have it's own unique UV island while the rest of the road wheel can reuse the shared UV layout.

    Here's a comparison of a few different UV unwrapping and packing strategies. The overall texture density (compared with the same texture size) is largely the same but it's worth noting the differences in usable UV space and the amount of UV distortion. Starting from the left the efficiency of the used area is: 39.84%, 38.24%, 37.87%, 36.8%.

    Based on these results, having fewer UV splits and using fewer UV islands allowed the individual UV islands to be slightly larger and the packing was also more efficient since it left additional space for other items. Since the overall texture density is roughly the same the first UV layout in the example below would have more room for other parts or it would fit into less space on an existing UV layout.

    The UV splits for the second and forth examples are identical and the only difference is the packing algorithm used to generate the second example is able to nest UV islands inside of each other. This is something the defualt UV packer in Blender cannot do so it's definitely worth investing a good UV packing add-on.



    When it comes to baking there's a few things to consider: hard edges will reduce the gradation of the normal bakes but they will also increase the number of unique UV islands which can reduce the overall texture density through additional padding space. Straightening curved UV strips will generally increase the texture density by making it easier to pack things closer together but this extreme deformation of the UV s can introduce distortion and other artifacts. These strategies are not mutually exclusive so it doesn't have to be an all or nothing approach. There's an acceptable amount of normal gradation and there's an acceptable amount of texture distortion. It's important to run test bakes and figure out where the best balance is between UV efficiency and baking quality.

    Here's an example of two different approaches to balancing these elements:

    The low poly model in the top row has hard 90° shape transitions, matched with hard edges and UV splits and the UV layout has both straightened strips and nested circles. There's very little gradation or distortion in the normal map but the UV layout takes up most of the texture space.

    The low poly model in the bottom row has hard 90° shape transitions (with hard edges and UV splits) around the outside faces and uses softer tapered transitions on the inside corners. There's some gradation and very little distortion in the normal map but the UV layout only takes up about two thirds of the texture space. The placement of the edge splits compliments the UV seams and the result could be further improved by using weighted normals but the point was to demonstrate that even in a worse case scenario the gradation doesn't render the result completely unusable.

    What makes sense comes down to the project goals and to what comes out of the baking tests. It's really important to take the time to run some unwrapping, packing and baking samples to get a feel for what's going to make the most sense for balancing the quality and efficiency.



    Here's a few examples how other professional artists have unwrapped the running gear on their tank models:

    To recap:
    Excessive application of a split and straighten UV strategy can actually reduce the overall texture density through excess padding waste.
    Reusing a single piece of geometry with a shared UV layout is an efficient way to add repetitive details.
    Research → Test → Evaluate.
  • Creepezel
    Options
    Offline / Send Message
    Creepezel node
    Thanks for your answers and hints. I've arleady found that "UVPacker" addon for Blender and looks like it will help me with decreasing wasted uv-space, and what about wheels, No I wasn't going to allow each one have it's own unique texture. I'm going for creating only 1 texture for each roadwheel and return roller, then just change their rotations a bit so it's not that much obvious that textures are the same. I'm aware that in bigger game assets, mirroring as much as it's possible is necessary.
Sign In or Register to comment.