Procedural UV Unwrap test

This is a test of procedural UV unwrapping using geometry nodes. I targeted a simple cylinder since it provides a UV map (named uv_map) and I could compare my unwrapping to the default. Here is the node tree:

And the side-by-side results, left is the provided uv_map and on the right is my cyl_uv:

(I’ve not given the material info since it is a simple color grid fed by either one of the UV map vector inputs. The 3.4-alpha blend file is attached.)

My approach requires 3 UV Unwrap nodes that are then packed and stored on a named attribute. It’s not that I think this is terribly complex, it’s just that I always wonder if there are simpler methods.

Feedback is always welcome.
cylinder-uvunwrap.blend (1008.8 KB)

1 Like

There are (at least) two flaws with my first method:

  1. The side has 2 seams (the dot product against a normal on the cylinder will yield a seam on either side.)
  2. If the cylinders vertices are odd, it behaves badly. (Bad seam.)

I tried another method for the side seam using the Shortest Edge Paths node:

This is entertaining but not perfect. It behaves well against odd cylinder vertices. The method presumes the minimum index at the bottom is aligned with the minimum at the top. It works even if you use a min/max pair but I haven’t tested with indices on either side of the cylinder.