Creating fur and hair

Fur, in the world of computer graphics, is considered among the most difficult things to recreate, both because it's generally quite expensive from a memory management point of view (a single character can easily have millions of hair strands) and also because it can be quite a task to make a believable shader that can work under different light conditions.

Blender is not new to fur creation; the exact goal of the open movie Big Buck Bunny was to add tools for fur creation to the Blender Internal rendering engine, and it did it through a new type of primitive, strands, which have to be enabled in the Particle panel (the Strand render item); strands are very instanced on the particle system, but they can be edited, combed, and tweaked in several ways to obtain the best possible result.

Almost the same concept applies for the Cycles rendering engine; there's no need to enable the Strand render item anymore, because strands are rendered automatically by Cycles when the Hair item is selected as Particle Type.

In fact, once the Hair item's Particle Type has been selected, you will find two more subpanels at the bottom of the Particle window: Cycles Hair Rendering and Cycles Hair Settings. Here is a screenshot of the teddy bear Suzanne in the Rendered view:

Creating fur and hair

The Rendered teddy bear Suzanne

Getting ready

Start Blender and open the 9931OS_08_hair_start.blend file; in the scene, there is a Suzanne primitive (Suzanne_teddybear) with a Hair particle system already named teddybear and set (go to see it in the Particle window) to resemble the fur of a cuddly toy.

The Suzanne_teddybear mesh is already unwrapped and has a Vertex Group named density, used in the Particle window (the Vertex Groups subpanel) to establish the Density distribution of the fur on the mesh (in short, to avoid fur on the eyes, the nose, and inside the mouth) as shown in the following screenshot:

Getting ready

A screenshot of the particle system as it appears in the Solid viewport shading mode and the settings to the left

How to do it...

We are going to add three different materials to the Suzanne_teddybear object: base_stuff, which is the basic material for the raw mesh, an eyes material, and the teddybear material for the fur, using the following steps:

  1. Select the Suzanne mesh and click on the New button in the Node Editor window toolbar or in the Material window to the right; rename the material as base_stuff.
  2. Press Tab to go into Edit Mode and select the eyes vertices (put the mouse pointer over the interested part and press the L key to select all the linked vertices); click on the little + icon to the right of the Material window (add a new material slot) and add a new material. Click on the New button and rename the new material eyes, and then click on the Assign button. Press Tab to go out of Edit Mode.
  3. Click again on the little + icon to the right of the Material window (add a new material slot) to add a third material (not to be assigned to any vertex or face; in fact, we are out of Edit Mode); click on the New button and rename the new material as teddybear.
  4. Go to the Particle window at the top of the Render subpanel, and click on the Material Slot button (Material slot used to render particles), where at the moment, Default Material is selected instead of the teddybear material.
  5. Go to the Cycles Hair Rendering subpanel to be sure that the Primitive item is set to Curve Segments, and set Shape to Thick; then, go to Cycles Hair Settings to be sure that the Shape value is -0.50, the Root value is 1.00, the Tip value is 0.05, the Scaling value is 0.01, and the Close Tip item is checked.
  6. Now, in the Material window, select the base_stuff material; in the Node Editor window, add a Texture Coordinate node (press Shift + A and navigate to Input | Texture Coordinate), a Mapping node (press Shift + A and navigate to Vector | Mapping), an Image Texture node (press Shift + A and navigate to Texture | Image Texture), a Glossy BSDF node, and a Mix Shader node (press Shift + A and navigate to Shader | Texture Coordinate; repeat similar steps to add other nodes).
  7. Connect the UV output of the Texture Coordinate node to the Vector input socket of the Mapping node, and the output of this node to the Vector input socket of the Image Texture node. Paste the Mix Shader between the Diffuse BSDF and the Material Output nodes and connect the output of the Glossy BSDF shader to the second Shader input socket of the Mix Shader node.
  8. Connect the Color output of the Image Texture node to the Color input socket of the Diffuse BSDF shader node and of the Glossy BSDF shader node; click on the Open button and browse to the textures folder to load the teddybear.png image (a simple color map painted directly in Blender). Set Distribution of the Glossy BSDF node to Ashikhmin-Shirley, the Roughness value to 0.300, and the Mix Shader node's Fac value to 0.400.
  9. Back in the Material window, select the eyes material and switch the Diffuse BSDF shader with a Mix Shader node; in the first Shader slot, select a Diffuse BSDF shader, and in the second one, select a Glossy BSDF shader node.
  10. Set the Mix Shader node's Fac value to 0.200; change the Diffuse BSDF node's Color values for R to 0.010, G to 0.003, and B to 0.001; and change the Glossy BSDF node's Roughness value to 0.100.

    In the following screenshot, the teddybear particle system has been hidden by disabling the viewport's visibility in the Object modifiers window:

    How to do it...

    The base_stuff material in the Node Editor window and in the Preview

  11. In the Material window, select the teddybear material and switch the Diffuse BSDF node with a Mix Shader node, and label it as Mix Shader1; in the first Shader slot, select another Mix Shader node, and in the second one, select a Transparent BSDF node.
  12. Label the second Mix Shader node as Mix Shader2; then, in the first Shader slot, select a Diffuse BSDF shader node, and in the second one, select a Glossy BSDF shader node. Set the Glossy BSDF node's Distribution to Ashikhmin-Shirley, and its Roughness to 0.200.
  13. Add a Fresnel node (press Shift + A and navigate to Input | Fresnel) and connect it to the Fac input socket of the Mix Shader2 node; set IOR to 1.580. Add a Hair Info node (press Shift + A and navigate to Input | Hair Info), and connect the Intercept output to the Fac input socket of the Mix Shader1 node.
  14. Add an Image Texture node (press Shift + A and navigate to Texture | Image Texture), and connect its Color output to the Color input socket of the Diffuse BSDF node; click on the little arrows to the left of the Open button to select the already loaded teddybear.png image map.
  15. Add a MixRGB node (press Shift + A and navigate to Color | MixRGB), set Blend Type to Add and the Fac value to 1.000, and paste it between the Image Texture node and the Diffuse shader node. Set the Color2 values for R to 0.277, G to 0.179, and B to 0.084 and then connect its output also to the Color input socket of the Glossy BSDF shader node.
  16. Optionally, add a Texture Coordinate node (press Shift + A and navigate to Input | Texture Coordinate) and a Mapping node (press Shift + A and navigate to Vector | Mapping), and connect the UV output of the Texture Coordinate node to the Vector input socket of the Mapping node and the output of the latter to the Vector input socket of the Image Texture node, as shown in the following screenshot:
    How to do it...

    The teddy bear material network; note the transparency driven by the Intercept output of the Hair Info node

How it works...

From step 1 to 3, we prepared the three materials to be used; we went into Edit Mode to assign the second material, eyes, to the eyes vertices of the mesh, and then we went back in Object Mode to add a third material that doesn't need to be assigned to any face of the mesh because they are only to be used for hair rendering.

In steps 4 and 5, we made sure that the right particle system settings for the material are to be rendered as fur.

From step 6 to 8, we built the base_stuff material, a simple basic shader made by the Diffuse and Glossy components mixed by the Mix Shader node and colored by the UV mapped teddybear image texture; note that the texture we used in this first material is also used to give the right color to the hair; it is useful to have it also on the underlying mesh, to cover any hole or missing part in the particle system.

In steps 9 and 10, we built the eyes shader, which is again a very basic material made of the dark Diffuse color and the light gray Glossy components simply mixed by the Mix Shader node.

From step 11 to 16, we built the shader to be used by the particle system for the fur, mixing the already used teddybear.png image map, mapped on the UV coordinates, with a MixRGB node brownish color outputted to the usual Diffuse/Glossy basic shader; note that the Diffuse/Glossy shader is then mixed with the Transparent BSDF shader by the Intercept value of the Hair Info node along the length of each hair strand.

There's more...

The teddybear.png image texture has been used both in the base_stuff and in the teddybear materials; this is often not necessary, because in Blender, the particle system hairs get the textures from the surface they are emitted from, so it would have been enough to use the base_stuff material also for the fur (by selecting it in the Material Slot under the Render subpanel in the Particle window, because we had more than one material on the Suzanne mesh); we had to make a new and different material because we wanted to add a MixRGB brownish color to the UV-mapped image and we had to make the shader fade and become transparent towards the strands' tips.

Note that in the Hair Info node, there is also the Boolean Is Strand output that, similar to the outputs of the Light Path node (Is Camera Ray, Is Shadow Ray, and so on) can be used alternatively to the Material button in the Particle window to assign a material value of 0 to the emitter mesh and a material value of 1 to the fur strands (9931OS_08_hair_isstrand.blend) as shown in the following screenshot:

There's more...

The set up for the hair_isstrand material and the rendered result

This also means that obviously we can also use different image textures to obtain fur materials different from the material of the particle emitter: for example, in the following screenshot, the tiger.png image texture has been used only for the fur, whereas the base_stuff material still uses the teddybear.png texture (and, honestly, this is blatantly visible... better to use the same image both for fur and emitter):

There's more...

The rendered Suzanne_tiger object

The Suzanne_tiger object also has two different particle systems to create the fur, tigerfur_long and tigerfur_short, and three Vertex Groups to modulate the fur appearance, density_long, density_short, and length.

To take a look at the Suzanne_tiger object, open the 9931OS_08_tiger.blend file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.80.52