Maya | Blender | Creating Hair in
Blender & Exporting it into Maya

Thursday 30.10.2014

       If you’ve ever played around with hair in Maya you know that it isn’t particularly fun to create the main hair guidelines. Here I will show you how you can quickly create them by using Blender, a free and open source 3d application for Windows/Mac/Linux, which offers great hair creation / combing tools. This tutorial is aimed at Maya users who have no to limited knowledge about Blender.

So let’s get started:

After downloading Blender and installing it on your machine (you can even run it even without installing it by downloading the zip file and executing the Blender.exe) open the program and change the Interaction Mode from Blender to Maya. If you accidently clicked away the splash screen you can make it reappear by clicking the small Blender icon in the top bar of your window. So now with Maya short cuts enabled we can go to the next step:

First select everything and delete it. Then go to File>Import>FileFormat and import your mesh. Now we will select our faces/vertices where our hair should grow from. Go to the right view (Bottom 3d View Menu: View>Right) and press tab to go to Edit Mode (or just click on the Object Mode button and switch to Edit Mode).Select the correct vertices and then press ctrl + g to add them to a new Vertex Group (vertex groups in Blender are used to limit effects to certain vertices like for example the influence range of a bone when skin binding your model).In Blender in solid view mode the selection is occluded so I would recommend switching to the wireframe view (press the 4 key). Alternatively you can go the Object Data panel (the sub panel in your properties panel with the small triangle as an icon) and add a vertex group and then assign the selected vertices. The video tutorial goes into a bit more detail about how to fine tune the areas of hair growth via increasing the polygon count and weight painting the mesh.

Next switch to the Particle System panel and add a new particle system. Switch the mode from Emitter to Hair and go to the Vertex Groups tab. Here you can input the previously created vertex group into the Density Slot (and if you wish to also the length slot).This limits the hair to only grow from the vertex group. After that enable the Advanced checkbox all the way at the top so that we get more options. Enable Use Modifier Stack in case you have smoothed your mesh by pressing the 3 key(also head to the Modifier Panel, it is the one with the wrench as an icon in your Properties Panel, and place the Subsurf Modifier at the top of the stack, since the hair particles can only see the modifiers that are before its own modifier(which is the Particles System Modifier)).Change the hair Number and Length values to your own needs and keep in mind that we are only creating the guide curves at this point. The default settings in the emission tab should be fine, but if you want a more detailed explanation, check out the YouTube Video Tutorial. So before we start combing the hair there are two last setting we have to consider: the first one is the Segments number all the way at the top of the Particle System Panel. This option controls the number of points each individual hair has. So if you want to comb your hair with more detail crank this number up (5-10 points are usually fine). The second option is the Steps option under the display tab.This controls with how many points the hair curve is displayed with in the viewport. These points are interpolated along the “comb/simulate” base curve, whose segments we just set in Segments checkbox. The number you input always get taken to the power of two. You should always make this value higher than your segments value in order to see/control all of the segments. This number also sets the number of CV points you will have when you export the hair later on.

So now we are ready to comb the hair. Note that you can’t change the main hair settings anymore when you have started combing your hair. Switch from Object Mode to Particle Edit Mode. Here you can start combing the hair using the different brushes on the left side (press the t key to toggle the panel).Make sure the Path Steps have the same value as the value you set in the Particle System Display subpanel. For a more detailed explanation watch the YouTube Tutorial (brush effects/ overriding the segments count for specific hair/ adding hair). You can also add Simple Children in the Children tab in the properties panel to see hair clumps around your hair. In Maya the name of this setting is called “Hair per Clump”. You must enable the Children check box in the left hand panel to see these in Particle Edit Mode. The settings in the Children tab are mostly self-explanatory so I will leave them undiscussed at this point (Hover your mouse over a setting to see a tooltip with a brief explanation).

Then you’re done go back to object mode and under the Modifier panel in the properties window (the panel with the wrench as an icon) click on Convert (disable children before converting). This converts your hair to a mesh, but since Maya doesn’t support having single vertices that don’t connect to a polygon we will have to extrude all our vertices downwards. Go into Edit Mode again (tab key) and select everything (ctrl + a twice) and extrude everything downwards quite a bit so that it will be easier to select only the hair in the next step (Bottom 3d View Menu: Mesh>Extrude>Edges Only). Tab back out and now you are ready to export it to Maya, so just go File>Export>Obj.

The next step is to import it into Maya and then to select only the edges that should be curves. Be sure that you are in Component/Edit Selection Mode when you do this. After that just copy and paste this script into the Mel Script Editor and execute the script (select the whole script > ctrl + enter / make sure you are in Object Selection Mode). And there you go. Now all that is left to do is to select the curves and the mesh you want to attach them to and to make the curves dynamic. You could also rebuild the curves if you want a bit more efficiency.

So that’s it :) I hope this tutorial has made hair creation a bit more fun. If you have any questions ask them below or comment over on my Facebook page or YouTube channel.

Recent Posts All Posts