Friday, January 23, 2015

Control curves template

I made another simple little utility/template file for rigging purposes. It's pretty common to have to make control curves of various shapes to use in rigs.


Download the maya template here (it is a 2015 file, but checking ignore version should be okay): http://goo.gl/h3rNmU

All you need to do for your rig file is import the maya file (merge into the default namespace), open up the template group, select the one you want, and then run this script:

string $dupCtrlList[] = `duplicate -rr`; //duplicate control
for ($duplicateCtrl in $dupCtrlList){
  parent -w $duplicateCtrl; //unparent from template group
  editDisplayLayerMembers -noRecurse "defaultLayer" $duplicateCtrl; //remove from display layer
  string $shapeNodes[] = `listRelatives -s -path $duplicateCtrl`; //get list of shape nodes
  for ($shape in $shapeNodes){ //for each shape node, connect display overrides
    connectAttr -f ($duplicateCtrl + ".wireOverride") ($shape + ".overrideEnabled");
    connectAttr -f ($duplicateCtrl + ".wireColor") ($shape + ".overrideColor");
  }
}
I've put this script on my shelf with this nice little circle icon:

The control curves each have additional attributes that let you set the drawing color override, as in the image above, which is a nice visual indicator for rigs.

Hope that's useful for someone.

Later,
Stuart

Thursday, January 22, 2015

Ant sculpting updates

The ant is still progressing along, in and amongst other things. The base model is finished, provided there are no revisions for the gross anatomy.





I've retopologized it using ZRemesher (process as below), and am working on fixing the UV maps in Maya. Some strangeness there, but shall press on.


Then it's detailing, texturing, finishing the rig and getting everything animation ready.

Later,
Stuart

Tuesday, January 20, 2015

Angle Measurement

Happy New Year!

Angular data, which will help with animating the ant I am working on, requires that I measure the angles between various components of the model. Maya, strangely, doesn't have a readily usable way to measure angles. There are a number of scripts out there, but I wanted to try my hand at creating a script that might be more functional and robust than some other solutions out there.



Measure Angle works with a quick mode and a UI mode (see the text file for some documentation). With UI mode, components and objects can be used to input world translate values. With quick mode, just select three objects, double-click the shelf button, and the angle is built.


Locators are placed in the scene which can then be constrained to objects to automatically update measurements. I thought it was important to have an annotation with the angle in the scene. The real trick was getting viewport text that would update continually. The result isn't perfect, but I believe it's fairly good. The annotation is driven by an expression, so it will update a) with a time change (scrub the timeline) b) if you hit the Refresh Annotations button or c) for constant updates, if the master node AE extra attributes is open (Copy Tab and minimize it).


There are some handy extra attributes (radians and degrees, visibility, and the extra updater angle value that helps keep the expression evaluating).

I'd be happy to hear some feedback on the script. I've only tested it on Maya 2015 Win x64, so other platforms would be good to hear about.

Later,
Stuart