Since starting this blog I have always thought of giving away a rig over here to animation community. I toyed with idea of putting toony biped rig, but there are way too many of them. So I thought of putting up an unorthodox character. I’m putting up a Maya Ant rig, which I did last year, for some personal project. I hope to put this for download at many other places to get more feedback and removes any bug for users. Please feel free to share around and do let me know if this rig did something in your project or short film, our help you in any other way. I would be happy to put up link here.
We started working on this short film 3 years back, My friend sagar has a brilliant idea about a story around a greedy thief and finally it got finished this June 2012.
And Yesterday it won its first Prize from TASI. I have worked on facials for the thief character, and two of my good friend Sagar and Dhiraj have worked there asses off on putting this film together, have a look.
Official blog: http://lcshortfilm.blogspot.in
I have written an useful Maya python API plugin which exports out weights from polygon mesh or vertices to text file(optionally binary),Which can be used later.
This process is mostly useful when User wish to change position of joints in a rig with skinCluster , or just want to update rig file with latest weights from other file.
I have in past used Michael comets famous Mel script cometSaveWeights, which works great but is very slow when importing weights on dense mesh.
It was my first attempt at writing something in Maya API. Attached in plugin which I have tested on Maya 2008 to 2011.
Mel Command to export weights
scSaveWeights -roundOff 5 -action “export” -file “d:/weights.txt”;
Mel Command to import weights
scSaveWeights -action “import” -file “d:/weights.txt;
Go to windows>Settings/prefrence > plug-in manager and browse to the scSaveWeights.py
I would suggest to open the py file in IDE and read through comments in the beginning of script.
Exporting weights on polygon mesh with vertex count 12432 skinned with 255 joints took 7.6378 seconds
whereas Importing took 66.3445147672 seconds and in quick mode it takes 19.937 seconds while exporting
and takes 7.5559 seconds while importing.
Importing weights with cometSaveWeights.mel took more than 7 minutes on same Mesh.
edit: updated script to work with selected polygon object and in component mode, while importing weights.
I recently worked on creating solution for wheel auto rotations inside maya. Well I searched a lot for finding adequate solution but some lacks a thing or two.
most commonly used solution are rotating the wheel based on translation X & Z with circumference of wheel , which is working fine but gives error when controller
is rotated in reverse direction( 180° or more). Another solution I found is to use Infinite animCurve and attach it with multiplier and manually animating it!
A guy named darvy has created a set of vehicle rigging scripts I found above method nicely implemented in there.
I find one tricky way to calculate auto rotations without worrying about rotations and direction where our rig is going. In brief I wrote expression which finds direction magnitude
where our wheel is going (forward or back). Also expression calculate the distance covered by wheel between last frame and current and calculate distance using circumference (2 π r)
float $radius =1;
int $dirVec;// get Joint translation value for calculating direction vector.
float $pastValX = `getAttr -time (frame -1) basePos_jnt.tx`;
float $pastValZ = `getAttr -time (frame -1) basePos_jnt.tz`;
// Now compare the difference of tip joint with base joint and basejoint’s previous frame
float $currPosX = tipPos_jnt.translateX – basePos_jnt.translateX;
float $currPosZ = tipPos_jnt.translateZ – basePos_jnt.translateZ;
// with past
float $pastPosX = tipPos_jnt.translateX – $pastValX;
float $pastPosZ = tipPos_jnt.translateZ – $pastValZ;
// now calculate the magnitude
float $currMag = `mag << $currPosX,0,$currPosZ>>`;
float $pastMag = `mag << $pastPosX,0,$pastPosZ>>`;
if ($pastMag >= $currMag) $dirVec = 1;
else $dirVec = -1;
// get controls translation value for actual calculations.
float $pastCtrValX = `getAttr -time (frame -1) placement_ctr.tx`;
float $pastCtrValZ = `getAttr -time (frame -1) placement_ctr.tz`;
float $currDistX = placement_ctr.translateX – $pastCtrValX;
float $currDistZ = placement_ctr.translateZ – $pastCtrValZ;
float $distance = ($currDistX*$currDistX) + ($currDistZ*$currDistZ);
$distance = sqrt($distance);
// finding distance by dividing into circumfrence
float $rotation = $distance /(2* 3.1428*$radius) *-360 * $dirVec;
$rotation += tyreRot.rotateX;
tyreRot.rotateX = $rotation %360;
Some time ago I wrote a MEL script for saving out skinWeights for massive from maya skinCluster. Script writes out weight is massive’s native format (.w file extension).
Massive is crowd simulation software and is used for giving artificial intelligence to crowds and make them believable. Its common practice to skin character inside maya and take out skeleton ,mesh (as obj) inside massive for doing crowd sim. But we have to either skin it again inside massive which is defiantly not very intuitive or import weights from maya. So this script makes this task easier by writing out weights in separate file from maya itself.
Yes, i was the one who used to love mel like anything. I think i still do for its simplicity inside maya,
but it was time to move on..
I haven’t looked much around in other 3d packages but everyone was saying python is way foward.
I used python inside maya and find it pretty boring cluttered repetitive compared to MEL
(apart from standard python librarypython inside maya has nothing to offer).
And then about year pass by i was member of Google group PYTHON_INSIDE_MAYA they were developing PyMEL
guy named Chad Dombrova actually cook this whole new concept of pythonic way to look inside maya.
I gave PyMEL shot about a month back i installed release 0.9.1 and i was completely hooked. Before i go further i must say
I think PyMel is way forward to do scripting and programming inside maya (the python way). I also think there are some tiny miny glitches
here and there inside PyMEL which may prevent you from migrating, but with so many talented people collaborating i don’t think there would be
much problem once the final build is released.
Maya commands the PyMEL way:
mel code :
>>> plane = polyPlane(n=’myPlane’)
Basically what PyMEL does is it attaches attributes directly to object (PyNode) and then we can play with those attributes and properties (Methods)
It is whole OOPS based system with classes and all those modern language terminologies put into practice. With objects inheriting properties from
parent classes like “joint” inheriting from “transform” and all
Hey friends as i posted earlier i been working on movie “Mahayoddha Rama” at pixion. Now as trailer is out i would love to share it with you guys.
I worked as character rigger in movie along with some very talented guys. Hope you like it. I would like to share i worked on almost all birds character in this movie and i was daily joke with collegues asking me if birds are flying.. well i some how did it.. and end result was good..
I worked for movie named Arjuna while in UTV. I worked on lead character Arjuna ,fish rig and many other BG characters. Our director Arnab Chaudhuri and animation director Pawan , they really pushed our team to limits. even with small team they did great work. As usual for rigging artist deformations were pain in ass specially those shoulder areas..
Well best of luck to arjuna team !
There are many ways to make your animation shot lite! Like using proxy reference, maybe turning off useless reference object. Another option can be using Z-imagePlane for substituting with real objects, idea can be implemented in pipeline special for heavy Background scene so that animator could breath. (or let other breath, goddamn these ever complaining animators).
Here we go, I would take a lame example to explain my point. Here is the scene with few objects, a plane, cube and sphere.Let’s suppose sphere is our hero object and we gonna animate it. And rest two objects are high poly objects.
So now we need to hide the sphere in scene,also its time to lock down the camera in scene whether it’s animated or not just lock it.
Then go to render settings and set the output resolution to same as resolution gate of camera. Select the right camera ,Now check the “depth channel (Z-depth)” option as in image below, make sure image format is set to maya iff. Hide the primary object that we wish to animate.Now batch render out scene in your proj directory.
Hide the objects that we have render out and UnHide our animatable objects. Now import imagePlane from viewPort “view >imagePlane >import imageplane” and in imagePlane options check “Fit to resolution gate” and in depth settings check “Use depth map”.
what maya did is using Z-depth it composite out the objects in viewport. since z-depth contains depth information we can freely move our animated object with depth information around other objects (which we now have hidden).So now our scene will also be light as it now doesn’t need to draw polygon again.
(in above image only sphere is there yet you can see polySphere is behind cube,z-depth in action)
Hey ya! i got confirmation. i be joing online workshop for two months by none other than todd widup. He is an industry veteran and has experienced in working in big production. seems like it going to be exciting time. Can’t wait! Here you can find what class is all about!
I be informing here on how is it going..