Well, I'm not an algorithms person, actually. So my ideas on the
matter can't be all that reliable, I think. I really just wing it when
it comes to Maya's Python API, I haven't actually learned Python yet,
or any other programming language, for that matter. That being said,
I'm not really aiming for something that makes a perfect skeleton on
it's own. However I'm fed up with auto-rigging systems that start out
with "placers" that are way off the scale and proportion of the model
and sometimes even not in the right pose. I would even be more
satisfied with having a curve-extraction script which I can create
joints off of as long as I had a decent head start with joint
placement. For now the only way I could think of doing it is take the
largest spheres among a group of spheres that are close within a
tolerance, and use the API to get the center of that group by creating
a MFnMesh and adding polygon with all those positions, getting that
polygon's center, then creating a joint, locator, or curve point from
that center. The problem with that is the tolerance needs to be
adjusted when the volume in the mesh shrinks (from the torso, to the
arms, to the fingers, for instance). I have no idea how to do that
part....
On Feb 11, 10:07 am, Justin Israel <
justinisr...@gmail.com> wrote:
> What would be the exact criteria for making it produce output that is best suited for your joint extraction?
> The sorting im doing does greatly improve performance by getting the data radius sorted once very quickly. As for your needs im sure its just a matter of how to adjust the comparisons. Right now the algorithm is geared towards filling the space with as few spheres as possible. Can you maybe explain your pseudo process for what you want to achieve?
> Yea I get kind of distracted easily by these kinds of things :-)
> Its good practice for me anyways to try and optimize maya code. Im not even sure why the original developer used pymel. Its way to slow to use in heavy loops. Really the goal is to do as little as possible on the python side and let the C api handle what it can. Small things like setting properties once dont really gain much though obviously.
>