How to straighten UV's in Unreal 5.7?

How to straighten UVs in Unreal 5.7?

Specifically, the barrel in the Content Examples pack.

Found here:
Content Examples > All > Content > Maps > Geometry > Geometry_ModelingTools Level

The finished barrel “Displays custom UVs that have been rotated and straightened”, but there is no information on how to do that. I’ve spent days scouring the docs and the internet but there isn’t anything out there for this. I’m starting to think it isn’t possible in-engine, and they used external software like Blender for this.

I can get perfectly straight UVs on a fattened cylinder using the Project-to-cylinder UV tool, but with the barrel it treats the metal bands as cylinders too as described in the tooltips which makes the bands into separate top/side/bottom pieces.

Using polygroups I can select a group, add a seam to split the 360-degree barrel, and then unwrap to a flat UV island almost like I want, but it’s not straightened. But then if I try the same technique on the metal bands I can’t even get them to go flat, stuck in a circle even with a seam.

Looking at the UVs for the example barrel all the circular barrel parts have been straightened and I also see a single seam on the back going all the way from top to bottom. And the final barrel doesn’t seem to have any polygroups either, kinda strange.

How’d they do that?

To help narrow my question I made a simple barrel with just the wooden sides selected (metal bands and endcaps are off to the side for now). I’d like to straighten these UV islands so they line up correctly on the barrel just like the Content Examples one. I’ve never really done UV work before so I hope it’s something simple I’m missing. Any idea’s?

edit: NM u did, i just misread my question..no idea

Good question. That would be pretty impressive if you could do that in editor.

It’s technically possible to get a UV straight inside UE, but the engine does not have a native function to straighten/relax everything like you would find in Blender (at least per UE 5.7). If you combine the Unwrap and Allign functions in the editor, while using Seams in the edges, it could be done, but it won’t be a perfect result.

To avoid headaches, I would suggest a simple workflow in Blender:

  • Pick the barrel, and export it as an FBX, and send it to Blender
  • Using Edit Mode, mark a vertical seam accross the asset
  • Now, into UV Mode, select a top edge loop from one of the islands, and apply UV > Align > Align Auto, then repeat for the bottom edge loop
  • Select the island, and apply UV > Unwrap > Follow Active Quads, which should rearrange all vertices between your straight edge borders
  • Repeat the process for the other islands, then pack your UV
  • Export the asset back to engine