almost documentation :-) |
Hmm.. just sat down and worked my way through the mountians of subdivision code, because we were running in
trouble with the seam information used by LSCM in tuhopuu. Though edge / seam information may be stored in a new
edge data block, which may prevent seam scrambeling, pinned UVs will not be preserved by this.
UVs and thus their pinning is stored in tface structure and have to be remapped to the new faces.
To know the right mapping, the fate of faces while subdividing needs to be known.
All this happens in the function subdivideflag( ... ) in "editmesh.c".
This code runs when a mesh is subdivided in edit-mode.
The following drafts show the different cases of new face generation.
|
case 4 edges less than 4 get cut; 1 |
case 4 edges less than 4 get cut; 2 |
case 4 edges generic |
case 3 edges; 1 NOTE the 'funny' cases 3,5,6. They occur on knive-subdivide (i did test it in blender!). I think they are not optimal. The triangle should be cut into one 3 egde and one 4 edge. (hm .. i think i'll give it a try some day) |
case 3 edges; 2 |