Thursday, November 29, 2012

Some skinning code

So while I was doing corrective skinning this past week on one of the characters on Them Greeks, I noticed there was no quick way to transfer all the weights from one or multiple joints to another quickly so you don't lose previous work by trying to reskin an area.

def weight_transfer(skin_cluster, verts, old_deformers, new_deformer):
    '''
    ------------------------------------------------------------------------
    Purpose:
    Transfers the weights from the old deformers to the new deformer while
    keeping any other weights the same
    ------------------------------------------------------------------------
    verts = list;
    - list of verts to search for weight values and transfer them

    old_deformers = list;
    - list of the deformers you want to query the values from and get
rid of

    new_deformer = string;
    - the deformer that you want to have take the values of the old
     deformers into itself
    '''
    active_deformers_list = cmds.skinCluster(skin_cluster, q=1, deformerTools=1)
    old_deformers = [each_deformer for each_deformer in old_deformers if each_deformer in active_deformers_list]
    cmds.setAttr("%s.normalizeWeights" % skin_cluster, 0)
    for each_vert in verts:
        for each_deformer in old_deformers:
            old_value = cmds.skinPercent(skin_cluster, each_vert, q=1,
transform=each_deformer, value=1)
            cmds.skinPercent(skin_cluster, each_vert,
transformValue=[each_deformer,0])
        cmds.skinPercent(skin_cluster, each_vert, transformValue = [new_deformer, old_value], relative=1 )
    cmds.setAttr("%s.normalizeWeights" % skin_cluster, 1)

Tuesday, January 10, 2012

Kiergo - Fur Development

So a friend had asked me a while back to help him on his animated web series that he plans to start up sometime this year, and a recently he asked me to also do the Fur and Hair for the show.
Below are some render tests for Kiergo's Mane and the concept he provided. The next part I will tackle will be the mane in the under the chin, followed by the fur on the face.


Clean Shots
Kirego First Fur Pass - Front Shot Clean
Kirego First Fur Pass - 3/4 Shot
Kirego First Fur Pass - Back Shot
Messy Shots
Kirego First Fur Pass - Front Shot Messy



Concept, Model and Textures by Jacob Shrodes

Monday, January 9, 2012

When Maya says no


It just means that it has decided in all it's wisdom to be lazy, and it likes to do this all the time.
True Story Bro


Case Example, the next available flag in the connectAttr and disconnectAttr commands, it will work some of the time but the rest it just shoves a middle finger in your face. It will give you a little error saying that the flag is incompatible with an attribute that has multiple inputs ex. "plusMinusAverage.input3D[0]". A quick solution for this problem is to create your own system that checks for the next available open slot. Something like this:


Photobucket


I ran into this problem trying to connect shaders to different shading engines and the plusMinusAverage node through Python.