Over the past couple of months, I’ve been working on a plug-in for Maya that allows users to easily create mathematically convex hulls around their meshes in Maya (primarily for collision creation). I’ve released the source as well as few example scripts up on github here:
It should be as pipeline agnostic as possible, and is covered under the MIT license - which means your legal team should no problem with you using it (or even modifying it). Let me know what you think!
BTW, after your last post, I updated the utils script to add a “createHull” function. Not having that function was an oversight on my behalf (I guess I was just too excited to get it out to folks!)
You can snag the updated version here:
One last thing, if you don’t delete your history, that mesh will update as you move your object around. If you do delete your history, you’ll lose the dynamic updates, but the resultant hull will still be cached and saved in the mesh nodes.
Let me know if you have other questions or feedback (or if you want to contribute)!
Here’s a quick shelf button Python script that will make a single convex hull from the selected meshes (or faces). Requires ddConvexHull to be installed on your system.
import maya.cmds as cmds
selection = cmds.ls(sl=True, l=True)
# Create the nodes
convexHullNode = cmds.createNode('DDConvexHull')
outputMeshNode = cmds.createNode('mesh', n='outputHullShape')
# Connect the input object(s) to the hull node
# Connect the output of the hull to the input of the outputMeshNode
cmds.connectAttr('%s.output' % convexHullNode, '%s.inMesh' % outputMeshNode)