• Blog
  • Work
  • Resources
    • Rigs
  • Resume
  • Contact
I do technical things...

Volume Range Node: Max Edition

2/6/2014

0 Comments

 
I previously posted about my custom maya node that does some 'pose' based calculations, for use in driving deformations and what not.

I recently found myself wishing I had it to use in 3ds Max. So, I wrote one.
Below I'm just driving three point and orient constraint weights via the output of the node.
This is generally a bit simpler than my Maya version. It just defines two radius' and remaps the angle, between two matrix axis vectors, from 0-1 (or reverse). The Maya node allowed a definition of an ellipse shape for both min and max 'areas', so I could elongate the shape over one axis more than another. However I'm getting good results from just the circular shapes, so I'm happy for now.

To achieve this I wrote a Scripted Manipulator Plugin to draw the shapes, and to store the needed parameters for node associations, to control the shape and store the output. Then, inside the Scripted plugin, I'm adding a Scripted Controller, on creation, to the Output parameter.  The scripted controller is actually pretty simple:
   /* Float Scripted Controller code that handles 'pose space' calculations. It is assigned to the output of our custom node  The Float Script controller has two node variables assigned to it: 	srcObj : 	this is essentially 'this' object... the object this controller is assigned to 	targObj : 	The Target node that we are comparing axese to */  -- the return value... init with invalid value local theOutput = -1.0;  -- make sure the source node is valid if srcObj != undefined then ( 	 	-- make sure the target node is valid 	if targObj != undefined then ( 	 		-- this is the angle variable that will be converted to a valid 0-1 output 		local theAngle = 0.0; 		 		-- Grab this nodes z axis... we always use the z axis for the source (this) node 		local srcAxis = srcObj.transform.row3  		-- Here we are getting some 'settings' from properties on the target node... 		-- ..here we grab the target axis of the target node based on the drop down ui/property user specification 		local targAxis = [0,0,0] 		if srcObj.TargetAxis == 1 then targAxis = targObj.transform.row1; 		if srcObj.TargetAxis == 2 then targAxis = targObj.transform.row2; 		if srcObj.TargetAxis == 3 then targAxis = targObj.transform.row3;  		-- calculate the angle between the two axes..  		theAngle = (acos (dot targAxis srcAxis ));  		-- again grab more settings from the source node. Here we grab the min and max 		-- angle settings 		local minimum = srcObj.innerRadius; 		local maximum = srcObj.outerRadius; 		 		-- Here we are calculating the output based on another node property setting. 		if srcObj.ReverseOutput == false then(	 			-- default calculates output as a 0-1 value.. 'inside' the specified cone 			if theAngle < minimum then theOutput  = 1.0; 			else if theAngle > maximum then theOutput = 0.0; 			else theOutput = 1 + -((theAngle - minimum) / (maximum - minimum)) ;				 		)else( 			-- Reverse output is a 0-1... outside the cone..  			if theAngle < minimum then theOutput = 0.0; 			else if theAngle > maximum then theOutput = 1.0; 			else theOutput = ((theAngle - minimum) / (maximum - minimum)) ;				 			 		) 	) ) -- return / set the controller value theOutput ;   
It all seems pretty fast, so that's a plus. I was dubious of the speed needs for something like this using Maxscript and Scripted Controllers, but it seems decent.
0 Comments

Shadows Of The Past!

1/24/2014

0 Comments

 
So recently, on the webs of the net, dropped the first gameplay video of Middle Earth : Shadow of Mordor.

Middle-earth: Shadow of Mordor

I had the great privilege of working on this title while at WB in Seattle. I was a Rigger/Technical Artist on this for around a year, mostly in pre-production... Those orcs look very familiar :D.

It's really, really great to see it, and looking damned sweet. The guys there have really taken it on leaps and bounds over the last year and I'm really excited to see what my old comrades have done, when I get to play it.  It really is such a talented team. Fond memories.
0 Comments

Volume Range Node

3/25/2012

2 Comments

 
I've been playing about with Maya api, with python, a bit more. I took my experiences from this post on a bit further. The previous node i created, in the mentioned post, had a few downfalls as to useability. The main one was I could only define a radial offset from the comparison axis. I wanted to be able to define a more arbitrary shape for the angle comparison, essentially I wanted to elongate the shape, This would help me define more useable shapes to define as my target pose. If that makes any sense! Anyway here’s the node in action.

The node outputs a 0-1 blended value representing if the axis of the node is within the range set. I've just piped that output into a sphere for visual guide.

This node should aid my rigging in terms of deformations. My main reason for wanting to create this, was a solution to some armor rigging that is needed in work. Here's a super rough, quick test where I'm driving an aim constraint and its up vector node via three volume range nodes.
And here’s the obligatory bicep deformation shot. Again a very rough test, but should help give you the idea... like you needed it!
2 Comments

Pose space deformer - Vector Angle node, whatever it's called.

2/20/2012

0 Comments

 
I wrote another custom node, again beholden somewhat to this post, that basically calculates the angle between to vectors.

It takes in two world space matrices and compares specified axis (x,y or z) of the nodes. It returns a ranged, 0-1, value based on user set bounds (actually the node outputs a ranged angle, full angle and dot product). Its really pretty simple but should come in handy.

I have tried to make this setup before, using Maya utility nodes and some elbow grease, but It was always quite cumbersome and I was a bit off with the math, So I thought an api node would be a better bet. So I created a nice self contained node that does it all for you and gave the user a nice display.

Here it is in action. I piped the output into the scale of the cube for visual cue of the output. 
I think i can take this a bit further, I'm thinking of trying to make this calculate a u-v space bounds of a sphere, so i can cut a more complex piece of a sphere to calculate if the vector is inside. We'll see how far i get with that!
0 Comments

Draw on top Maya control node

2/20/2012

2 Comments

 
I wrote a custom locator node for use in my rigs a while back, thought I'd show it off.

As many other have, I'm sure, I read through this post and started playing about with the methods outlined.  It's a great tutorial for anyone looking to get into the python api, so check it out now! Yes, stop reading this and go there if you haven't already,

I took it a little further and wrote a node that could be used as an all purpose controller for rig setups. One of the main pluses of this node is that it can be set to 'draw on top', which is very nice for making aesthetically easy to understand rigs. Credit needs to go to Christopher Lewis also for help on the openGL depth methods for that.

I also wrote in the ability to change the draw shape, rescale the drawn shape, edit transparency and other settings.

I've been using it for a while now and its working great!

2 Comments

Face Rigging Test

7/7/2010

0 Comments

 
Here's a face rig that I created around two years ago. Its was a bit of a prototype, but i think it works quite well and is worth posting. It uses some nurbs shapes for the major parts of the face, and drives joints attatched via some hair follicle nodes. Nothing too fancy. The face for my Jedi character is based on the same type of rig, though that character has improved control of eye deformation and more control of the mouth region.

The animation below was done by Gary Talbot, a top animator at Rare.
One of the requests for this setup was that animation could be shared across rigs easily. This is acheived, in this instance, by manipulating the nurbs shapes and fitting them to the required face. Then its a case of reconnecting the joints of the face. Below is a test for this, though it has some issues it proved the concept would work across faces of different proportions and styles.
 
0 Comments

First Post

7/7/2010

0 Comments

 
test.....test :D

Welcome to my blog. hopefully I'll write something vaguely interesting, once in a while.
0 Comments

    Andy T.

    I do Tech things for Artist.

    Archives

    July 2014
    February 2014
    January 2014
    April 2013
    August 2012
    March 2012
    February 2012
    December 2011
    July 2010

    Categories

    All
    3ds Max C#
    3ds Max .net Api
    Animation
    Api
    Face Rig
    Maxscript
    Maya
    Mel
    Python
    Python Api
    Rigging
    Scripting
    Ui
    Work

    Links To Cool Folks

    Mic Marvin
    Alex Utting
    Rick Vicens
    Gary Talbot
    Richie Prado
    Felipe Nogueira

    RSS Feed