Friday, November 1, 2013

Defending my demo reel - How I started simulating cloth and hair

I can't believe I haven't made a post since February!  My how time flies!

I mention this a lot in person, but I don't think I've ever gone into how I got into hair and cloth simulation.

The TL:DR answer: I fell into it by complete chance.

The thick of it is, on The Rock in the Road, the project that comprises 70% of my current demo reel, was an animation project that I worked on as a junior and senior.  I was an effects major and I wanted to learn how to do effects on the project, but the only effect needed was cloth simulation.  I didn't even know cloth simulation was a thing!  My introduction to nCloth was about 10 minutes and then I was told to do the cloth simulation on a shot.  It was an unmitigated disaster.  I had no idea what I was doing and the documentation available online was minimal at best and definitely not aimed at total beginners.  It was a humiliating, devastating process for me.  Unable to finish shots caused my grade in the class to plummet.  I had nothing to show while my peers were learning and completing all sorts of things.

This went on for an entire semester.

I was determined to have not wasted my time.  I was determined to figure this out.  During the summer, I was able to work on the project and I'd learned just enough to work on a shot, but during the entire summer I still didn't successfully finish one shot.  Early in the fall semester, they were finally approved.  I later found out that I had been struggling on two of the hardest shots in the entire short!  The next shot I was assigned, I finished in less than ten minutes.  The same for the next one.  And the next one.  And the next one.  After all of my sweat and tears, I'd finally gotten the hang of it.  I can't tell you how rewarding it was to have my teacher (a total genius and a total perfectionist by the way) approve my shots.  It felt so good!

I'd become addicted to the struggle.  Figuring out what parameters to change in order to get the cloth to behave a certain way was like working on a puzzle.  I love puzzles.  I love solving them.  I love how it feels when it's finally been solved too.  That's how I feel every time I work on a cloth shot, no matter how complex or simple it is.  The same goes for hair simulation, since the process is very similar.

I can't tell you how much I love what I do.

I'm still looking for a place to do it full time, but hopefully that'll come along at some point!

My demo reel hasn't gotten a LOT of attention, but many of the people who see it ask me a certain question quite often.  It's about the cloth in my reel, and why it seems stiff.

The answer to that:

During my struggles, I saw the midnight showing of Up.  Like Rock in the Road, the characters of Up have clothing that looks very thick.  Look at the main characters jacket for goodness sake.  Look at the thickness of his lapels and sleeves!  Cloth that thick wouldn't billow in the wind, that was my reasoning at least, and imagine how validated I felt when I saw how the cloth reacted in Up.  It was very understated, but very true to the model.  The end result just blew me away.  I loved it!

That was my intention in Rock and the Road.  It's not that I don't know how to make skirts flow and capes billow, it's that a 7 inch thick cape 'wouldn't' billow like an average cape would, in my honest opinion.  Sure it would move, just not a whole lot.  I'm proud of the work on my demo reel, and I hope to add more projects to it soon.

~Melissa


Monday, February 11, 2013

Python - Keeping things brief AND readable

I've always believed that clarity should trump brevity when it comes to scripting.  This is especially true of Python, since it's already so readable.  That's why some things I've written area little longer than they really need to be.  However, if I stumble across a way to keep things brief and readable, I try to use it as often as possible.

For instance, in Maya with Python this is how you check for a window and delete it if it exists:

if mc.window(winName, exists = True):
        mc.deleteUI(winName)

But you could do the same thing with less typing:

try: mc.deleteUI(winName)
except: pass

I also like to check the version of Maya that the user is using to avoid conflicts and such.  I like dockable UI's but versions of Maya older than 2011 can't support them.  So if the user has Maya 2011+, the will dock, otherwise it will float.  I've been doing it like this:


class ExampleClass():
  def __init__(self):
 
  self.dock = ""
 
         #Get the users version of Maya
  self.v = mm.eval("getApplicationVersionAsFloat")

  if self.v >= 2011:
  self.dock == True
  else:
  self.dock == False

But you can do the same thing with FAR less lines:


class ExampleClass():
  def __init__(self):

  #Get the users version of Maya
  self.v = mm.eval("getApplicationVersionAsFloat")
  self.dock = True if self.v >= 2011 else False

And it's just as readable.
EDIT:

When I deleted my dockControl, sometimes my window wouldn't delete.  By using a try, escape and else clause you can ensure that everything will be deleted if it exists in your scene.


import maya.cmds as mc
import maya.mel as mm

class ExampleClass():
  def __init__(self):
  self.winName = "exampleWin"
  self.v = mm.eval("getApplicationVersionAsFloat")
  self.dock = True if self.v >= 2011 else False

  self.exampleUI(self.winName, self.dock)

  def exampleUI(self, winName, dockOption):
  try: mc.deleteUI(winName + "_dock")
  except: mc.deleteUI(winName)
  else: pass

  exWindow = mc.window(winName, widthHeight = [300, 300])
exLayout = mc.rowColumnLayout()

  if dockOption:
  dockWindow = mc.dockControl(winName + "_dock", area = "right", allowedArea = "right", content = exWindow)
  else:
  mc.showWindow(winName)



~Melissa


Friday, December 14, 2012

Styling Hair Tutorial [External]

http://area.autodesk.com/tutorials/the_blue_project_skin_sculpting_and_hair_styling

There's a really great tutorial on Area that's been there for a while.  It briefly steps you through texturing a character in Mudbox, then gets into creating a hairstyle in Maya.  Please note that it's for Shave and a Haircut, not Maya Hair.  It's really great and worth the look if you're just getting started with Shave and a Haircut.

~Melissa

Friday, November 16, 2012

[Python] Getting an intField to only accept odd numbers

I know it's odd (pun!), but I needed to have an intField only accept odd numbers.  Initially, I'd done something like this:

import maya.cmds as mc def exampleUI(): exampleWin = mc.window() mc.columnLayout() testField = mc.intField(value = 63) number = mc.intField(testField, query = True, value = True) mc.button(label = "OK", command = lambda *args: exampleDef(number) ) mc.showWindow( exampleWin ) def exampleDef(number): if number % 2 != 0: print "It's odd! Yay!" else: print "Your number is even, prepare to die!"

If the value in the intField was odd, continue. If the value was even, error out and prompt the user to change it.  But it didn't do what I wanted, which was to force an odd number.  I didn't know if this was possible, but it sounded like it should have been.  I asked for help on the CGTalk Maya Programming forum and I learned two things.
Click here to see the thread

1) Use the intfield's changeCommand flag.  After the value in the field changed, it would run another block of code that would check whether or not the number was odd.  In the event it found an even number, it would either reset the value or increase the number by 1.

2) Another person agreed with the solution above and took it a step further.  He suggested this, and I think it's brilliant:

def setMyOddInt(integer): oddInt = integer/2*2+1 mc.intField('oddIntField', e=1, v=oddInt) def exampleUI(): exampleWin = mc.window() mc.columnLayout() testField = mc.intField('oddIntField', value=0, changeCommand=setMyOddInt) mc.showWindow( exampleWin )

I really like this bit here "oddInt = integer 2*2+1".  I wondered, why not just check to see if the number was even, and then say + 1 and return the new value?  You can do this and it will work but it would take three lines of code.  Here, it was done with one.

When you divide an int, most (if not all) languages will just round down to the next whole number.  Example, 3/2 will equal 1, not 1.5 (that would be a float, not an integer).

If we continue to use the number 3 as our example, 3/2 = 1.  Then 1*2 = 2 and finally, 2 + 1 = 3.  So you'd end up with your original odd number, 3.  But say we had an even number: 4.  4/2 = 2,  2*2 = 4 then 4 + 1 = 5.  See?  "integer/2*2+1", will always produce an odd number and this number will be placed into the intField automatically because of the changeCommand flag.

In the end, either way works.   As a side note, if you wanted to round down, you could just say -1 instead of +1.

Fun stuff.

I needed this for my hair script, which I'm converting to Python.  Hopefully I'll have more updates on that soon.

~Melissa

Tuesday, November 13, 2012

CGSociety Article - Rock in the Road

Rock in the Road


There's a really great CGSociety feature of Rock in the Road that talks about the road to starting and completing the project.  There's also a forum discussion if you're interested.  If you haven't already seen Rock in the Road, take a few moments and watch it.

~Melissa

Friday, October 19, 2012

Cloth - Level of detail

How much detail should your simulation mesh have?  When do you have too little?  When is it too dense?

That's a good question.

I saw this image a week or so before I went to SIGGRAPH:

It's one of Merida's simulation gowns from Brave.  I think they use a proprietary simulation software (it looks like some super variant of Qualoth to me), but look a the detail they have in the final mesh.  When I went to SIGGRAPH I was lucky enough to ask Claudia Chung (!!!) a question.  What are their simulation times like?  Did they have to wait minutes and minutes per frame, or was it a little faster?  She told me that if it was taking longer than a minute or two a frame, then something was very, very wrong.

For people with average computers like me, I show them this:



(click to view the original size)
Which one of these resembles your simulation mesh?

#1 Doesn't have enough information.  You can work with it, but it probably won't fold well over corners and you won't get nice billowing and wrinkling in your cloth.
#2 Is great and my personal choice.  Sim times are good, and you can get great detail (wrinkles, billowing as the character moves, nice overlap) out of it.
#3 Is too much.  If you have a fantastic computer, you might be able to pull it off.  Maybe.
#4 ... I hope your computer has a will.

I will say this.  Not every cloth object needs to have the same amount of detail.  If it's something that's not seen as much (like an underskirt), see if you can get by with less.  The same goes if your final cloth mesh is thick.  Thick cloth (like leather) wouldn't billow in the wind and fold in on itself as much as something thin (like silk), so you could probably get by with less detail.

EDIT:
Here's something else to keep in mind.

As a reader and colleague pointed out, the poly count of your mesh is also linked to how your simulation works, not just it's visual level of detail.  Take for example the four planes above.  The same settings wouldn't work for all four planes.  If you get the first one to work with a stretch resistance value of 30, the second one will probably need a stretch resistance value of 65 or 70 in order to behave, and so on and so forth.

~Melissa

Tuesday, October 2, 2012

Revisiting dockControl and Python classes

I hate floating windows with the passion of 1,000 red hot suns.  There was nothing I could do about it in version of Maya older than 2011, but now I have the ability to dock windows.  I talked about this in an earlier entry.

I've been watching a series of building UI's in Python by Jeremy Ernst that is just fantastic (and he hates floating windows too!  Yay!)  He uses the dockControl command religiously after video #4.  It's fantastic, but he never really mentions the fact that your script will error out if you use dockControl in a version of Maya that's older than 2011.  He does briefly touch on the fact that you can make docking true or false, but I thought I'd go ahead and share what I did.

If you're using Maya 2011 and higher, the window will dock.  If you're using Maya 2010 or lower, the window will float.

This may not be the most "efficient" way to do this, but it works.  If you know of a better or cleaner way to execute this, feel free to tell me.  I'm not offended if someone sends me an e-mail that says "idiot, you could do this in one line if---"

If you have no idea what the widgets dictionary in this script does, watch Jeremy Ernst's Building Maya Interfaces with Python video series, specifically video #6.  That's where he introduces it.

import maya.cmds as mc
import maya.mel as mel

class suitSuite():
    def __init__(self):
        self.widgets = {}
        self.winName = "suitSuite"
        self.dock = ""
        self.v = mel.eval('getApplicationVersionAsFloat')
        if self.v >= 2011:
            self.dock = True
        else:
            self.dock = False

        self.createUI(self.winName, self.dock)


    def createUI(self, winName, dock):
        #If Maya version is 2011 and above, create a dockable window, else create a floating window
        if dock == True:
            if mc.dockControl(winName + "_dock", exists = True) or 
mc.window(winName, exists = True):
                mc.deleteUI(winName + "_dock")
        else:
            if mc.window(winName, exists = True):
                mc.deleteUI(winName)

        self.widgets["window"] = mc.window(winName, title = "Suit Suite v. 0.1", width = 350, height = 500)
        self.widgets["mainLayout"] = mc.columnLayout(width = 350, height = 500)
        if dock == True:
            mc.dockControl(winName + "_dock", label = "Suit Suite v. 0.1", area = "left", allowedArea = "left", content = self.widgets["window"] )
        else:
            mc.showWindow(self.widgets["window"])



~Melissa

Monday, October 1, 2012

Python and MEL

I don't take full advantage of the fact that Python is an object oriented language.  I'm so used to the procedural MEL that I limit myself in Python.  I was writing a hair script in MEL and decided that Python would be better, but I ended up just writing it in Python the same way I'd done it in MEL.  After figuring out Python's classes and going back to my hair script... wow.  Classes make things so much easier.  I'm still muddling through, but I'm so excited.

I feel like a new world has opened up to me ^_^

~Melissa 

Thursday, September 20, 2012

Understanding Classes in Python

I love Python, but there are some things about Python that I've really been struggling with.  Mainly I'd been struggling with classes, __init__ and the use of self as an argument.  When I saw something like this:

class Introduction:
    def __init__ (self, name):
        self.name = name

I had a small stroke.  What does that mean?  What is the purpose of a class?  Why does "self" keep popping up everywhere?!  I just didn't get it, and every explanation I read was so technical and hard to understand.  Well, I'm an auditory learner so I went to YouTube to see if anyone had explained it.  When I heard this man's tutorial, everything clicked.  If you're having trouble like I was, I think you should take the 12 minutes to watch and listen to this video.


~Melissa

Wednesday, September 19, 2012

This is my life


I feel like this right now.

I hope that one day I'll make it, in the meantime I'll keep brushing up on my Python.  I love Python.  Once I get the hang of classes, I'll be unstoppable!

~Melissa

Monday, September 10, 2012

Rock in the Road - Animated Short

The project in my demo reel is Rock in the Road, a 12 minute animated short that I had the pleasure of working on when I was in college.  It's finished and available to view.  I hope you'll enjoy it in HD and share the link with your friends and family!




In a faraway land, a king governed his realm so well that his people were in want of nothing. As the years passed, the king noticed his people had become lazy and selfish, so he devised a simple test to show them the value of others. As a young boy unknowingly faces the challenge, the future of the kingdom is built on the strength of his character.

In the fall of 2007, Southern Adventist University’s animation students set out to create a three-minute short film based on a simple parable. This artistic venture, intended to be completed during one year, turned into a five-year journey. The result is the twelve-minute animated short, "Rock in the Road."

The scope of the project grew as the team became interested in telling a longer form story. But as students who started it graduated, and other projects were begun, finishing the short became its own “rock in the road.” However, professors and students persevered, realizing the completion of the film would benefit everyone who was involved. A small, dedicated crew worked on it between other projects to finish the film at the end of the 2012 school year.

Saturday, September 8, 2012

Brave thoughts [rant]

Yeah, I'm a copy cat.  A friend reviewed Brave.  I'd been meaning to do the same, but I didn't put fingers to keys until she did.  Oh well.



Brave was a fantastic, beautiful movie that everyone should see.  More talented people that I have reviewed this movie, so I'm not going to.  But I had three issues with the movie that I haven't seen anyone else mention.  Maybe this isn't the place for it, but here we go:

(MASSIVE SPOILERS!!)

1) I never felt like Merida was the star of her own movie.  Just when I was getting comfortable with her character on screen, Queen Elinor stole the show and never gave it back.  The best example of this is the ending.  Merida doesn't get to have a showdown with Mor'du, the movie's antagonist.  Queen Elinor is the one who fights and defeats him.  I would have loved to see the two take equal part in the battle, but it just didn't happen and I HATED that.

I think Brave could have been a better story if it focused on Queen Elinor from the start, or if the creators of the movie put Merida and her mother in a situation where they both had the same risks/rewards.  As it stands, Elinor had the worst of it.  If Merida didn't reverse the curse, Elinor would remain a bear forever and Merida would have one heckuva guilty conscience.  So fairly early on in the movie, I feel more sympathy for Queen Elinor and I'm mad at Merida for putting her in this situation.  I don't think this is what the creators were going for.

2.  The creators didn't take advantage of this huge world they created.  We get sweeping views of a vast country and we hear about other clans yet Merida never travels more than 10 miles from her house.  (Ok, that's a random number I pulled from the sky, but you get my meaning).  It would have been nice to see Merida and her mother travel to more places than the cabin and the ruins.  It also would would have been nice to see more from Merida's three suitors and their clans.  To those who would argue that you can only get so much into one movie, I call BS.  Look at how many unique locations they had in The Incredibles, or even A Bug's Life.

3.  Mor'du is the most random, USELESS antagonist ever.  I don't think his character was integrated into the story well.  In my opinion, his presence in the movie wasn't needed at all.  If the witch who gave Merida the cursed pie said, "to break the spell, you need a tooth of Mor'du!!" or something random like that, I'd get it.  As it stands, I feel like he was just there to add an element of action and danger to the movie.  That in and of itself isn't a bad thing, but I just felt like he was tacked on as an afterthought.

Nitpicking issue 3.5:  Why is it that whenever a woman is a lead in an animated feature, there's an issue with marriage/a man (i.e. Jasmine, Cinderella, Ariel, Belle, [I can keep going]) .  Why couldn't the issue be something more interesting?  Leave behind her dreams of freedom and leading the clan?  Not wanting to go through a rite-of-passage ritual of killing a bear (which, by the way, would have been a fun way to introduce and explain Mor'du).  Heck, I could have settled for Merida not wanting to take up tap-dancing.  But no, the straw that broke the camels back was the thought of an arranged marriage.

Shoot me.

Wednesday, August 15, 2012

What the [curse word] is a Cloth/Hair TD?

It never fails.  When I try to explain just what I do, people look at me like I'm eating a cheese and whipped cream sandwich.  It's hard to explain to people that from beginning to end, dozens of people, not just me, had their hand on one shot to make it what it is.  It's even harder to explain my title because my title isn't concrete.  Depending on where I work, I could be called a:

  • Character Effects TD
  • Technical Animator
  • Hair/Cloth TD
  • Character TD
  • Simulation TD
So I think I can kill 3 birds with one stone with this post.  What are other peoples titles?  What is a Cloth/Hair TD?  What does a Cloth/Hair TD do?

Before I do that:

What's a TD?
Ask 10 different people and you'll get 15 different answers.  TD stands to Technical Director, and it's usually associated with a job that's, for lack of a better explanation, more technical than artistic (for example, an animator isn't called an Animation TD, but someone who creates rigs, a highly technical job, is called a Character TD).  It's a common title and can be misleading because Technical Directors aren't necessarily directors and some studios don't even use the title.  A Lighting TD can also be called a Lighter.  An Effects TD can also be called an Effects Artist.  It's silly, but hopefully you get the idea.

So, about who does what.  We can just go in production order.  This is the [simplified!!!] production pipeline.  Keep in mind that many of these process overlap, but I'll try not to complicate things.

Pre-production

1) Story, Script - Who does this?  The Writer and Screen Writer.  I feel bad for not putting a description here, but it's fairly self explanitory.

2) Concept Art - Who does this?  A Visual Development Artist.  They handle character design, environment design, sometimes they even handle color.  This is a broad field that can be broken down further.  For instance, a Character Designer handles how a character will look.  An Environment Artist handles how the environment, buildings and scenery will look, but it's all under the umbrella of Concept Art.  In a small studio, one person can be in charge of all of this.  In a large studio (Pixar, Disney, Dreamworks), you get more specialized.
Concept art of Merida(left) and Elinor(right) from Pixar's "Brave"


3) Story boarder - Who does this?  A Storyboard Artist.  After the script is [somewhat] finalized, the story boarder draws the story in panels, almost like a comic strip.  For a feature length film, you can end up with thousands and thousands of drawings.
Some storyboards from Pixar's "Brave"

4) Layout - Who does this?  A Layout Artist.  They stage each shot.  What that means is they place props, characters, the camera in the scene.

5) Modeling - Who does this?  A Modeler.  Modelers are responsible for actually sculpting/creating a character in 3D, using the 2D pencil, ink and painted character drawings as reference.  Modelers are also responsible for creating props, environment sets (buildings, cars, spaceships, mountains, trees, you name it), and pretty much any object you see in a 3D movie.
Merida's model and hair curves.


Production

6) Rigging - Who does this?  A Character TD.  A Character TD gives the character the ability to move by "rigging" it, or giving it a skeleton and muscle system in 3D.  Before the rigger/Character TD touches a character, the character is just a statue in 3D, without the ability to do anything.  This is a very, VERY technical field to go into.
An example of a character's rig.


7) Animation - Who does this.  An Animator.  An animator gives a character life.  They actually make the character move, react, all that jazz.

8) Hair/Cloth/Fur Simulation - Who does this?  ME!!!!  A Character FX TD.  Character FX TD's make hair, cloth and fur move on a character.  Sometimes, other things are simulated too, like ropes, chains, grass, leaves in trees, and some props.  Depending on where you work, they actually construct and tailor the characters clothes in 3D.  (Pixar has Tailoring TD's to do this specifically.)  Sometimes the people who do character simulation are also responsible for scene clean up.  They make sure that nothing is going through itself, things aren't jittering or slipping, or anything like that.


Animation tests as well as cloth/hair setup and tests.

Special Effects - Who does this?  An Effects TD.  Particles, dust, water, fire, smoke, lightning, etc., etc., etc.    are handled by them.  This is also a very technical field.

Lighting - Who does this?  A Lighter, or Lighting TD.  They're responsible for actually placing lights in the scene.
Left - Unlit, Right - fully lit


Rendering - Who does this?  Titles vary.  Render I/O Admin?  I'll admit that I'm not sure of their titles.  This is a hard process for me to explain, so I won't even try.  This is an explination from Justin Slick:  "Rendering is the most technically complex aspect of 3D production, but it can actually be understood quite easily in the context of an analogy: Much like a film photographer must develop and print his photos before they can be displayed, computer graphics professionals are burdened a similar necessity.
When an artist is working on a 3D scene, the models he manipulates are actually a mathematical representation of points and surfaces (more specifically, vertices and polygons) in three-dimensional space.  [They] translate the scene from a mathematical approximation to a finalized 2D image."

Post Production

Compositing - Who does this?  A Compositor.  They're responsible for bringing together all of the visual elements that were rendered.  Effects, animation, backgrounds are all combined into one coherent image.

Video Editing - Who does this?  An Editor.  Again, this is an answer that far surpasses what I could come up with: "An editor polishes and refines, he directs the focus of the story or article or movie along a particular course. He cuts out what doesn’t fit, what is unessential to the purpose of the story. He enhances the major points, drawing attention to places where the audience should focus."

Sound Editing - Who does this?  An Audio Engineer.  Fairly self explanatory, but an audio engineer is responsible for the sound and sound editing.  There are people who are specifically responsible for sound effects though.


Did I skip a few things?  Yes.  Did I talk WAY more than I should have?  Probably.  But hopefully that'll start to answer some questions.

~Melissa

Monday, August 13, 2012

Claudia Chung, you're my hero!

And I got to meet her when I was at SIGGRAPH!

Know this about me: I don't like speaking to people I don't know.  I'm award and tall and I feel like I'm looming over people like some weird gargoyle statue.  But I really couldn't forgive myself if I didn't say hello. I pretty much ambushed her and introduced myself.

What I wanted to say:
You're my hero!  You're the smartest, most talented, most amazing woman ever!  I want to get a job at Pixar  just so I can look over your shoulder and learn EVERYTHING!!  o___o The hair and cloth in Brave was AMAZING!!  Teach me everything you know.  RIGHT NOW!!!

What I actually said:
Hi, I'm Melissa.  You're such an inspiration to me.  ...bye.

Still kind of creepy, right?  But at least I got to say hello.  I wanted to take a picture... but that would have been too much.  Or would it?  Yeah, probably.

Squee!!  #geekingout

~Melissa

P.S.
Read this interview with her:
http://www.artofvfx.com/?p=2866

More Brave stuff.  Good reading.

Wednesday, August 8, 2012

New Demo Reel!

...at some point today.  I don't have internet access in my hotel, so I'm using SIGGRAPH's wireless service to upload my reel.  It's well over 1 gig so it's taking forever, but it will be up by 2pm PST (unless this decides to stop uploading).



Thanks for your support!

~Melissa


Monday, August 6, 2012

SIGGRAPH - Brave talk

I am learning so vet very much! As a CFX TD, I was really REALLY excited for the simulation section with Claudia Chung (love her!). There are so many things that I'd like to test on my own like multiple hair systems on one character to mic really thick hair. We sort of did that for Steve ( the red haired man on my demo reel) but his hair is a series of polygons. I want to go crazy with actual hair.

I'm sure I'll edit this post tonight, but I just have to say again how amped I am. I would love to work in dynamic simulation forever and ever!!

~Melissa

Thursday, July 26, 2012

Hair Script - Progress #6 / What ever happened to that hair script?

Is what I'm sure you're wondering.

I'm still working on it, but I ran into a problem that, for the longest time, I had no idea how to solve.  I asked for help on CGTalk, but no one ever responded.  Here's how far I got on my script before I ran into a titanium wall:

Create a UI (done for testing purposes, but as I add to/delete code, I'll update the UI to reflect these changes)
Duplicate the hair mesh, group it
If the hair is made of polygons, convert them to NURBS, group the NURBS
Get the surface curves
Allow the user to choose which way the hair is growing (if in the U direction, select all U spans and the leading V span.  If in the V direction, choose all V spans and the leading U span.  The leading span [or "root" as I've been calling it] is the span the hair grows from, and then the hair length follows the "growing" spans.)

That all works, and moving the original polygon hair and/or the updated NURBS hair effects the position of the curves perfectly, meaning, once the hair is rigged, you can animate the hair and the dynamic hair curves will follow.  So what's the problem?

If a modeler modeled a characters hair on one side, then mirrored it, the direction of the curves changes.  If they deleted the history then I'm SOL ("sadly" out of luck).


Note the image above.  Both of the highlighted spans are technically the U spans, but because one was mirrored, U now looks like V and V looks like U.  I've been looking for a way to automatically detect if the spans are uniform and heading in the same direction, but I haven't had any luck.  Then I figured I'd just go for a dirty solution.  I hate it, but I really don't have much of a choice.  My solution is to have the user select the pieces of hair where the curves were going in the wrong direction and press a Switch Direction button.  It would use the Reverse Surface Direction command, which is pretty self explanatory.  In essence, it will switch U and V spans and all will be right with the world.

This is what would have to happen in my Switch Direction proc:
Store the name of the curves, groups, etc. that have been created for this piece of hair
Delete EVERYTHING the script has created for this piece of hair so far
Reverse Surface Direction command
Recreate and restore the names to everything in the proper order
Make sure everything goes to the proper group

I looked in the GMH script that a reader recommended to me and got my hands on it.  It's a pretty darn fantastic script and I learned a LOT from it, but it has the same flaw mine currently has.  If the user mirrored some of their hair, the script will fail and there is no way to fix it.  But I THINK with the steps I outlined above, I can fix the problem.  Now that I'm getting a little more comfortable with Python, I think I can use a mix of MEL and Python to do this efficiently.

I think...

I'm open to thoughts and suggestions.

~Melissa

SIGGRAPH is a GO! 9 days and counting!

One months salary later and... it's official.  I'm going to SIGGRAPH this year!  Will anyone else be there?  I hope I get to meet some more hair/cloth TDs.  I'll be there from Sunday to Thursday and I plan to do as much as I can while I'm there.  I'm ridiculously excited!  I'm almost ready to go.  I just need to make sure everything on my list is checked off.


  • Finish new demo reel and upload it
  • Print business cards
  • Update Resume
  • Create a few self playing DVD's with my demo reel/other information in case someone wants it
  • Buy clothes that fit (yeah, I kinda lost 120lbs and my clothes situation is pretty crazy)
  • Print out everything I need for the flight, hotel and SIGGRAPH
  • Pack
  • Contact some studios/companies before hand and setting up an interview (done to a small extent)
  • Make sure my $$$ is in order

I'm cutting it pretty close with some of those things, but my schedule has been beyond intense these past few months so my progress with this has been slow.  Oh well.  I'll get it done.


~Melissa

Monday, July 23, 2012

Reposting: Brave New Hair

http://www.fxguide.com/featured/brave-new-hair/

If you're interested in hair simulation at all, I'm begging you to read this article.  But be aware, there are one or two small SPOILERS.

I was very inspired (and intimidated) by this article.  There's so much I have to learn and getting a job where people know this much would be amazing and terrifying.  Well, that's the fun of it all, isn't it?

~Melissa

Thursday, July 5, 2012

Cloth tutorial - Cloth Attributes Explained

nCloth Attributes Explained
http://www.joelstutz.com/nCloth.html

I think this document was created by a man named Joel Stutz, but I'm not sure.  If I'm wrong, please let me know and I'll make any necessary corrections to this post.

He created a document that explains what 95% of the nCloth attributes are and what they do.  If you're an nCloth novice, or if Maya's help docs are confusing to you, I highly implore you to read it.

~Melissa