netradiant-custom icon indicating copy to clipboard operation
netradiant-custom copied to clipboard

UV Tool: smarter patch unwrapping algorithm

Open Garux opened this issue 6 years ago • 0 comments

Current algorithm is technically wrong, but covers good amount of cases more or less right.
In short it is: find avg axes of patch out of its points, find longest column and row, find uv projection space out of triangle, including these col and row, placed on manipulator's plane along avg axes.
Apparently this doesn't always turn out well, examples:
unwanted skew: image skewed and sizing is odd: image is fine, when texture is placed in 'natural' style, previous was projected image odd skew and sizing ratio in the very classic case: image 'natural' may be odd too: image

Wished qualities of unwrapping are:

  • having intuitively alright angle between texture axes
  • having right texture axes sizes (this is also important for expected results after rotation)
  • preserving manipulator representation after affine transformations of uv space (this is good to keep transform pivot consistent relative to manipulator in uv space and to have expected result during and after transformation) (representation change after moving some UVs separately is acceptable imo)
  • consistent representation w/o saving some state in the tool; this is good to have same look after reselecting a patch

Current implementation fulfills 3 and 4, 1 and 2 aren't always like wished.

Garux avatar Jul 25 '19 17:07 Garux