Script for Maya, based upon Worn Edges by Neil Blevins
To use it:
Place the .py file in your scripts folder, restart Maya and execute the following code from a Python tab in your Script Editor:
cgx_wornEdgesVar = cgx_wornEdges.CGX_WornEdgesUI()
Paints hard edges, in a user defined threshold, using Vertex Paint. Look for the Help in the script to get a lot more info about it.
Script based upon Neil Blevins’ (http://www.neilblevins.com): Worn Edges Using A Distorted Vertex Map and his DVD for The Gnomon Workshop.
I recommend using a Warp Node as the one from Binary Alchemy to get better results. I also used to work with the Raylength node from Binary Alchemy to do the same thing as the script but since it is raytrace based many times the rendering time needed to get noise-free renders were too high.
This script was used by my fellow artist Adriana Nieto as a base layer to paint the Worn Edges for the soldiers in this TVC (where I worked as Lead CG artist):
Q. The script is not creating the shading network as in your tutorial.
-Make sure you have Mentalray loaded in Settings/Preferences, Plugins Manager. The script relies on Mentalray to get the vertex info out of the geometry.
Q. The script doesn’t work in my Maya version.
-I have tested and used the script in Maya versions from 2008 and up to 2014. If you’re having problems, I can help but only if you send me the error or warning you’re getting when you try to use it.
Hope you find it useful. Your feedback will be greatly appreciated.
(18-12-2010): I got more feedback than I expected and worked on the script (I didn’t expect any feedback to be honest, haha). There are a couple to do’s pending.
(19-12-2010): Added a new option that creates a Maya Set containing the vertices used by the script. This will allow you to do things like growing or shrinking the resulting vertex map using Maya’s vertex painting and selection tools. Also, cleaned up the code a little bit.
(20-12-2010): Uploaded the wrong version yesterday, sorry for that.
(19-01-2011): Fixed a bug that connected the vtxMap to an empty colorSet. Thanks Vic Fina!!
(21-10-2012): Optimized a few lines to make the script faster.
(05-11-2012): More code optimizations to make the script faster. New UI creation code added. Changed the way the UI is created so please use the new code (see above). Videotutorial added too at http://vimeo.com/xiancg/cgxwornedges