Wednesday 11 July 2012

WIP. Blender add-on - copy/paste UV islands. Some theory behind.

Here it is example of simple mesh unwrap. As you can see we have 3 pairs of identical UV islands. In most of the cases we can pack each pair in the same UV space thus increasing texture space used for other details.
In 3d-Coat process look like selecting one UV island, pressing Ctrl-C (copy), then selecting similar island and pressing Ctrl-V (paste). Both islands at this moment using the same texture space. If we have more then two islands we can pack them one by one.
The main problem is that we need to find "symmetrical" vertexes for both islands and copy UV coordinates from one vertex to "paired" one.
So how can we do it. After some meditation I found that we need to iteratively compare border loops for both islands vertex by vertex and find shortest path between them - pair with shortest path should be "symmetrical". This concept needs poof code - so I return to this theme as soon as I write simple prototype for future add-on.

No comments:

Post a Comment