Sunday, June 17, 2012

Creature WIP
   This is part of the manticore rig for a new show piece I'm working on, it should be properly animated and include Houdini effects. I've been working on this for a while now, I daresay the rigging is almost finished. All I need to do is to add effects on this creature ( model courtesy of Emmanuel Guevarra. )

   The way I rigged this wing is to first rig a single feather. It only needs three joints. Save this maya scene as featherA.ma, then import this file any number of times, better yet, reference it.

   Using a new maya scene and having a curve, this is the curve that all the feathers are going to be imported/ referenced on. use pointOnCurveInfo node to get the position of the curve, make sure to turn on percentage. We know that the parametric value of the curve is from 0 to 1,  so turn on the percentage in the node.
using a loop based on the number of feathers being imported, using a percentage calculation, we can determine each position on a curve:

numberOfFeathers= 27
for index in range( numberOfFeathers ):
   Length= 1.0

   number= ( Length/ numberOfFeathers * index )
   normalizedNumber= ( number/ Length )

  normalizedNumber returns the value that you need to plug into a pointOnCurveInfo parametric value, each number is unique by how many feathers you import/ reference. You can use this for a nice, even distribution of values and can be used for other methods.

  Finally, you can bind the curve to roughly 6 joints. The advantage to this is that you can rebuild any number of feathers without changing the number of wing joints.

  Rotations matter, so use the tangentConstraint on the imported feathers'  control groups. Duplicate your curve and raise it above your original curve and bind it to your wing joint. Build the locators along the curve to match the number of feathers using the percentage math. Have those locators be the objectUp for every tangentConstraint you have and Voila, you have a very stable wing rig.


Monday, June 4, 2012

HOUDINI


   I've started on a Houdini CG Workshop by Spencer Lueders, he is a great teacher by the way. 
This animation is my version of object's influenced velocity tutorial from spencer's class. The ball is animated in Houdini and I emit the particles only when it touches the ground. The particles then get influenced by the velocity of the object, plus the bouncy collision of the ground. I think it turned out rather well. I'm hoping to learn more of the Houdini particleFX. 

Thursday, May 31, 2012


New CreatureTD reel!

It's been a long, long time since the last time I've touched the google blogging tool. What can I say? I had no will and energy to take care of it.  I had a job, a life to live and so many distractions! My job at Rainmaker was over and in three days I was ready to travel Europe with my long-time girlfriend for almost two months.
Oh, that was the best two month vacation I ever had! After I came back I was ready to hit the ground running on working on my new demo-reel. Sadly, I didn't have much material to work from, so I had to choose the things I already had. I've uploaded a new demo reel that has a new footage of the short-film, shortened version of my old demo-reel and a python demonstration of useful utility such as controller construction.

Tuesday, January 3, 2012

Getting a vector from two objects.

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

# I named both my objects in maya scene 'tgt' and 'src' repsectively. tgtObj= 'tgt'
aimObj = 'src'

# definition for a worldSpacePosition matrix.
def getWorldPos( object ):
# utils needed to be imported for converting from a list to a matrix product.
util = om.MScriptUtil()

xform = cmds.xform( object, ws=1, m=1, q=1 )
# the 16 is the length of numbers in list. Specifically, a Matrix.
util.createFromList( xform, 16 )


return om.MMatrix( util.asFloat4Ptr() )

# get the worldSpacePosition of both objects.
aimM = getWorldPos( aimObj )

tgtM = getWorldPos( tgtObj )

# gets a pointMatrix product.
aimOrig = om.MPoint(0.0,0.0,0.0)
tgtOrig = om.MPoint(0.0,0.0,0.0)


aimOrig *= getWorldPos( aimObj )
tgtOrig *= getWorldPos( tgtObj )


#v = aimOrig * aimM.transpose()
#print v.x, v.y, v.z

print aimOrig.x, aimOrig.y, aimOrig.z
v = aimOrig - tgtOrig
print v.x, v.y, v.z