Thursday, April 22, 2010

Mentoring and more!

Couple updates for everyone... i know it's been awhile.

First, we are currently rockin out on the 2nd session of Rigging Mentor (www.riggingmentor.com), after a successful first session! The students are great, and everyone is super excited to be learning from each other - including the mentors! Spots are already filling up for the next session, but fear not - we're working on ways to bring on more students.

On the work side of things, we're more than halfway through with Open Season 3, and it's looking awesome. We're also doing some Looney Tunes stereo 3D shorts, one of which will be in theaters very soon.

On the Maya side of things, 2011 has been released to subscription customers, and having played with it for a little bit, I must say that it is awesome. Best update they've had in years. Of course, as with any update, I'm starting to find some oddities that ...troublesome.

One thing that i've found out today is that if you're saving out a custom file type from a script/gui, Maya's new fileBrowserDialog is putting some restrictions on filetypes and the ability to select files that aren't in the standard list of types. Kinda hard to explain, but in short - when i'm saving out an XML file from a script, maya is forcing a standard file type to be in the name. so blah.xml is actually getting saved out as blah.ma.xml. Not cool.

More fun to come...

Also, if you are on facebook, be sure to look up RiggingMentor.com and become a fan! We have links from www.riggingmentor.com.

Labels: , ,

Monday, November 16, 2009

Rigging Mentor

Just wanted to announce on this blog that some friends and I have started up RiggingMentor.com, an online school for "teaching the art and science of character rigging". We are approaching it with the idea of giving each student a personalized education based on their skill level, their interests, and their needs based on what they want to do. We are currently beta testing, but are taking names down for those that are interested. Hopefully we will be gearing up to start a winter session in the beginning of 2010!

Stay tuned for more info...

Labels: , , ,

Thursday, May 28, 2009

cPoc fyi...

Just to note, and clarify, the closest point on curve script and node i mentioned is different from the one you'll find under create deformers - point on curve.

That particular point on curve deformer uses the curvePointConstraint command, which is basically constraining cvs (or partial cvs) to a locator.

My script/node will do the opposite - a locator/transform can be constrained to the curve, so if you have the curve skinned/deforming/moving, you can have something stick to the curve. again, its the same as the closestPointOnSurface node, but it works on curves.

anyway, just wanted to clarify since a couple people asked :)

Labels: , , ,

Tuesday, May 19, 2009

Closest Point on Curve (script)

Here's a python script i wrote recently... closestPointOnCurve. as i previously posted, maya doesn't have a built in node for getting this info, so i wrote my own. this code below is just the *script* version; i'll post the plugin node version another time.

you would call this with a location (world space point) and a curve object. for example:

import jc_closestPointOnCurve as cpoc
cpoc.jc_closestPointOnCurve([0, 0, 0], "curve1")

what you would get returned is the parameterU along the curve, and then the worldspace position of that point along the curve.


import maya.OpenMaya as om
import maya.cmds as mc

# input curve
# input point
# output param
# output point

def jc_closestPointOnCurve(location, curveObject):

curve = curveObject

# put curve into the MObject
tempList = om.MSelectionList()
tempList.add(curve)
curveObj = om.MObject()
tempList.getDependNode(0, curveObj) # puts the 0 index of tempList's depend node into curveObj

# get the dagpath of the object
dagpath = om.MDagPath()
tempList.getDagPath(0, dagpath)

# define the curve object as type MFnNurbsCurve
curveMF = om.MFnNurbsCurve(dagpath)

# what's the input point (in world)
point = om.MPoint( location[0], location[1], location[2])

# define the parameter as a double * (pointer)
prm = om.MScriptUtil()
pointer = prm.asDoublePtr()
om.MScriptUtil.setDouble (pointer, 0.0)

# set tolerance
tolerance = .00000001

# set the object space
space = om.MSpace.kObject

# result will be the worldspace point
result = om.MPoint()
result = curveMF.closestPoint (point, pointer, 0.0, space)

position = [(result.x), (result.y), (result.z)]
curvePoint = om.MPoint ((result.x), (result.y), (result.z))

# creates a locator at the position
mc.spaceLocator (p=(position[0], position[1], position[2]))

parameter = om.MScriptUtil.getDouble (pointer)

# just return - parameter, then world space coord.
return [parameter, (result.x), (result.y), (result.z)]



feel free to email me any questions :)

Labels: , ,

Monday, May 11, 2009

Python - cPoC

So what is *up* with maya not including a proc or node that gives you the closest point on a curve (from a given point)? You get a node that will give you the closestPointOnSurface... and a node that will give you the closestPointOnMesh... so why leave curves out?

It makes no sense... they even give you an example .cpp plugin source to create that node yourself! crazy, huh?

well, i needed to get the info of a closestPointOnCurve in one of my rig scripts, so tossing out the idea of requiring plugins (i try to do as much as i can without them... mostly), i opted to just write something quickly for this. i'll mess with making it into a node/python plug later, but for now i just wanted to get that info and use it.

if anyone is interested in the script, gimme a shout. i'll toss it on highend3d sooner or later, when i have a moment.

OR, maybe i can train myself to blog more and actually post it with a description later... :)

Labels: , ,