NavHeader
journalHeader
Showing posts with label Workflow. Show all posts
Showing posts with label Workflow. Show all posts

Friday, August 5, 2011

Morphy Tip of the Month: I'm gonna be lazy and say watch David's videos below:)

Kicking off with a tutorial/demo from a internet friend of mine. David's class are the ones working on  the Morphy Wardrobe project. Nice demo Dave! Also, there's a part 2....


Fantastic bit of animation by matthewpresForwarded to me by Pierre. Thanks!


Great one I stumbled across on vimeo...


Some great Morpheus examples in the 11 sec club this month. An especially good one even got number 2. Congrats!

Saturday, July 23, 2011

Basic problem solving - Scripting for a monotonous task....

So, I've been working a gig for a couple of weeks now and ran into an issue that Maya's base tools seemed to provide no good solutions. When I find myself in such a predicament I invariably find myself going down a path. Before I begin, a caveat - I'm an intermediate scripter and I'm sure there's much more efficient coding methods. However, functioning inefficient tools are better than no tools:) Hope this is helpful to anyone who happens to peruse these ramblings....

  1. Identify the need - In this case I need to ensure that a skinned mesh didn't have any vert with more than two influences. The annoying thing with maya is that even if you tell the skin to only have 2 influences and to maintain it it does the job about 98% of the time and just doesn't seem to care about that other 2%. Faced with the prospect of individually checking every vertex via the component editor for more that two skins, any other option is much more attractive.

  2. See if Maya has any tools to fix the problem - Messed with skin settings and the various mirroring, hammering and skin options to see if native maya can fix it. Sometimes this work, in this case it didn't

  3. To the internets! - Google and CreativeCrash check for a script or solution. If someone else has solved it and been kind enough to post the answer no reason to reinvent the wheel.

  4. Write a tool - Think through the requirements and results you need from a specific function or functions and beg, borrow and steal (while providing credit) the pieces to make it work.
For this little conundrum,  I wanted Maya to tell me if I had any vertices that had an influence above x influences and get that information in a usable format. Here was the particular flow on this problem.

  • For this script, I started with writing a function to return any vertices over 2 influences. 
  • As a part of that, I found the functions I needed to use need to know the skin cluster name which I remembered having wrote a function for a while back so I grabbed that.
  • Then, I thought it silly to cap it at 2 influences and allowed the user to specify the number of influences the user chose
  • Finally, worked on the workflow so that the user didn't have to type commands into the script editor as I wanted to be able to give my client a buttonable script for their artists. In the end it made sense to me to have it both report the bad verts as well as select the first in that list to easily get to work. If I was in a fuller production environment it might make sense to make a gui or modify the function to be able to select through the bad vertices list rather than a one off end function here.
In the end, spending an hour or two making a simple tool both enables a montonous task prone to user error doable as well as provides a tool for other artists to be able to do the same which is always a boon in production.


import maya.cmds as mc
import maya.mel as mel

maxInfluences = 2

def returnExcessInfluenceVerts(mesh, maxInfluences):
    skinCluster = querySkinCluster(mesh)

    badVertices = []
    
    vertexList = (mc.ls ([mesh+'.vtx[*]'],flatten=True))
    #Find the bad verts
    for v in vertexList:
        influenceList = mc.skinPercent(skinCluster, v, query=True, transform=None) 
        if len(influenceList) > maxInfluences:
            badVertices.append(v)
    return badVertices


def querySkinCluster(obj):
    mel.eval ('$mesh = "%s";' % (obj))
    skin = mel.eval('findRelatedSkinCluster($mesh);')
    return skin
   
mesh = (mc.ls (sl=True))
if len(mesh)<1:
    print ('Please select a mesh')

else:
    badVertices = returnExcessInfluenceVerts(mesh[0],maxInfluences)
    
    if len(badVertices)>0:
        mc.select(badVertices[0], replace=True)
        print ('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
        print ('%s%i%s' % ('There are ',(len(badVertices)),' verts are over the max influence:'))    
        print badVertices
    else:
        print ('No verts over max influence')

Sunday, June 19, 2011

What's good for the goose...

Yeah, I know. It's about time I did a Morphy animation test. As I was looking to update the ole' reel last week the lack of a quality lip sync was striking so I'm gonna remedy that as I can find time between gigs. Decided to do a clip from one of my favorite movies though one I haven't seen done much because it is a pretty popular film. I had a monologue from another movie I wanted to do but I'd never done a full keyframe sequence with a lot of characters so thought I'd give that a go.


Rough Blocking

I've already learned quite a few things by using Morphy in an animation which is the best way to test stuff. So first off, apologies for some wonkiness in some places on the rig. Here's a few things I've learned:

  • polySmooth causing major issues with simple customization - When I changed the surface of some faces and then ran a poly smooth, the shaders go all over the place. So, because I'm using mentalRay, I just have a mesh approximation setup to use my viewport smoothing and that works much much better. When I go back I may find a way to do the polySmooth that will work, but it's annoying. Apologies.
  • The uiCam's pivot is nutty - I gotta dig in to what's going on but in the meant time if you select the uiCam and turn off inherit transforms, it'll behave properly
  • Some of my geo has flipped normals.
  • Turn off the face shaper's visibility after you're done customizing so you don't keep selecting them inadvertently
  • Locking the geo selectability - While I understand my reasoning for doing it, it's a little annoying. 
  • Shoulder and wrist rotation orders - Still don't think I got this right. I'm playing with different setting as I'm working through my anim and will post what I think are best choices when I'm done
  • Eye orb mesh creasing against the cheek and in the brow when doing some customizatoin scaling - You can alleviate this to a large degree by selecting the mesh area verts that's getting wonky and smoothing the skin weights there
  • Limb scaling switching isn't as intuitive as it could be - having to manually change the stretch settings on the fk and ik to ensure matching isn't the best workflow. I've got some ideas at how to make that process better.
  • Head placement on the neck - taking the head's blue mover control and positioning the head a little more forward on the neck seems to work a lot better.
  • The spine blows - My pivots stink and I apologize for it. The hips are especially offensive. This shall be fixed.
  • Want to add pose mirroring
  • Want to look at the body geo to get better muscle topology
  • Fingers - Think I probably need to add an alternate finger setup what's more direct
  • Face controls - Though I like them for the most part, I think the lip roll should be on a separate control than the lip movers. One thought I had was to just pull all of that off the face and do a faceUI similar to what I have for the bodyUI (which I'm really enjoying). 
When will I get around to updating Morphy? The minor stuff here I think I can do before too long but the big stuff will be a while. Bokser and I have a long way to go on our rigger which I'll be using to do 2.0. 
Feel free to offer thoughts on the blocking or the rig thoughts. Thanks for all the support:)

Wednesday, October 6, 2010

Morpheus 103 - Blendshape That!


Quick demo on workflow for working with the facial rig blendshapes and some insights on connecting things up for those interested in lookin beneath the hood. 

Been sick the last few days so haven't been making as good of progress as I'd like but making some progress nonetheless. Bout done with the rig fixes and movin on to scripting. Woot!

Sorry for the stumbling through things in the vid a bit, like I said not feeling 100%.

Thursday, August 26, 2010

Bake Custom Geo at 360 degrees for 3 seconds...

...and you get fully working custom facial geo with no wrap deformers to slow things down. As you might have guessed, the custom facial geo baker is complete. So now you can...

The short of it:

  1. Import your new beard/gotee whatever
  2. Position it where you want it in relation to a ZEROED out Morphy face
  3. Select your custom mesh, then his face mesh
  4. Source and run script
  5. Go grab some candy. Preferably dark chocolate.
  6. Come back and animate.
The long of it:
For those of you interested, here's how I go about tackling things like that. First I figure out what I want the script to do. Here's my original "plan" notes:

  • Process to be scripted
    • Select $customGeo followed by deformingMesh
    • Create wrapDeformer 
    • Get blendshape channels into array
    • For loop
      • for each blendshape channel on the deforming mesh (limit by facial region?)
        • Get input connector value and put in $driverArray
        • Break the connection on the blendshapeChannel
        • turn channel value to 1
        • duplicate $customGeo to freeze it
          • Add new geo name to $bakedCustomGeo string array
        • position new geo
        • reconnect the connecter value with data from $driverArray
    • Put all new blendshape geo in new group
    • Name group
    • Connect all new geo back into original geo as blendshape node ($customGeoBaseName_bsNode)
Of course that's not going to be everything as lots of stuff rears it's head and must be put down like a many headed beast trying to devour your time. Next thing I do is look through scripts I have or can find online that might have similar functions I can hack (see my previous hacking other people's scripts post). I had used a great script written Asi Sudai called extractBlendshapes. It will take a mesh with a blendshape that you want to get the blendshapes from if, say for example, you deleted the original target meshes. It even puts them in a handy visual columns/rows format in worldspace. I made judicous use of large chunks of his code for the duplication and extraction function. I just modified it to duplicate the wrap deformed customGeo instead of the main mesh then did all the rest of the stuff I needed to do to get things working.


Also, thanks to my buddy David Bokser who helped me out with a syntax issue I was getting stuck on last night.

Here's the script (sorry, I don't have the best coding practices as I'm still a novice at it):
/*
TITLE: jbMorpheusFacialCustomGeoBaker
VERSION: 1.0
AUTHOR:Josh Burton
www.joshburton.com
DATE: August 26, 2010

DESCRIPTION:
Script for baking out custom facial geo for the Morpheus Rig.

DISCLAIMER:
If your computer explodes, I didn't do it.

HOW TO USE:
1. First select the custom geo to bake
2. Then select the head (to wrap it to)
3. Run script

HISTORY:
08.26.10 - BIRTH!

Acknowledgements -
1. Blendshape extraction, size, existance checking from extractBlendShapes - Asi Sudai
asi@asimation.com www.reel.asimation.com
2. David Bokser for helping me fix some of my syntax issues
*/

//sub Procs

// Debuging printing proc - Acknowledgement 1
proc extractBlendShape.debug(string $msg)
{
if (1==1)
print ("\n***Debug: " + $msg +"\n");
}// End
// Get object bounding size - Acknowledgement 1
proc extractBlendShape.getBounding(string $node)
{
float $bounding[]=`xform -q -bb $node`;
float $xSize=(`abs $bounding[0]` +`abs $bounding[3]`);
print $xSize;
}// End
// check the object have blendShapes - Acknowledgement 1
proc string extractBlendShape.getBlendShape(string $node)
{

string $shapes[] = `listRelatives -s $node`;
for ($shape in $shapes){
string $tempArray[]=`listConnections -s 1 -d 0 -type "blendShape" ($shape + ".inMesh")`;
if ($tempArray[0] != "") return $tempArray[0];
}
return "none";
}// End

//Main Proc
global proc jbMorpheusFacialCustomGeoBaker() {

//Declaring our intial variables
string $blendShapeNamesBaked[];
string $blendshapeConnections[];
string $currentConnections[];
string $selected[] = `ls -sl`;

//Josh, do an error check to make sure the selection order is correct
$customGeo = $selected[0];
$deformerGeo = $selected[1];

//create and store name of Wrap deformer
string $wrapDeformer[] = `deformer -type wrap $customGeo`;
select -r $customGeo;
select -tgl $deformerGeo;
AddWrapInfluence;
select -cl;

//reorders deformation order for proper baking of skinned mesh
reorderDeformers "tweak1" "face_skinCluster" $deformerGeo;


// Check if object have blendShape node. - Acknowledgement 1
string $blendShapeNode = `extractBlendShape.getBlendShape $deformerGeo`;
if ($blendShapeNode == "none") { print ("\n"+ $deformerGeo + " don't have blendShape"); return; }
// Get all BlendShapes shapes - Acknowledgement 1
extractBlendShape.debug $blendShapeNode;
string $blendShapeNamesShort[] = `listAttr -m ($blendShapeNode + ".weight")`;

int $n = 0;



//Creates a new name for the geo to be baked
for ($name in $blendShapeNamesShort) {
$blendShapeNamesBaked[$n] = $customGeo + "_" + $blendShapeNamesShort[$n];
$n++;
}

// Start extracting
// Get object size, to better spread the blendShapes - Acknowledgement 1
float $bounding[]=`xform -q -bb $customGeo`;
float $boundingSizeX=(`abs $bounding[0]` +`abs $bounding[3]`);
float $boundingSizeY=(`abs $bounding[1]` +`abs $bounding[4]`);
extractBlendShape.debug ("Bounding size = " + $boundingSizeX);
// Start extracting each shape - Acknowledgement 1, changed to export the custom geo instead of the deforming Geo
int $t=1;
string $bakedCustomGeo[];
for ($i=0; $i<`size($blendShapeNamesShort)`; $i++) { int $row = `floor($i/5)`; if ($t>5) $t=1;
extractBlendShape.debug ("doing blendShape - " + $blendShapeNamesShort[$i]);
//queries the connection that goes into the blendshape node and stores it
string $currentBlendShapeChannel = $blendShapeNode + "." + $blendShapeNamesShort[$i];
$currentConnections = `listConnections -d off -p on -s on $currentBlendShapeChannel`;
$blendshapeConnections[$i] = $currentConnections[0];
//breaks connection on blendshape node
disconnectAttr $blendshapeConnections[$i] ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) ;
//back to Asi's code
setAttr ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) 1;
string $bakedCustomGeo[]=`duplicate -name $blendShapeNamesBaked[$i] $customGeo`;
xform -r -t (($boundingSizeX*($t+1.2))*1.1) (($boundingSizeY*$row)*-1) 0 $bakedCustomGeo[0];
setAttr ($blendShapeNode + "." + $blendShapeNamesShort[$i] ) 0;
// Restores connection
connectAttr $blendshapeConnections[$i] $currentBlendShapeChannel;
$t++;
}
//Restores deformation order of the Deformer Geo
reorderDeformers "face_skinCluster" "tweak1" $deformerGeo;
reorderDeformers "face_skinCluster" "face_bsNode" $deformerGeo;

//Delete wrap and connect baked custom geo as blendshapes to original custom geo
delete $wrapDeformer[0];
$customGeoBlendShapeNode = $customGeo+"_bsNode";
blendShape -n $customGeoBlendShapeNode $blendShapeNamesBaked $customGeo ;

//groups our new baked geo for easy cleanup later on
$bakedCustomGeoGroupName = $customGeo+"_bsGeo_grp";
group -n $bakedCustomGeoGroupName $blendShapeNamesBaked;
setAttr ($bakedCustomGeoGroupName +".v") 0;
parent $bakedCustomGeoGroupName customFacialGeo_bsGeo_grp;

//Connects our custom geo blendshape channels to the original deforming mesh channels
int $b=0;
for ($bshape in $blendShapeNamesBaked) {
connectAttr ($blendShapeNode + "." + $blendShapeNamesShort[$b]) ($customGeoBlendShapeNode +"."+ $blendShapeNamesBaked[$b]);
$b++;
}

//Skin the custom geo
$customGeoSkinName = $customGeo+"_skinCluster";
skinCluster -n $customGeoSkinName -tsb qssFaceSkinJoints $customGeo;

//copy the skin weights from the deformer geo to the custom geo
copySkinWeights -ds $customGeoSkinName -ss "face_skinCluster" -noMirror -surfaceAssociation closestPoint -influenceAssociation name;

//renames our original custom geo properly
$customGeoProperName = $customGeo+"_customGeo";
rename $customGeo $customGeoProperName;

//Report complete
print ($customGeoProperName + " exported properly. I'd move the joysticks around to make sure.") ;

}

What else?
  • Been doing some polishing on some of the blendshapes for the rig and deformation
  • Pushed Nose widener more at a beta tester's request
  • Bug fix - eyebrow mover rotation is now properly mirrored
  • Moved out the jaw_anim control so it wouldn't get stuck behind beards
  • Moved the hair over to using skinning rather than wrap deformers
Now, pardon me but I have some pig tails that were sent in to look at. Keep em comin!

Sunday, August 15, 2010

Body Morphing Controls Pass 1

First real pass at splitting up the body morphs. Currently I have them symmetrically done. Thinking about whether left/right would make sense or not. Thoughts? Any other prebuilts you'd like to see?



The meat of it are a muscular, heavy, skinny and feminine morphs which I've then split up using Jason Osipa's tutorial in chapter 6 of Stop Staring (second edition). He's talking about doing a full face scrunch and then painting out the various regions. I just took that and applied it to painting out regions of the body. A bit tedious but it seems to work okay.

Here's what's on the slate for Morphy this week.

  • Body rig
    • Polishing body morphs and blends between sections
      • Skinny's lower torso is doing some funky stuff with some other shapes.
    • Splitting body morphs to left/right sections if that level of control is desired
    • Add Mid spine ik control
    • Add some manual neck scaling to make tying into the head better.
    • Look at adding chest widener for shoving the shoulders further apart without complete breaking doublesteins setup.
    • Look to at what's breaking on the fk/ik switching when scaling limbs
  • Facial Rig
    • Add movers on control groups to move the controls out should the custom geometry the user has on block things
    • Add nose bridge thickener
    • Possibly redo bridge flattener to not squeeze so much
I have a few more contributers who look like they're gonna come through on some stuff so even more variety is in the works. Thanks guys!

Thursday, April 29, 2010

Keane and a blue moon...



Great series of vids. Hat tip to my pal Kyle for the find.

The moon was so bright last night it was eerily awesome at 4 am. We live in the middle of nowhere now so there were NO outside lights to spoil the beautiful blue illumination. It was casting these sweet blue shadows on my back patio and the big old moon was just glowing there like a great big light bulb in the night sky. Shoulda got the pastels out.

Why was I up at 4am? Allergies, my friends. Gotta love em.

Got some good thinking done as I lay there surrounded by tissue paper on the couch (decided to not subject my wife to my sniffles if I could help it) and have some new ideas on the next project side of things to workout. This is if Garden City ever finishes.

Thursday, August 13, 2009

Lots of stuff and not so much...

  • Animals Shmamimals - Squirrely has worked overtime on getting attention and I appreciate his efforts. Been busy the last few weeks working on a commercial project for some folks "down under". The character and rig are ready to roll, just waiting for what I need to animate. He was a fun character to design and model. Bokser helped me out with body rigging and cloth and I took care of the facial. Learned some new stuff along the way as well. Really looking forward to how that's shaping up and can't wait to show it
  • Love the look of this show - Been following it's production art at the great blog they have set up.
  • Jason Ryan Classes - Signed up for Jason's seminar and enjoying catching up on the classes very much.
  • Great post on "dirtying" up animation - Read it. You won't regret it.

Thursday, April 23, 2009

Squirrely Obstacle Course Continued...

Been working on 3dizing the Squirrely test. Overall, pretty happy with the rig and plan on releasing version 1.0 after I'm done with the demo reel. He was designed as a 'ball type' character for tests and is serving that purpose well:) Still on stepped keys, hoping to get through the segment's "3dizing" by tomorrow so I can shift to linear early next week. We'll see how it goes. The wife and I are heading out to bowl here in a few so I'm out. I wish I could bowl as well in real life as I do on the Wii. Ah well...

Wednesday, April 15, 2009

Lip sync progress

Another day on the scene. Well, partial day. Making good progress though it's still in the "funky" phase when things don't quite look right. In the spirit of showing process if anyone cares to see. :)

Thursday, January 8, 2009

Real quick...

So this is Squirrely's next test. In the long tradition of Scrat. I'm gonna try and do some of the Animation Mentor exercises by myself and get some friend's feedback (as I can't afford AM at the moment). This will be my "Obstacle Course" one.

Saturday, August 16, 2008

Okta-Awesome!

This is a fantastic short. AND. They have a great making of vid here. Check out the rest of the site for some more great artwork. I'm continually impressed by the work coming out of the Gobelin's school.

Thursday, July 17, 2008

Flash drawing with substance...

Dan Paladin (what a sweet name, eh?) is an amazing illustrator and animator for that matter and I can't wait for Castle Crasher's to release. In the meantime here's some great workflow vid from him. Comic-Con 2008 Flag Design from The Behemoth on Vimeo.

Tuesday, March 25, 2008

For Ben and other Bits...

What's good from the net this week...

  • Karate Kats...er...somethin - Having been called to the carpet by my buddy Ben....YES, I am excited about Kung Fu Panda. The art looks awesome and from what I've seen and read, it's shaping up quite nicely. I know I'm buying the artbook at least. :)
  • Animation Workflow - Seeing how other animators work is a great way to keep growing as an animator. Here are some fantastic insightful reads:
  • Castle Crashers is still very much going to be Awesome - There's a blog to chronicle its awesomeness and the art is beautiful. And speaking of workflow... Marsh Land Construction from The Behemoth on Vimeo.
  • The Batman Animation Law - Dictates that Batman in pretty much any animated form will rock. I'm definitely looking forward to this incarnation. I will say the original animated series from the mid 90's is still my favorite and I think the Justice League version lost some cool factor (way too big of ears...)
  • Some GREAT Disney Art - LINK

All the stuff on this site is 2000 - by Josh Burton...unless otherwise noted. All rights reserved.