Tuesday, 16 December 2014

Done!




Here is the fully rigged character for this semester! I enjoyed the challenge creating the rig with my custom character as he came to life! 

Wrap Deformer! 








I find that mayas wrap deformer tool is very useful. You can attach any object to a binded mesh which will then follow the same movement as the rig. As you can see here the bracers are deforming without error! 

Face


Eyes controller

Face Controls 
Here you can see the facial rig. The controls for expressions are attached via aim constraint. The eyes are controlled individually by locators and both are controlled by a main curve,

Shoulder Pad Setup 


Setup

Pad moves with clavicle joint 

Custom controller that allows movement only for the pad

I wanted more freedom with my rig. So I decided to add an extra bone that would allow me to control the shoulder separate to the body. It is connected via point constraint with none of the characters bones effecting influence. This became very handy as any clipping issues were fixable.  

Constrain Script Python 




I wanted a script that would become very handy throughout the rigging process. Constraints where used many times when rigging. Looking through many tutorials I came across digital tutors, they had a series called "Enhancing Maya Toolsets with Python". This became very helpful as it showed how to setup a basic button with windows and apply an function too. Once I figured that out it became easy  


here is the working code example : 

#Import Maya Command module
import maya.cmds as cmds

#Prevent the duplication of our window
if cmds.window("cnsWin", ex=True):
cmds.deleteUI("cnsWin", window=True)

#Create a window that is not resizable
cmds.window("cnsWin", wh=(200, 50), t="Constraining Tool", s=False)

#Create an adjustable column layout
cmds.columnLayout(adj=True)

#Add a Text Scroll List to our UI, and append 3 items: "Point Constrain", "Orient Constrain", and "Parent Constrain"
cmds.textScrollList("myList", h=50, a=["Point Constrain", "Orient Constrain", "Parent Constrain"])

#Add a check box to enable or disable "Maintain Offset"
cmds.checkBox("myChBx", l="Maintain Offset")

#This button will apply constraints
cmds.button(l="Click to Constrain!", c="constrain()")

#This button will remove constraints
cmds.button(l="Remove Constraint(s)", c="rmvConstraint()")

#Show the window
cmds.showWindow("cnsWin")

#This function is used to constrain objects
def constrain():

#Find the item selected in our Text Scroll List
tsl_item = cmds.textScrollList("myList", q=True, si=True)

#If "Maintain Offset" IS checked, apply the constraint WITH "Maintain Offset"
if cmds.checkBox("myChBx", q=True, v=True) == 1:
#This line checks if "Parent Constrain" is selected in our Text Scroll List
if tsl_item[0] == "Parent Constrain":
#This line creates a Parent Constraint WITH "Maintain Offset"
cmds.parentConstraint(mo=True)

#If "Maintain Offset" is NOT checked, apply the constraint WITHOUT "Maintain Offset"
else:
if tsl_item[0] == "Parent Constrain":

#This line creates a Parent Constraint WITHOUT "Maintain Offset"
cmds.parentConstraint()

if cmds.checkBox("myChBx", q=True, v=True) == 1:
if tsl_item[0] == "Orient Constrain":
cmds.orientConstraint(mo=True)
else:
if tsl_item[0] == "Orient Constrain":
cmds.orientConstraint()

if cmds.checkBox("myChBx", q=True, v=True) == 1:
if tsl_item[0] == "Point Constrain":
cmds.pointConstraint(mo=True)
else:
if tsl_item[0] == "Point Constrain":
cmds.pointConstraint()

#This function is used to remove constraints from selected objects
def rmvConstraint():

#Find the item selected in our Text Scroll List
tsl_item = cmds.textScrollList("myList", q=True, si=True)

#This line checks if "Parent Constrain" is selected in our Text Scroll List
if tsl_item[0] == "Parent Constrain":

#This variable stores our selection
selCnsObj = cmds.ls(sl=True)

#This variable searches for any Parent Constraint nodes connected to selected objects
getPrtCns = cmds.listRelatives(selCnsObj, type="parentConstraint")

#This line deletes the Parent Constraints connected to selected objects
cmds.delete(getPrtCns)

if tsl_item[0] == "Orient Constrain":
selCnsObj = cmds.ls(sl=True)
getOriCns = cmds.listRelatives(selCnsObj, type="orientConstraint")
cmds.delete(getOriCns)

if tsl_item[0] == "Point Constrain":
selCnsObj = cmds.ls(sl=True)
getPtCns = cmds.listRelatives(selCnsObj, type="pointConstraint")
cmds.delete(getPtCns)

Tuesday, 2 December 2014

Foot Setup 

Here you can see my foot rig with all its needed control shapes and functions. It has a main shape that moves and rotates the entire foot rig. A heel Ctrl that moves the entire foot from the heels pivot. Toe Ctrl that moves the foot and leg up from the end of the toes pivot and finally a center foot Ctrl that moves the ankle up without moving the toe. 



Middle ankle foot rotation

Toe rotation 


Heel rotate 

Group and Freeze Script



With my little experience with Python I made a script that allows you to group an object, in this situation it would be a control shape/locator and freeze its rotations and clean the transforms with one click! I found this tool very useful throughout my rigging process as it would be tedious moving all my shapes, grouping and fixing each and individual transform and rotation. 

Here is my work process - 


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

'''
Aaron's GRP TOOL
>This tool will group selected objects separately, preserve the orientation of selected object(s), and clean up their transforms
'''

#Import Maya Command module
import maya.cmds as mc

#Get selection
selObj = mc.ls(sl=True)

#'For' loop - for all objects in selection, run the following commands
for all in selObj:

#Create a null
grp = mc.group(em=True)

#Rename the null: "grp_" + name of selected object(s)
rnm_grp = mc.rename(grp, "grp_" + all)

#Now, it's time to align the group to the selection

#Parent the group to selection
mc.parent(rnm_grp, all)

#Zero the transforms of the group so that it aligned with selection
mc.setAttr(rnm_grp + ".tx", 0)
mc.setAttr(rnm_grp + ".ty", 0)
mc.setAttr(rnm_grp + ".tz", 0)
mc.setAttr(rnm_grp + ".rx", 0)
mc.setAttr(rnm_grp + ".ry", 0)
mc.setAttr(rnm_grp + ".rz", 0)

#Make sure group's pivot point is aligned to selection
mc.delete(mc.pointConstraint(all, rnm_grp))

#At this point, the group is aligned to selection
#It's now time to parent the selection to the group

#Unparent group
mc.parent(rnm_grp, w=True)

#Parent selection to group
mc.parent(all, rnm_grp)

#Freeze selection
mc.makeIdentity(all, apply=True, t=True, r=True, s=True)   

 Twist & Roll Function 


Here you can see the hip setup. It is setup the more complex way with two control shapes. One, which is connected to the spine for precise hip movement and another which is parented to the whole  upper torso for overall movement. This was setup by using the connection editor, hooking up each of the control shapes rotation axis to the spines IK's twist and roll attribute. 

Overall Torso movement. 
Hip movement only! 


Face & neck 


Here you can see my characters head rig. All joints that are attached to the face come from the neck joint and have a Point constraint on each of its control shapes so I can move the surface of his face. The head control shape (above his horns) is orient constrained to the neck joint for easier movement. He also has a jaw control shape which will control the opening and closing of his mouth and finally he has an eye setup with the locators oriented to the eyeball joint. I added a mouth sock so it can enable him to talk and I will setup a set driven key system in the eyes attributes with a separate eyelid mesh so he can blink.





New Joints

I have decided to add some new joints to my rig to support the extra areas of my character. This includes the shoulder pads, for more precise movement and so that it doesn't dig into his neck when the shoulder control moves. Also a new joint chain that goes out from the root and hangs down supporting his loin cloth. I will add a similar system to the back joints so I can easily manipulate the cloth and move it out the way of his legs when they move. If I have enough time, I will use an N-dynamics system to allow a real cloth simulation to the mesh while also allowing to move it with the control shapes parented to the curves clusters!


   






Sunday, 9 November 2014

IK Handles & set driven keys

Here the Ik handles have been added to the arms & wrist, and the hip & ankles!  Make sure you select in the Ik tool settings before you apply to the bones. Otherwise you will have trouble changing once applied. I have also setup the custom attributes in each of the wrists. Using the set driven key tool, I can easily move each and individual fingers. 



 

Friday, 7 November 2014


Control shapes!

Here the control shapes have been added to my rig. There are still many improvements to be made regarding the size and shape of the control shapes around the armour. Using a python script that i made learning in the practical labs, allowed me to create a CV curve around any joint with a single click. Here is the my python script, with help I was working together with classmate - Lee Henry. I find the introduction to python strangely steep.

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

import maya.cmds as cmds

joint_list = cmds.ls(selection=True, type="joint")
for joint_name in joint_list:
   
    # remove the letters "jnt" from the joint name and store the remainder of the name
    # e.g. jnt_head becomes _head
    joint_name_stub = joint_name.replace("Jnt", "")
   
    #print out the control shape name for this joint using the joint name stub
    #e.g. _head becomes ctrl_head
   
    control_shape_name = "ctrl"+joint_name_stub
    print control_shape_name
   
    #print out the name of the offset group using the joint name stub
    #e.g. _head becoms grp_head_offset
   
    group_name = "grp"+joint_name_stub+"_offset"
    print group_name

    cmds.circle(ch=1, o=1, r=2, nr=(0,1,0), name=control_shape_name)

    cmds.group( name=group_name )
    
    cmds.parent(group_name, joint_name)

    cmds.setAttr(group_name+".translateX", 0)
    cmds.setAttr(group_name+".translateY", 0)
    cmds.setAttr(group_name+".translateZ", 0)
    cmds.parent( group_name, world=True )

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

Saturday, 1 November 2014

The Rig : Basic Setup 


Here is the basic skeleton rig for the character. I want to keep the amount of bones on my character similar to that would be used in a game engine. Additional bones might need to be added later on for areas such as hanging cloth and armour. 


Saturday, 25 October 2014





Here is another attempt at refining my characters mesh. His bodies poly count is much lower than the previous version which is much more suitable for a game engine. His face has much denser polys for facial animation. I am happy to use this version for reference along side building my skeleton thus far. When I have finally finished the skeleton I will do one more final fix just to make sure his edge flow is perfect before binding the character.

Friday, 24 October 2014

Topology







Here is one irritation of his topology. This post is for pointing out any issues I might have if I was to use this mesh to bind the skeleton. It has quite a dense poly count for his purposes in a game engine. He also has missing edge flow on his knee & elbows that are required for smooth deformation. His facial topology also needs to follow the anatomy and shape of his muscles, for areas such as the mouth and eyes. 

Tuesday, 14 October 2014


My Character 



Say hello to the character I will be rigging for this module. His name is Horn Klomp and he is a tough eleven horned creature. I had been working on this character for the duration of the summer and I believe he will be a good candidate for rigging. I will like to use him for a video game character as his topology and poly-count would suite a game engine like UDK quite nicely. His clothing and armour will be a big challenge in this module, specifically the skinning stage as he has alot of layers and hanging parts. I'm up for a challenge..


- Aaron out.   

Monday, 6 October 2014

My first source of inspiration would be from a close friend of mine, Harry Houghton who is now an excellent technical artist.

This video shows the exceptional work the he is capable of. He shows many features of his rig including a neat scripting tool. The amount of bending and deformation that he shows without breaking the rig is quite remarkable, I would like to create a rig that can sustain any situation. I already have a character in mind to use in this module for game engine purposes. Minor topology adjustments need to be made. I will show more evidence of research and inspiration in the coming weeks along with practical updates.  

Technical Applications


I am very excited to start this module. As a character artist it would benefit me greatly knowing how to properly rig a character. This skill would be very useful within my character pipeline as I would know in the Riggers/Animators shoes, how they want a perfect character (topology) for rigging and deformation passed on by the character artist. I have rigged two different characters in the past and know what it takes to setup an entire rigged character with various controllers, set-driven keys and morph targets. Even though I have a slight advantage with experience rigging, there is still alot to learn regarding the python scripting aspect. - Aaron