From BlenderWiki

Jump to: navigation, search

This documentation is valid up to Blender version 2.45. We have documentation for a more recent Blender version: Particles

Blender Hair/Fur & Feathers

Overview

Blender has an awesome particle generator that is not only capable of generating particles, but is also capable of creating hair-strands that can be used to create either hair, fur, or even feathers. This is achieved by converting the particles to renderable polygon strands. The polygon strands never go below 1 pixel in size, and this helps keeping rendering artifacts at bay when the rendering engine renders the strands.

Let us begin by taking a look at the particle generator and how it works. This is how the particle generator looks in Blender 2.44:

The particle generator

As you can see in The particle generator you have many options. To find this particle menu you must first create a particle emitter. The particle emitter must be an object of type Mesh. Let's just start by adding a sphere: SpaceAddMeshUVsphere. Give the sphere around 20 segments and 20 lines. Exit to object mode (⇆ Tab).

Now go to your menu section and press F7 to get to the object menu. The object menu has two option buttons: Object (Manual-Part-I-Interface-Context-Object.png) or Physics (Manual-Part-I-Interface-Context-Object-Physics.png). Click the Physics button. There you will find a tab called Particles. Press NEW and you will see the menu just as in fig-1 (except that by default, the two tabs are stacked).

Since we're about to create hair-strands or fur we need to make the particles static. Press static followed by animated if you plan to animate these later on. To draw strands between each particle generated we need to activate vector under the display section - press Vect. If you want the mesh to show during the generation of particle strands you simply press Mesh under the display section.

We need to see the particles now but we haven't informed our generator how to emit these from our mesh-object. To see these - go to the Particle Motion tab and set normal to 0.010. Your sphere should look something like in fig-2. If not, then press the Z key to enter shaded view.

fig-2
fig-2b

They look quite boring don't they? That's because they're just a bunch of strands sticking out of a round ball, you can of course add these to any object you please.

Emitting strands From the mesh

The mesh Emits particles. These particles are like photons; a certain amount of them are emitted, and they have a speed, direction, and life time. The more Amount that are emitted, the denser the hair will be. The longer these particles live ((have a height Life:)}, the longer the hair will be. These particles are packed very close together; many can fit inside a single pixel. It is a wasted of CPU time to calculate redundant particle locations, so set Step: at a low value ((5 is the default).In the 3D views, you do not need to display/calculate 100% of the particles: a lesser percentage in Disp: will speed up your display.

You can also specify where to emit strands From: the entire object, or from just a certain portion of the object. There are two selections here in this section of the panel: Verts (vertices) and Faces. Select one or both as you wish. Verts emits strands only from the mesh's vertices. By default, all verticies emit strands. To emit strands only from a portion of the mesh, define a vertex group (see Manual-Part-I-Interface-Context-Editing.png Editing(F9)) and type the name of the group in the VGroup input box (case sensitive). For example, if you had a human head, you would define a vertex group of Scalp and then enter that here. If you want to also emit hair from the spaces between the vertices (the faces of the mesh) select Faces. You will then get to choose between Random and Even distribution of hair/particles. For more natural/organic hair, choose Random. Dithering is a process of overlaying dots on top of one another to blur and soften. Choose a different dither to suit your hair style.

Let's make the strands better looking! To do this we will need to make the strands ease out and anti-alias into the environment around the object. We can even change the size of the hair strands and how the tip will look like, but more about that later, let's take a look at how we map the strands to look real soft and fluffy.

Strand Shader

The strand shader has been implemented to follow the direction of the new strand polygons. In other words if you select strand and place a texture or a gradient - it will follow the direction of the strands. And we're going to use gradients to shade the strands so they fade out to nothing - giving us an illusion of a much higher resolution, this is known as anti-aliasing. You can't really render smaller than one pixel anyway - so we use this "trick" to make the hair-strand tips smaller and fade into oblivion.

fig-3

As you can see from fig-3 you're now in the material menu (F5). From there you need to create a new material and add a texture, actually it would be practical if you create 2 materials if you intend to keep the original mesh-object as well as the particle strands, but for now we will concentrate on shading the particles. Please make your selection exactly as shown in fig-3. Strand activates strand mapping and Alpha activates the alpha channel. The alpha channel contributes to making textures opaque and the texture background invisible. This is the trick we discussed earlier to make the texture fade out to nothing.

Let's go work on the "fading texture". We're going to add a Blend gradient to our texture slot-1. Check out fig-4.

fig-4

Now we're going to add color gradients to our blend-gradient texture, press Colorband, in the Colors tab. Change the default color of the first line marker to white with an alpha of 1.0 by LMB Template-LMB.png-clicking on it and moving all the color sliders to 1.0 and the Alpha slider to 1.0. Make the second line marker black in the same way, this time making the alpha 0.0. Make sure that you have the Alpha button selected in the Preview panel. If you've done everything correctly - things should look as in fig-5.

fig-5
fig-6

Ok, now that we've made the gradients ready to help create our fade effect on the particle strands, go back to (F5) the material menu and untick the COL button from the Map To tab (fig-6). The reason we do this is to use our own colors instead of the color gradient we made earlier. We just wanted to use that as a fade gradient from 100 % opaque to 0.

Now we're going to make a "hair" color, just go to the material menu and adjust the colors as you see fit and slide the Alpha slider (A) to zero. We do this to make the alpha channel gradient we made in fig-4 control our alpha 100%. You can of course adjust this here to your liking if you don't want 100% alpha, but do this for now.
fig-7


If you did everything as described above and press F12 to render, your render should look something like fig-8.

As you can see - we now have soft "fluffy" hair strands, but we can do even more yet before we add more particles. Blender has yet another option under the material menu, Links and Pipeline tab, Strands button, called tangent-shading. The tangent-shader creates a thicker/thinner hair/fur-strand curve depending on the length of your particle strands. You can adjust it to make the strands start out or end thicker/thinner and how sharp/rounded they will be.

I've set the shape to -0.900 (fig-9) so it's really "spikey".

fig-9
fig-8
fig-10
And if you render it, fig-10 shows how it would look.


Now that you've done all the footwork you're ready to have a LOT of fun with hair/fur, let's go back to the particle editor and create a lot of fur.

In your particle menu - let's add a lot more particles...say 20000 of them, if you don't have a very strong computer you can change the DISP value to display 20 percent or so and when you play with particles, only 20 percent of them will show up in your viewport but at rendertime - all particles will be present.

Now that we have a lot of particle strands let's add some weight to it. As we know...gravity goes downwards so we change the z-force value to about -0.02 and to make our fur a bit frizzy and random looking - add 0.005 to the Random widget under the Velocity: section. To create an even better looking distribution of our fur we could get our particles to emit from vertices (Verts) and Faces both randomly and evenly, you can set this as in fig-11 under from.

fig-11
fig-12

If you render this, it will look something like in fig-12. If it doesn't, then it's possible that your light setup is very different from the one used in the example. Lights are very important to particle-strands, obviously because of shading. If you need to do proper lighting then check out the lighting tutorials or lights section in the manual and do this tutorial over again, you can get awesome results if you do your homework when it comes to proper lighting.

Let's make hair with hairguides

That's remarkably easy to do with the new guides, all you have to do in order to guide the hairs in your new hairball is to add a curve and tell it it's a curve guide. To do that SpaceAddCurveBezier Curve and with the curve selected go to your F7 menu and take a look in the dropdown menu found under the fields and deflection menu:

fig-13
fig-13b

Now that you have selected it to become a curve guide you will see that it instantly affects your particle furball. As you also might see - the shape of the hair is now conformed to the guide. You're of course free to shape the curve any way you see fit, Blender will real-time update when you move the bezier curve segments around and add new segments with E for extrude.

Again I cannot stress enough how important lights and shadows are to get quality hair, learn to do your light setup well and you will be rewarded with lush and beautiful looking hair. A good way to get shiny clean hair is to reduce specularity just a tad and increase the hardness value to about 70-100.

A thing you might want to do in order to render more lush "fluffy" hair is to select the Ztransparency (ZTransp) option found in the Material buttons (F5), Links and Pipeline tab. This will render the strands in alpha layers with transparency making it antialias even better and give you totally awesome results, of course...this WILL cost you render time but it's well worth it. You can use Ray-Transparency (Ray Transp, Mirror Transp tab) and set depth to whatever you see fit - and it will render somewhat faster, but it won't look nearly as good as with Ztransparency.

fig-14

Nice hair huh? Want to see the settings for it? Here you go, check out fig-15.

fig-15

Let's take a look at what we've done to get that nice hair. I made the previous object a bit smaller by scaling it so the start-emitter of the hair would be smaller (just for effect - really). Then I blew up the Normal (speed) value found under the Particle Motion section (Velocity:), gave it a little random-life (0.4) to vary the speed a bit. I also scaled and moved around the bezier curve guide to affect the hair try these variations - you'll be surprised how flexible it can be and how many variations you can make.

Want to get even more advanced? Read on...

Advanced hair

fig-16
You can use multiple curves to guide your hair around. Make a duplicate of your curve and tilt them both slightly as shown on fig-16.
fig-17
Now check out the F7 menu - fields and deflections again and press the Additive button. This button creates an approximation field with your curve guides so when you blend two or more together - it will affect parts of your hair-strands depending on your settings in MinDist and Fall-off. Make a small MinDist value such as shown in fig-17 for both curves and experiment with the Fall-off values (small numbers to start with). If you now mix these two curves together placing them close to the hair emitter you can see the effect real-time and adjust the Fall-off/MinDist/MaxDist values accordingly. These values will depend on your curves, number of segments and emitter size etc, so in other words they will vary with your own creations.

If you've done everything correctly - you should be able to control your hair splitting it into sections such as shown here:

fig-18

As you can see from fig-18 you now have full control over where you put your hair. You can even vary the length of each "curve" so it will affect the length of the hair that are near the curve.

It doesn't end here - not by a long shot! There's nearly no end to how much you can control your hair with Blender. You can twist it around, knit it, swirl it, toss it and yes do anything you want with it. Become a world famous hairdresser - your characters will never go bald again.

Tommy Helgevold (JoOngle)

Hair tutorials

See Also