Cage opened this issue on Feb 24, 2010 · 592 posts
Spanki posted Fri, 26 March 2010 at 8:54 PM
Just to clarify a bit... I AM still dot-checking the ray with the intersecting polygon normal, so it's not like the code is suddenly choosing opposite-facing polygons.
Speaking of which, 2 things...
on the "if hitpoint:" test... just to verify that, you might want to spell it out more as "if hitpoint.Valid:" - that does an explicit test of the variable that should only be true if the data is valid (the other way should be doing that internally, but... who knows).
some of the current "poor matches" (or poor weighting) may be where the ray-cast fails, so it's mixing in some of the close-vert method weights. Without looking up the actual vertex indices, one way of testing that might be to:
if the ray-cast test fails, instead of falling through to the close-vert weighting code, comment that out for now and just set up a known condition (in other words, assign all of those to the first vertex of the mesh, with a 1.0 weight) - then you can see which ones are falling through the ray-cast test... are the ones in the eyelids falling through? how about the ears? etc.
Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.