wrote a script to snap UV vertices to pixel corners for a current game project:
another script is in a wip state but I think I am cracking something big here:
It translates UV shells from a source shell to others similar to a stack tool. What is special however about this is that it reads the Geometry topology and not
the topology of the UV shells in order to reconstruct things.
Headus UV layout has something like this but it requires to mark 1 vertex in order for the math behind it to work.
I however found a way to determine for every vertex a unique ID without depending on rotation or scale. So with that I know a unique order of the vertices of all shells and then just read from the source shell to the to be applied shells.
What this means:
Have for example a 3d mesh with lots of stones or bricks all based on the same topology but with different orientations and scale offsets. With this you would just have to unwrap 1 stone nicely and apply this same uvShell unwrap to all the others. Also with this you can stack UV shells perfectly on top of each other, it even works with flipped or symmetrical elements.
There are still some pieces to solve as you can see in the animated GIF but I can already map 80% of the verts to their location, the rest is more comparison stuff to do.