Cage opened this issue on Dec 20, 2006 · 1232 posts
svdl posted Sun, 07 January 2007 at 8:08 AM
Material zones might help. Lips and teeth tend to get confused - well, they have different materials, and it's possible to access the material list from Python. So it's also possible to find out if a vertex belongs to the teeth or to the lips.
Still, this is NOT going to be easy. Pushing in from the outside, or pushing out from the inside, either way the inner mouth and the teeth ARE going to be troublesome. You'd ALSO have to keep the polygon orientation in mind. Example: vertex X is located on the back (inner) side of Vicki 3's teeth, say one of her front teeth. With the "pushing in" algorithm, chances are that the first V1 polygon with a "teeth" material it will encounter will be a polygon located on the "front" side. The algorithm should realise that this is not the polygon it should end up at, the vertex should travel further inwards until it reaches the back side of V1's tooth. So determining the "target" polygon should take the polygon's orientation into account, it should face the same way as the normal of the vertex you're pushing.
Material zones and groups can help, but they'll take some setting up. Acceptable when you're planning to use the script to transfer loads of morphs, a large piece of overhead when transferring only one morph.
The Tailor uses the "closest vertex" principle, and before transferring morphs it maps all vertices of the conformer to matching vertices of the conforming target. Low poly conformers tend to work better than high poly, and the more extreme morphs transfer badly.
I've been thinking about writing a Tailor-like Python script that doesn't use "closest vertex", but instead uses a weighted average of close vertices: each "morph donor" vertex within a certain distance of the vertex to be calculated contributes to the displacement, inversely proportional to its distance.
Maybe, one day. Time is in short supply these days...
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter