Friday, February 6, 2015

IK/FK setup tutorials

Overview of the process - https://vimeo.com/86868121

Creating duplicate arm chains for the IK and FK controls - https://vimeo.com/86868124

Setting up orient constrains on the real arm - https://vimeo.com/86868126

Using set driven key to blend contsraint weights - https://vimeo.com/86868127

Constraining the new joints and controls to the real skeleton - https://vimeo.com/86868128

Friday, January 30, 2015

circle control script

Circle control script

This script creates a series of circle controls and circle control groups for every joint selected.

Notes:
  1. All joints MUST be named with a "JT_" prefix, as we have been doing in class.
  2. Joints must be selected starting in a parent-child descending order; in other words, select the top-most parent joint first, then the next child joint, then the next child joint, etc
  3. The selection set for the spinal column would in the following order:
    1. JT_spine_lumbar
    2. JT_spine_thoracic
    3. JT_neck
    4. JT_head
  4. The script will create a control for each joint, and connect the rotation channels of the joint to the control. The control is then grouped by itself. If it is controlling a joint that is the child of another joint in the current selection, it will parent the control's group to the controller of the parent. 
How to use:

Copy the script below the dashed line into the Python tab of your script editor. Select the joints you want to add controls to, making sure to select the joints in a parent-child descending order. In the script editor, choose command > execute.


-------------------------------------------------------------------------------------------------------------------

import maya.cmds as cmds

sl = cmds.ls(sl=1)
count = 0
lastS = None

for s in sl:
    ctrlName = s.replace("JT_", "CTL_")
    ctrl = cmds.circle( nr=(1, 0, 0), r=1, n=ctrlName)[0]
    offset = cmds.group(ctrl, n="GRP_" + ctrl )
    cmds.parentConstraint(s, offset, mo=0)
    cmds.delete(cmds.parentConstraint(s, offset))
    cmds.parentConstraint(ctrl, s, mo=0)
    if count > 0 :
        cmds.parent( offset, lastS )
    count = count + 1
    global lastS
    lastS = ctrl

finger attributes

Go to modify>add attribute

Add all above attributes.

All attributes are:

min: -10
max: 10
default: 0


finger setup videos

Apologies in advance - last video lacks sound, but if you paid attention in class, you should be able to follow along. Will update soon with sound.

https://vimeo.com/93653030

https://vimeo.com/93656646

https://vimeo.com/93653031


finger joint names

JT_fingerIndex_R_1
 JT_fingerIndex_R_2
  JT_fingerIndex_R_3
   JT_fingerIndex_R_end

JT_fingerMiddle_R_1
 JT_fingerMiddle_R_2
  JT_fingerMiddle_R_3
   JT_fingerMiddle_R_end

JT_fingerRing_R_1
 JT_fingerRing_R_2
  JT_fingerRing_R_3
   JT_fingerRing_R_end

JT_fingerPinky_R_1
 JT_fingerPinky_R_2
  JT_fingerPinky_R_3
   JT_fingerPinky_R_end

JT_fingerThumb_R_1
 JT_fingerThumb_R_2
  JT_fingerThumb_R_3
   JT_fingerThumb_R_end