Finding vertex groups in maya.

So a while ago a friend of mine, Perry Leijten, asked me to help out with seemingly a simple problem for his awesome skinning tools.

*Which you can find here btw:

The problem being:

“I want to sort my selection of vertices in groups.”

i.e. all neighboring vertices in separate groups.

Simple enough i thought and had a crack at it.

Lots of hair later, 4am, birds chirping and I had a working version… that being immensely slow. After some tinkering and brainstorming we had a version that could do vertex sorting on a 40k vertex mesh in about 1 second.

This got implemented in his skinning tools. Now about 6 months later I revisited the problem and got a speed improvement of about 70%. Sooo I thought it would be nice to make a post about it.

Hopefully the comments in the code speak for themselves.

If not and you have any questions feel free to ask in the comments.

To test it do the following:

1. Create a poly sphere in maya .

2. set it to 200×200 subdivisions

3. run the script


Leave a Reply

Your email address will not be published. Required fields are marked *