Wednesday, May 2, 2012

Hair and Fur in Maya 2012



In honor of Pixar's new film coming up as well as fulfilling some educational requirements, I have decided to delve into the world of Hair and Fur in Maya 2012 (although many of the principles should translate to other versions of the software as well).

What is the difference between hair and fur in Maya?
Fur is easy to style and direct the look of, yet has no real dynamics applications.
Hair does not render very well and is a bit of a bear to control stylistically, but works quite well with dynamics.
Using a Fur to Hair workflow, we can use the best of both approaches.

I will be attempting to re-create the feel of the curly red hair featured in Brave but, as this effect was achieved using Pixar's proprietary software and rendered in Renderman (neither of which many people have access to), I will be attempting this with Maya 2012 and render it in Mental Ray.

I'll start off with a basic head shape; I just exported the default head shape from Mudbox to Maya.


Put this head on a display layer, duplicate it, then put the second identical head on another display layer.  I have named these layers Scalp and FullHead.  On your Scalp display layer geometry, delete all the faces that will NOT have your hair on them in order to make sort of a hair cap.  Reduce this cap in size is it is just barely smaller than your original FullHead geometry.


Before applying Fur to this scalp of ours, it is important to make sure that the Maya Fur plugin is loaded.  Navigate to the Plug-in Manager, and check the Loaded box next to Fur.mll






Set up a lighting scheme before continuing, otherwise Maya will helpfully(?) generate a directional light when you create your first fur.  I put my light rig on another display layer.

Select your Scalp and navigate to the Rendering drop down menu on the top left of the screen.  This will display the Fur options on the top bar.  Select Fur, Attach Fur Description, and New.


Select your FurDescription1, these are the options for fine-tuning and controlling the look of your hair.  Currently our head looks like a balding porcupine with very little personality.


Looking at our Scottish(?) princess, we see that her hair is not a single color but rather, fluctuates depending on how the light interacts with it.  We can force this concept by changing the Base Color and Tip Color to match her more closely.  Whatever you do, don't play with the ambient colors as it will throw off the entire lighting scheme of your scene.  If you MUST use any kind of ambience, make it the very last thing you do in the shot.


In order to better see how this is affecting the fur, pump the Density to 10000.
I have also changed the Specular Color to better match the picture as well as upping the Length to about 9.


By playing with the Inclination, Roll, and Polar, I have further positioned the fur, yet it is still not behaving in the way the hair in the photo from Brave is.


From here, adjusting the UV's of your scalp geometry will give you even more control.
Navigate to the UV Texture Editor.


The UVs, as automatically set up by Maya, do not make good use of space.  Rearrange them in order to better control the hair and fill up the UV box.

In order to get the head looking less like a porcupine and more like hair, lower the Tip Opacity and Tip Width while raising the Base Width.  Granted she's still looking like a scene kid, but this is much closer to looking like human hair rather than spiked polygons.


By playing with Base Curl, Tip Curl, Scraggle (controls how much fluctuation there is in each bit of hair), Scraggle Correlation, Clumping (bands hair together into liberty spikes), Clumping Frequency (lets you unspike the liberty spikes while keeping the basic clump shapes), and Attraction (how closely the clumps, clump).

You may want to adjust the Segments option but just know that this is akin to the Mesh, Smooth tool and will raise the render time quite a bit.


Here are my settings so far.


The result is quite a bit closer to what I had in mind but is still strangely emo and quite too short.  In order to add a random feel to ANY of these parameters, click the Details dropdown and change the amplitude and/or frequency of the attribute desired.  This goes a long way towards attaining a natural look.


I usually apply a certain amount of randomness to the Base Color, Tip Color, Specular Color, Length, Base Width, and Scraggle.


After adjusting the length again, I'm going to want to fully fix the way the hair is laying across the scalp.  We can do this using the Paint Fur Attributes Tool.



Don't paint using the Direction option as it is a combination of several options and can limit the actual amount of control you have.  In order to better manipulate the flow of the hair, paint the Inclination, Roll, and Polar options.


It is not perfect but, given the limitations of the software, this will do fine for our purposes.
Fur can be kind of tricky to pull good shadows out of in Maya, notice how uniform and hard the shadows of the individual hairs are on the base of our mesh's chest.  Select the light giving off the shadows.  In the Fur menu navigate to Fur Shadowing Attributes and Add to Selected Light.


Next up is the task of creating a Maya Hair system that will drive the dynamics of our Fur!
Select the mesh you want the Hair attached to (in my case I used the scalp that the fur was attached to as well) and switch the dropdown menu on the top left to Dynamics. Select the square button next to Create Hair in the Hair menu.


Change the Output to Paint Effects and NURBS curves and then Create Hairs.


This will create some strange spikes atop your mesh.  If you hit play at the bottom right of the screen, you will see them fall and sway quite like hair tends to do when a person reaches the bottom of a hill on a roller-coaster.  I upped the number of frames in order to better see the simulation.  Notice how the hair tends to penetrate the scalp when it sways...we will fix this later.

Let's attack the Hair we just created to our carefully styled Fur.  Select Window, Relationship Editors, and then Hair/Fur Linking.


In the resulting pop-up window, both your hair system and fur description should be shown.  Select them both and you will see the image on your viewport change, signifying the link between the two.


Now to make the hair collide with the head rather than cut through it.
Select Hair, Display, Start Position.


Select all the curves that are now exposed.
Select Hair, Convert Selection, To Start Curves.


Next select Hair, Create Constraint, then Collide Sphere.


I had to go into wireframe mode in my viewport to see the resulting Collide Sphere, but once found, resize it to match the basic shape of your head.


Select Hair, Display then Current Position.


Reset the simulation and watch it again, it should collide with the head better this time around!  When the hair is relaxed and no longer bouncing around, pause the simulation and select all of your hair curves, then Hair, Set Start Position, and From Current.

That's pretty much all there is to it, I rendered mine with the visibility on the Hair itself turned off to just show the fur.  It's quick and dirty, but the fundamentals are there!  Part of the problem with this render is that while the Hair is respecting the boundaries set up, some of the Fur started inside the head due to it's hard-to-control curly nature...thus it treats the boundary that the Hair is abiding by as a relative notion.

So for the future, make sure no Fur is inside the head before moving on to the Hair stage!

Falling!

Have fun!
Josh Evans

1 comment:

  1. Play United Casino is certainly not a scr888-download game client apk new one, having entered the world of online gaming in 2003. However, in 2009 it did undergo a complete facelift and even changed software providers to prove that they’re always on the cusp of industry changes to provide players with the best experience possible. With a name like Play United, you’d expect that this is one online casino that may cater to the UK market. They do, but they really cater to the International market; they accomplish this in name, in a variety of accepted currencies; and a website that has been translated into a variety of languages. Unfortunately, US players are not accepted at Play United Casino, though their North American counterparts in Canada are welcome to join and play as many Canadians do!

    Play United Casino is owned and operated by Play United and is licensed in Khanawake. It is an international casino through and though, focusing upon the UK and European market. US players are not welcome, though USD is a currency is accepted to accommodate players. Of course, Euros and Great Britain Pounds are also accepted. The website itself has been designed so it’s sleek and modern, but most importantly, it is also available in a total of 17 languages so all players can browse through and see everything that the casino has to offer and join in on the fun and excitement. Some online casinos go overboard with their design of websites, but this one is simple yet modern. They do advertise key features like the promotions and the latest games, but it’s all done in a tasteful way.

    Since upgrading casino software to the Playtech platform, Play United features some of the best online casino games in the world from blackjack and roulette to wide variety of video poker and online slots, including over 10 progressive jackpot games. The more popular progressive games include Beach Life and the 2010 release of X-Men Marvel slots which has a network-wide progressive feature that is triggered when a player gets hot and hits a sequence of specific winning combinations. Regardless of your taste in casino games, Play United has a great selection that is sure to satisfy your needs.

    All players look for great bonuses when they join to play at a casino that’s new to them. Play United Casino offers all new players a total of $750, though not all on one deposit. When they first join, players are eligible to receive 100% deposit matching up to $150. Wagering requirements for players from most countries are 25x and games are essentially limited to the slots to fulfill the terms. Other casino bonuses available are a $500 high roller bonus with a $1000 minimum deposit, plus there are 100% deposit matching bonuses of $100 available to players once a month for their first year.

    Beyond the welcome bonuses, Play United Casino has a loyalty setup with cash back rewards for players. At this casino, players automatically move up the ranks of the VIP Club Program and as they progress, there are greater incentives available to them with cash back on raked hands and point accumulation for cash!

    Though no live chat is available for Customer Support, Play United goes along way when it come to giving players options for help. With toll-free numbers for different countries, players can cell for free and be connected to operators who speak their language. There is also email support and some information available on the website. The focus on customer experience carries through with the banking options that include moneybookers, Ukash, NETeller, wire transfer, Mastercard, Eco Card, Click2Pay, Visa.

    With Playtech software, a wealth of promotions and a focus on positive customer experience, Play United Casino is one that players just can’t miss!
    https://scr888games.com/

    ReplyDelete