Sunday, March 25, 2012

Hair Script - Progress update #1 (kinda)

I've been working on a hair script for a while, and talking about it even longer.  I guess this is a good place to officially start the progress report that no one will read.

I've been working on a MEL version and a Python version of a tool that I'm calling Hair Do.  It will take a modeled set of Polygon or NURBS objects and create a realistic hair style based on the look of these modeled objects, henceforth referred to as "patches".  These hair patches can also be rigged with this tool with the click of a button, allowing animators to position and animate the hair however they like, or they can leave the hair dynamic, or they can blend and switch between the two modes.  If the user decides they want realistic hair, it can be driven by the animated hair patches meaning if the patches are animated, the realistic hair will follow.

Hopefully I'll think of a more concise way of saying this.

I've been making real progress with the MEL... I've been chickening out on the Python.  I wanted to do this in Python to force myself to get comfortable with it.  I'm a sink or swim kind of girl.  Diving in the deep end of the pool is the fastest way to learn how to swim.  But when progress was slow I started to do it in MEL, then "translate" it to Python later.  Now, I realize I haven't done anything in Python for over a week.

*shame*

I'll get back on it.  I want to honestly say I have a good grasp on Python if someone ever asks me.

So far, by the things I've crossed off my to do list, I'd estimate that my script is about 8% - 10% done.  I know that seems small, but there's a LOT of ground to cover, and that ~9% represents a couple hundred lines of code, so I can't complain.  I'm working super hard so that I can include a working version of it on my demo reel.  So far, I've come across two really difficult things.

1.  Converting polys to NURBS.   That in and of itself isn't hard.  You just do Polygons to Subdiv, then Subdiv to NURBS.  Then you can rebuild the NURBS object with a user specified value for the U and V spans.  It's making the end result look good that's making this whole process a pain in the... booty.  So far my results on semi-complex patches have been horrible at best.

2.  If the user wants to keep their polygon hair and rig it, I still need to figure out a way to automate the rigging process.  I think I have a solution, but it's still a pretty jumbled in my head. I think I can do this:

  • Use the method outlined in #1 to create NURBS surfaces, identical to the polygon meshes.
  • Create then extract the center curve of each NURBS surface.
  • Add/delete knots so that the number of CVs matches the amount of joints the user wants on their rigged hair.
  • Place a joint on each CV.
  • Smooth bind the joints to the polygon patch.
  • Delete the unwanted NURBS objects (or keep it, depending on other things).

Then my script will just pick up, doing what it does which is - make it possible to manually AND dynamically animate this hair, and make it possible to switch and blend between manual and dynamic mode.  Funny as it sounds, THAT'S the easy part!  But that bullet list just looks crazy to me.  There HAS to be a more efficient way of doing this.  I guess it doesn't matter as long as it works, but I'll keep looking into it.

Anyway, I've been up all night working on this.  I'll have come back to it with a set of fresh eyes.

Working with MEL all night on a Saturday night...
Pretty much.

~Melissa

Thursday, March 22, 2012

The first thing you see

I've been looking at a lot of demo reels, personal sites and things of that nature lately.  Many people have blogs attached to their main site, but I use my blog as my main site.  Some people have their blog entries on the main page, and others have their demo reels on the main page.

Should my demo reel be the first thing people see, or should my blog entries be #1?  I've been thinking about that a lot lately, and I'm not sure what I should do.  I might make my demo reel this sites main attraction, I might not.  I haven't decided.

I don't expect a response or anything, but if you come here and randomly see my demo reel filling the screen instead of my rants, don't say I didn't warn you.

~Melissa

Monday, March 19, 2012

Back to the grindstone!

I drove back to my university for a visit, and decided to stay a week.  Not only was I able to grab the rendered version of the shots in my demo reel, I was able to start doing cloth work for a short they're working on.  It feels great to be working on actual scenes again!  I have to confess, I haven't done any real cloth simulation since I graduated so this has been a lot of fun.  I also have to figure out how I want to simulate this whip.  I'm thinking a hair curve would work better than nCloth, but we'll see what I can pull out of my hat.

^_^ *squee*

...don't look at me like that.  Simming hair and cloth IS fun!

I've also been hard at work creating the MEL version of my hair styling tool.  The UI is almost done, but that's the easiest part of the entire thing, so that's not saying much.  Anyway, let's hope I can finish it for SIGGRAPH.  And let's hope I can actually go to SIGGRAPH.

~Melissa

Thursday, March 15, 2012

SIGGRAPH - Take 2

Last year I really wanted to go to SIGGRAPH and pass my demo reel around, meet new people, see the sights and all that jazz, but my truck decided to DIE and the $1,100 dollars I'd saved vanished over night.  Well, I hope I can make it this year.  I'm working on a Python/MEL tool that will be the crown jewel of my demo reel if I finish it.  If I don't get hired or anything, I hope the pro's can give me tips on my demo reel, which I hope I can finish updating by the end of April.

~Melissa

P.S.  I haven't forgotten about that nCloth for Novices video.  I'll fix it, I swear!

Monday, March 12, 2012

AMAZING facial rig


I love everything: animation, hair/cloth simulation, lighting, rendering... but I have such a soft spot in my heart for rigging.  Admittedly, my knowledge on the process is pretty basic but I know enough to know something amazing when I see it.  The Cenk character by Ozgur Aydogu is great on it's own merits, but this facial rig is one of the best I've seen.  I absolutely LOVE the procedural breathing and free transform head parts features.  The character itself is very expressive, facial deformations are spot on and the animation... so, so good.  It's a shame to see good facial rigs subjected to horrible test animation and I'm so glad that doesn't happen here.  From beginning to end, every aspect of character development and creation looks like it was handled with great care and the result is a top notch product.

I'd LOVE to see a full body rig at some point.

I'll stop gushing now.

Be sure to check out his site!
http://www.ozguraydogdu.com/

~Melissa

Wednesday, March 7, 2012

Ranting and Raving! nHair!

I'm excited about the nHair test the Autodesk people have released.  Have you seen it?



If it comes with styling tools, I'm pretty sure I'd just die of happiness.

Why should we care about this?  Because Maya hair/fur, as it is now, sucks.  And not in the fun way.

[Begin incomprehensible rant]

1.  Maya hair and fur distribution is TOTALLY UV dependent.  You have to spend hours laying out UV's if your character has full body fur.  If you just have to tweak your UV's, you run the risk of destroying your hair/fur style.  I don't want to have to layout UV's just to style hair!

2.  Styling Maya hair and fur requires the patience of Job.  It takes forever just to figure out how to do it.  In fact, I'm convinced that it's impossible to style Maya hair just using Maya hair tools.  There are no styling tools whatsoever.  Ok, yes, there are constraints, fields, collision objects (they suck)... but there are no brush and comb  to help move hair around.  Adjusting length is a pain.

There are two ways that I've come across that make for good styling (you're welcome internet):

A.
  • Model a lo res hair volume with NURBS (the man in the example video uses curves, but my way is faster).
  • Draw guide curves on this surface.
  • Convert these curves to hair guide curves.
  • Color, texture, simulate the hair.
I commented on the video above.  This method is brilliant.  You should look at his demo reel.  (He worked on Harry Potter: Deathly Hallows pt. 1 which is so cool!!)


B.
  • Model hair patches using NURBS.
  • Duplicate the curves.
  • Convert these curves to hair guides.
  • Simulate the hair.
While this is a video demonstrating a MEL tool that a man wrote, everything that's done there can be done manually, and he pretty much follows the method I outlined.  The great thing about this is, you can change the hair on the NURBS level and the actual hair will reflect this change.  This method takes longer, but you have the option of rigging this hair which is a HUGE plus.

I wish I could figure out how this man scripted finding the center curve for each hair section, but he speaks Japanese so I can't ask =(  Really, I'm stumped.  The center curve can't be the same value all the time, so how did he do it?!  Grr...

C.
  • Style a series of curves.
  • Convert these curves to hair guides.

I don't have a video for that one.  I find that this is what most people do so.  This way is the hardest to me.  I don't like doing it.

The problem is, you shouldn't be forced to do any of those things.  Shave and a Haircut allows you to style and cut the hair right out of the gate with actual styling tools (taking the hint yet, Maya?).  UV's?  Fugetaboutit! Just style the hair and get to UV's later!  This isn't to say that UV's don't matter at all, but Shave does an amazing job of distributing hair when UV's still look like this:  "RTEBNHREREBTRtrntiorngreoin02942"

I'll admit that Maya's hair system is still top dog when it comes to simulation, but I don't even care at this point.

So why not just get Shave and a Haircut?

People shouldn't have to!  Maya costs 3x more than the average computer.  It has a hair system.  The hair system should work!  Shave and a Haircut is good, but if I want to style my hair with it, but simulate it using Maya's hair system, it takes an act of congress.

I'm not even going to dignify rendering with a rant.  I just hurts too much.  Just bite the bullet and get Renderman if you can.  I can't, so all my hair looks like crap.

Fur.  Oh fur.  Your UV's have to be impeccable, like the Queen of England, or your fur will look horrible.  The only way I know of to style fur is to paint maps and icky things like that.  Bleh.

[End rant]

What was I talking about?  Oh.  nHair.  I'm happy for it.  It's been on my wish list for 5 years, so I hope it does come out with Maya 2013, as well as a collapsing feature in the script editor, nFur, burn Mental Ray at the stake, and create an nCloth Deformer.  I'd looooooove that.  I'm tired of using Wrap Deformers.  They get the job done, but they're not the most accurate things in the world and you can get weird problems with them.

~Melissa

Thursday, February 9, 2012

Discouraged

The title says is all.  I'm a little discouraged today.  Why?  I feel like no one wants a Hair/Cloth/Fur TD.  I love what I do and I think I'm good at it.  I'd love to work on hair, cloth and fur for ever and ever, but I see so few people looking for character fx artists.  I love effects (especially particle effects), I love rigging, and I think if I were to buckle down and do absolutely nothing but FX tests and rigs for, like 9 months, I could build enough on what I already know and produce good results and find a decent entry level job.  But I don't want to get a job doing something that I just happen to know how to do well.  I want to get a job doing something that makes me happy.

Maybe I'll find something at SIGGRAPH this year.

I'll stop whining now.

~Melissa

Friday, February 3, 2012

MEL Script -"Unfreezing" Transformations

Someone on CGTalk had 100+ objects in their scene where the transformations had been reset.  He needed their world space positions restored.  Plainly speaking, he needed to unfreeze transformations.  Technically that isn't possible, but there's a way to cheat everything.

There's probably a more efficient way to do this.  If someone reply's to my post on CGTalk with a better version, I'll post their version, credit them, and provide a link to their post.  In any case, here's the "Unfreeze Transformations" script.  I hope it helps someone.


//Get all of the selected items, and the size of the selection
string $selection[] = `ls -sl`;
int $size = size($selection);
int $i;
//for each object in the selection, do the following things:
for ($i = 0; $i < size($selection); $i++){
     //Create two locators.  #1 stays at the origin (0 0 0) while #2 moves to the center of the selected object.
     string $zeroLoc[] = `spaceLocator`;
     string $loc[] = `spaceLocator`;
     string $ptCon[] = `pointConstraint $selection[$i] $loc`;
     string $orCon[] = `orientConstraint $selection[$i] $loc`;
   
     //Get the translation and rotation values of the locator we just moved.  These are the values that we'll give to the object in a few steps.
     float $tran[] = `xform -q -t -ws $loc`;
     float $rot[] = `xform -q -ro -ws $loc`;
   
     //Delete the constraints, we don't need them anymore
     delete $ptCon;
     delete $orCon;
   
     //Move the selected object to the 0 0 0 locator (that's at the origin), then delete the constraints.
     string $ptConZero[] = `pointConstraint $zeroLoc $selection[$i]`;
     string $orConZero[] = `orientConstraint $zeroLoc $selection[$i]`;
     delete $ptConZero;
     delete $orConZero;
     //Freeze Transformations on the object.  Now the objects values are zeroed out and it's at the origin  
     makeIdentity -apply true -t 1 -r 1 $selection[$i];
   
     //Move the object back to it's original position, using the translation/rotation values from the first locator we created and moved.
     setAttr ($selection[$i] + ".translate") $tran[0] $tran[1] $tran[2];
     setAttr ($selection[$i] + ".rotate") $rot[0] $rot[1] $rot[2];
   
     //Delete the two locators we created, we don't need them anymore.
     delete $zeroLoc;
     delete $loc;
}

Thursday, January 26, 2012

Two new MEL scripts

I recently finished two MEL scripts that I hope will help you guys out.  Both of these are for Windows users.  Thanks to the kind people at CGTalk that helped me when I was stuck.

Snapshot
1)  Snapshot.  Creates a snapshot of the active viewport and saves the image in a Snapshot folder, located in your project directory.  This should save you the hassle of taking and editing screenshots.
NOTE:  Because of a glitch in Maya 2012, the only image format you can have is an .iff.  I'm working on this.  Hopefully I can get a workaround working soon.


Match It!
2) MatchIt!  Will match the translation/rotation of one or more objects to your source object.  You're able to choose the affected axes.

Let me know if you want one of them and I'll send them to you.

~Melissa

PS  Sorry about nCloth for Novices #2.  I noticed and error and deleted it.  It should be up again shortly.

Wednesday, January 4, 2012

Two new cloth tutorials

I told you I'd post these eventually.  Two more nCloth for Novices tutorials.  Watch them in full HD!

#2 just talks about setting up your scene for cloth simulation.  #3 talks a little about modeling cloth and if you should use quads or triangles.  I think digital tutors did something like this, but I rambled on about other things during my tutorial/talk.  If you have any comments or questions, let me know.  If you want me to do a tutorial on something, feel free to ask me.

~Melissa