Page MenuHome

UV: Support UV Seams when creating UV Islands.
ClosedPublic

Authored by Chris Blackbourn (chrisbblend) on Sep 4 2022, 7:55 AM.

Details

Summary

An edge can be marked BM_ELEM_SEAM, which means the UV co-ordinates on either side of the edge are actually independent, even if they happen to currently be identical.
This optionally add support for UV Seams when computing islands.
Affects UV sculpt tools, individual origins, UV stitch and changing UV selection modes etc.
Required for upcoming packing refactor which requires seam support for island calculation.

Diff Detail

Repository
rB Blender

Event Timeline

Chris Blackbourn (chrisbblend) requested review of this revision.Sep 4 2022, 7:55 AM
Chris Blackbourn (chrisbblend) created this revision.
Chris Blackbourn (chrisbblend) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) requested changes to this revision.Sep 6 2022, 9:05 AM

Discussed this patch in chat and I think seam_connected should use a flood-fill (or similar) method of walking over loops connected to the vert, delimited by seam edges, this avoids an infinite loop and ensures the matching UV will be found or not - no matter what the topology is.

This revision now requires changes to proceed.Sep 6 2022, 9:05 AM

Update to use recursion

use gset instead of flags

Campbell Barton (campbellbarton) added inline comments.
source/blender/editors/mesh/editmesh_utils.c
880–883

Avoids 2x hashing.

This revision is now accepted and ready to land.Sep 9 2022, 6:52 AM
source/blender/editors/mesh/editmesh_utils.c
1048

I think it'd be simpler to create and free this instead of initializing inside seam_connected.

While creating & freeing the GSet per-vertex is quite expensive, a redundant create & free for the entire function isn't much overhead, and by the looks of it it's likely to be created in most cases anyway.

Chris Blackbourn (chrisbblend) marked 2 inline comments as done.

Simplify gset creation