and extra limbs for strobbing effects. Is there a component like a simple FK chain with squash and stretch or should I create my limbs based on lite_chain_01? I just need simple FK chains, no need for IK.
Some nice updates today.
I updated my âcleaning pre stepâ based on Chris example found on the forum.
Something I felt a really strong need for is to clean my materials. I am surprised no one mentionned it. Everytime I build my rig, the materials get duplicated.
I left some lines commented out for now since I donât really use them,
import os
import mgear.shifter.custom_step as cstp
import pymel.core as pm
######## delete all materials in scene ########
MaterialsInScene = pm.ls(mat=True)
pm.delete ( MaterialsInScene )
######## delete various groups ########
# pm.delete(pm.PyNode('rig'))
### From Chris ########
pm.delete(pm.ls(type='createColorSet'))
pm.delete(pm.ls(type='hyperView'))
allGeo = [mesh.getTransform() for mesh in pm.ls(type='mesh')]
pm.delete(allGeo)
### Delete all tag controllers. They build up the file size over time.
pm.delete(pm.ls(type='controller'))
### Delete all ngSkin nodes. If you delete the rig, they remain and cause large file sizes.
# NOTE: This means that you must not use ngSkin layers in your rig guide!!! You can use them in your built rig, of course.
# pm.delete(pm.ls(type='ngSkinLayerData'))
# These nodes inflate the scene size and cause the scenes to take WAY longer to open.
# (20 seconds instead of 0.9 seconds to open the model files, for example.)
# For some reason, sometimes dagPoses get polluted into the guide scene.
# I *think* it would be safe just to delete all dagNodes, but just in case, I'm only deleting ones who
# are on the buffer controls under controllers_org. Someone might choose to custom rig a hack inside a guide on purpose.
# buffers = pm.PyNode('controllers_org')
# for each in pm.ls(type='dagPose'):
# check if the transform inputs of the dagPose are the buffer controls.
# if any([x.hasParent(buffers) for x in each.inputs(type='transform')]):
# pm.delete(each)
# pm.select(pm.PyNode('guide'))
I also tackled something I wanted to do for a long time. The autoloading of an animation file as soon as the rig builds. The script is built upon the one shared by Toke Stuart Jepsen. I am not sure exactly how I got it to work but the difference is to have the Studio Library animation file in the /data/anim subfolder with a default name. This should allow me to scale to other characters too. For some reason I had to comment out the Paste option.
import os
import pymel.core as pm
import studiolibrary
from studiolibrarymaya import animitem
directory = os.path.dirname(pm.sceneName())
anim_folder = ( directory + '/data/anim/ROM.anim' )
item = ( os.path.join(directory, anim_folder ))
print ( ' item is ' + item )
item = animitem.AnimItem(os.path.join(directory, anim_folder))
print ( item )
item.load(
objects=[],
namespaces=[],
# option=animitem.PasteOption.ReplaceCompletely,
connect=False,
currentTime=False
)
##### Range of motion animation loaded ########
print ( '\n############### Range of motion animation loaded ##################\n' )
and finally I converted my Publish script from .mel to Python. What that script does is to save and move a copy of my mGear work file as a publish file after deleting the guides. I should probably also have the procedure export the guides as a separate file⌠Here is the link to the script from my Github page:
Dam today was supposed to be my long run sunday but I got too excited with this project and just didnât find the time!!!
Hopefully you will find this interesting.
ah and I also started to create a ârig_initialisationâ post script:
# My bits and bobs to prepare the rig for animation
# Hide joints
pm.setAttr ( 'rig.jnt_vis', 0 )
# Parent the rig node under Sagat
pm.parent ( 'rig', 'Sagat' )
# Rotation orders
pm.setAttr ( 'head_C0_ctl.rotateOrder', 2 )
pm.setAttr ( 'jaw_C0_ctl.rotateOrder', 5 )
pm.setAttr ( 'neck_C0_ctl.rotateOrder', 2 )
pm.setAttr ( 'COG_C0_ctl.rotateOrder', 2 )
pm.setAttr ( 'hip_C0_ctl.rotateOrder', 3 )
# Set pole vectors to World
pm.setAttr ( 'legUI_L0_ctl.leg_upvref', 2 )
pm.setAttr ( 'legUI_R0_ctl.leg_upvref', 2 )
pm.setAttr ( 'armUI_L0_ctl.arm_upvref', 1 )
pm.setAttr ( 'armUI_L0_ctl.arm_upvref', 1 )
Good progress for the day. Using the shoulder_01 and my customised mighty_Neck_01 wasnât usable in the end as I couldnât get neck rotation consistent with the rest of the body. After a ton of testing and upgrading to mGear 3.7.11, I finally understood how to go about it simply by using a series of control_01!!
I will open a new thread and post a tutorial to explain.
I also tested the orientation offset method but I couldnât understand how it worked.
Currently I am stuck with the metas as explained on the following thread.
And here is what I have left on my plate to call the rig done!
Ok so here is where we are now that I have upgraded to mGear 4 and redone the metacarpals using the technique in the thread mentionned in my previous post.
Actually⌠it is bizarre, it still says mGear 3.7?!? I must be on a different version since the original meta controls are gone.
Other than that, I also modified my setup for the FK neck with space switches following the technique highlighted here :
and managed to rename the ânice nameâ of the Head host using a post script with the following code, yeah you have to use the addAttr function but in conjunction with the edit flag:
# Rename the Head space switches on the Head host
cmds.addAttr( 'headUI_C0_ctl.control_ikref', e=True, nn='Head space' )
This way it will be more intuitive for the animators.
Unfortunately, the Right Mouse menu still displays âParent control ikâ. From what I read, it is not possible to change this.
And now I am stuck again as this new version of mGear has changed the behavior of the Epic arms so my upper-arms are rotating in an unwanted manner so this will need some tinkering again. grrrrr
Thatâs annoying as I was really hoping to move to the next milestone
Okay, I am finally back to mGear and this project.
After updating to mGear 4.0.9 my issue with the Epic FK arms seems to have been fixed.
Today I was testing the chain_spring_01. It wasnât part of my original plan but it looked too good not to give it a try. Now I just need to understand how to bake the animation.
Hehe yeah there was a little bit of trickery to get the chain_spring_01 component to react in the viewport
To achieve that, I locked the camera and titles to the root control which I animated in +X and a bit of +Z then to create the variation to simulate the wind, I simply made the âroot offsetâ (global) control vibrate a bit.
I will bake the âsimulationâ in a next pass and record a tutorial for the process.
Final render for my rigâs teaser and tribute to everyoneâs favourite Jean-Claude Van Damme movie
I am having a lot of fun with this project!