Sunday, July 24, 2011

Gatekey render, and stuff!

Waiting on a stubborn NDA to lapse to be able to show my updated reel. In the meantime, here's a rendered version of that Gatekey test I did a few weeks back to test out Morphy and add some lip sync to the reel.

This here is a Morphy version of a friend of mine who's been on me to make him one for a long time.

What else is shaking....
  • Started a vimeo channel for best of Morpheus stuff I see on there -
  • Kung Fu Panda 2 was fantastic, Cars 2 hit a nail on the road somewhere to completion.
  • Netflix is my new friend. My wife and I have been enjoying the BBC "what if he lived today" Sherlock miniseries with the British The Offices' Jim character playing a solid Dr. Watson.
  • Just wrapped a facial animation gig for the company a good friend of mine works at. Animating on the joints FTW!
  • One of my closest pals was here for a visit a couple weeks back and we brainstormed projects to take us at least till the end of civilization in 2012. I sure hope we finish before then so other folks can enjoy the stuff for a little while. Some pretty cool stuff, we can't wait to start connecting the cg community to it.
  • Been busy:
    • Drawing robots for another of those projects
    • Back into my nemesis Web designing for another
    • Digging back into Python for the rigger.
    • Started squashing some Morpheus bugs.
    • Just too much to do...
  • Team Fortress 2 has had a lot of updates since I stopped playing last summer which I've been digging through. The Castle keep map with melee weapons only is a ball.

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 = ( ([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:
    return badVertices

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

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

Wednesday, July 6, 2011

Best of Morphy for July

Semih sent me an image from a couple characters from his film. This is certainly one of the "fishier" uses of Morpheus I've seen. If you can't tell, the fish's face is a modified Morphy head. Really nice work.

Nice one I came across in the 11 sec club wip forum.

Playful little piece with a little girl.

A ton of great pieces from 11 second club this month. Here's a few...

Monday, July 4, 2011

Independence Day! (and Morphy)

First off, happy Independence Day if you're in the U.S. and if you're not - happy Monday! Smoked a brisket yesterday and man do I love slow smoked meats....

This is a playblast version of my 'let's-try-out-Morphy' anim test. Had a lot of fun doin the segment and learned a good bit about the rig. Those interested can see progressive updates on my Vimeo channel. 

Voted on the 11 Second Club entries yesterday and there are a lot of solid Morphy entries. Best of luck to you all. However my high vote was for a Norman piece. No favoritism here:)

For some training wheels on customizing Morphy, you can download the customizations from my animation in their own respective scene files. Eventually I hope to have a more elegant customization saving solution but that day has not yet come.

Included are:

  • Fezik - Big guy
  • oldGuy - Key guy
  • Wes - Mr. Shoves a lot
  • Inigo - the Spaniard!
  • Base scene file with my lighting setup from this piece since some folks haven't the time or inclination to set up lighting. Some just wanna animate and I can appreciate that. REMEMBER - mental ray.

Some notes:

  • BEFORE you try pulling one into a scene, make sure your preferences are set to cm units. Otherwise the rig will self destruct.
  • The customizations reference the Morphy v1.0 rig. If you try to point to one you've modified, it probably won't work
  • Import whichever rig you want WITH 'preserve references' checked.
  • With that you should be off to the races

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