Friday 22 June 2012

Maya Scripts



It was suggested that we use scripts in Maya to automate most of our library bookshelf building, and more importantly, the chaotic piles of books at the end. I've found a few that are useful, and I figured I'd put them up in case anyone else needs something similar:

Random Texture Applier (Python)
This script works by selecting all the objects you want textured and all the shaders/textures you want to use (I'm assuming for anything requiring UV maps, the objects must have the same UVs) and then it randomly selects a texture out of those for each objects. Good for texturing multiple objects that are only slightly different (like our piles and piles of books here).

For Distributing/Scattering Objects:
(Note: Neither of these does anything for geometry overlap, so you'll have to fix/hide that yourself)

Polyscatter (Mel) - scatters objects based on the vertices of a 'base area' that you select. The size and rotation can also be randomized.

massReplicate (Mel) - my preferred of the two, it can scatter objects (translation, rotation and scale) like the one above, but doesn't require a base area. In addition, it can be used to distribute objects based on XYZ translations.

For anyone interested in other Mel scripts created by the same person that made massReplicate, go here.

No comments:

Post a Comment