Geometry on Wireframe – ballAndStick

Geometry on Wireframe – ballAndStick

There is a script that’s been floating around Maya forums and message boards for a long time that populates a poly mesh with geometry – putting a sphere on each vertex and a cylinder on each edge. A flexible implementation of this could add some interesting possibilities for rendering meshes. Also, one could model scaffolding or wireframe-style objects by modeling the polygon object that would be populated.

I looked around for that script to work with my geodesic spheres the other day,  but I couldn’t find one. So I wrote one. My script creates a bunch of spheres and cylinders. It groups them into two new groups (one for spheres, one for cylinders). You can pass in the values you want for the radius and for how many divisions you want on each of the objects. To make it more flexible, I also hook up control attributes on the new group nodes, so you can easily change these values on the fly even after you’ve created your spheres and cylinders.


Maya python script:

You can use it by downloading this file into your /maya/scripts directory, then running in the Maya python Script Editor:

import ballStick; ballStick.ballStick();

(It’s a good idea to select the polygon object you want to populate before you run this…)
There is also a second script there that creates a series of ballAndStick groups to work with animated deforming meshes




Leave a reply