Tuesday, June 4, 2013

A Fast Skin Painting Technique using Cluster Sets

Happy Tuesday,

I wrote a couple tools that may be handy in getting a quick rough skin.
Basically it avoids having to start in paint editor to block weights.  All tools are work in progress use at your own risk.

To use this technique:
select vertices and make a cluster.

After binding
Select cluster
use naSkin …  cl2Vertex //it selects vertices of the cluster
Shift select joint 
use naSkin .. flood //now the joint has full weight only on selected vertices.

to install these tools
1. unzip folder and copy scripts in folder into your scripts directory. (you could also just source all scripts into scene using wherever you saved it)

2. Then make some shelves.   Copy and paste each section (between //--- ---//)into script editor.  Then in script editor drag selection to make a new MEL shelf .  call it what you want.  repeat for other sections.
//---cluster 2 vertex
//given a cluster select its vertices
string $selAr[] = `ls -sl`;
string $sel[] = {};
//to find vertices we need object of type cluster
if(size($selAr)==1){$sel = `listConnections -type cluster $selAr[0]`;}else{error("Requires cluster !!! Select cluster handle\n");}
if(size($sel) == 1)
    string $clusterAr[] = `listConnections -type objectSet $sel[0]`;
    if(size($clusterAr) == 1){ select -r $clusterAr[0]; }

//------- flood tool
eval( "source \"naGeneral.mel\";" );
eval( "source \"na_assertGeneral.mel\";" );
eval( "source \"na_skinGeneral.mel\";" );

//select vertices first, then a single influence

//-----add influence to poly
eval( "source \"naGeneral.mel\";" );
eval( "source \"na_assertGeneral.mel\";" );
eval( "source \"na_skinGeneral.mel\";" );

//select influence(s) first, then geo


Inspired by David Brooks (d-brooks dot com) , i was inspired by his demo on fast lip skin painting.