[tuhopuu-devel] partial success on subdiving seams

Bjornmose tuhopuu-devel@blender.org
Sun, 30 May 2004 00:05:53 +0200


hi ton, brecht, jean luc and all
( i decided to try to CC this to ton (at) blender (dot) org )

As promised i dived into subdivision code to see what makes the trouble
with seam and pinning data.
brief overview:

0.ton: copying flags still works perfect :-) .. we talked about on IRC
.. but we have a more complicated situation.
Now that we try to introduce seams and pinning (pinnnig is only LSCM but
seams users found to be a powerfull alternative to vertex groups).
(Don't worry we are playing tuhopuu right now.)

1. We tag seams and pinned in tface such that tf_seam1 flag marks edge 1
to be a seam and so on
sheme
p4---s3---p3
|----------|
s4--------s2
|----------|
p1---s1---p2
2. Subdividing creates new faces with a different vertex numbering.
So copying the tface.unwrap flags to then new faces simply does not make
sense at all.
generic case ( rectangle split to 4 rectangles)   looks like this
o4-----------------------o3
 n1 -------n4 n2 -------n1
 n2--------n3 n3--------n4
 n4 -------n3 n3 -------n2
 n1--------n2 n4--------n1
o1-----------------------o2

3. there is a function "set_wuv" only called by subdividing code to care
for changes in UV space.
So i think this is the place to code the old to new tface-unwrap-flags
mapping.
I did it for the 'generic' case in 'editmesh.c'.
Code is here :
http://home.t-online.de/home/wund.five/tuhopuu_devel/source/

4. Unfortunately threre are some more ( 16 i guess ) face splitting
situations.
I did not analyze yet.
Besides i would not mind doing the coders-slave-work to care for the
other cases
i have no idea how to test it.

This goes to ton again
a. is there any documentation (besides source code)  about the
subdivision cases ? ( hoping for some drawings illustrating what
happens )
b. is there a "blend" file to verify subdivision works fine for all even
weird cases ?

BM
direct reply to bjornmose(at)gmx(dot)net