Hair and Fur modifier. Making a carpet

Today we will take a closer look at one of the many ways to create grass in 3Ds Max using a VRay renderer and a VRay Fur object.

1. Let's create a new scene and set centimeters as the unit of measurement.
To do this, in the "Customize" menu, go to the "Units Setup" item:

After that, we set the same units in the "Display Unit Scale" section:

2. Create a standard "Plane".

Plane parameters in my case are 300 cm by 300 cm, the number of segments is 30 by 30, you can do more, for example 700 cm by 700 cm, then set the number of segments to 70 by 70.

This mesh density is necessary for the Vray Fur object, with which we will create grass.

3. Add a Noise modifier to the Plane to turn the plane into a piece of terrain.

Noise parameters in my case are:

Throw TurboSmooth on top with the 1st iteration.
As a result, we got such an object on which we have to “sow” grass:

4. Now let's create the material of the future grass.
The grass itself will be rendered using a Vray Fur object, to which we will assign a VrayMtl material. To create it, we will use the texture of real grass, for example this:

In order to create a VrayMtl material, set the current render to the V-ray render.
To do this, click the "Render Setup" button:

At the bottom of the window, in the "Assign Renderer" section, in the "Production" field, select V-ray as the current renderer.

Now open the Material Editor:

Select a slot and create a VrayMtl material:

In the "Deffuse" slot, assign a "Bitmap" in the form of an image of realistic grass.

Assign the resulting material to the plane and press the button to display the material in the projection window on the object:

5. Let's start creating grass using the VRay Fur object.
VRay Fur is designed to create procedural fur on a polygonal object, while the fur is rendered only during rendering and the result is not present in the viewport, instead conditional fur hairs are displayed there, which allow you to control the parameters to get the final result.

Select the Plane object, in the "Create" section, select the "VRay" group from the drop-down list of objects, click on the "Vray Fur" button:

The result of the VRay Fur action appears on the plane:

By default, the VRay Fur object is created in a random color, like all created objects in 3Ds max.
In order for the “fur” to become grass, you need to configure it, and first apply the created grass material to it.
To do this, select the VRay Fur and drag the grass material onto it.

Making a test render:

6. Setting up VRay Fur.
VRay Fur has a number of settings that allow you to control the appearance of the generated "fur" array. Let's take a look at them.

source object- Here you specify the polygon object for which the VRay Fur action will be applied.
A separate VRay Fur is assigned to each independent object.

Basic parameters:

Length- Here you can set the maximum length of fur hairs.

Thickness- The thickness of the villi.

gravity- Villus attraction, a value that indicates how strongly the fur villi will bend along the z-axis.

Bend- The amount of bending of the villi, with a value of 0.0, the villi are straight.

Taper- Allows you to control the appearance of the villi, making them wider at the base and narrower towards the top.

Geometric detail:

Sides- Number of sides. The option is inactive. Each hair is rendered as a polygon feature.

Knots- The number of nodes on the villus, the more there are, the more segments that make up the villus. Can be useful when you want to set a smoother close-up curve.

flat normals- Flat normals. When this option is enabled, fur hair normals do not change along the width of the hair. This speeds up image rendering. When this option is off, the surface normal changes along the width of the strand, giving the illusion that the hairs are cylindrical.

Variations:

direction variation- Change of direction. This option allows you to change the direction in which fur hairs grow from the original object. The value of the parameter depends on the scale of the scene.

Length/Thickness/Gravity variation- Variations in length, thickness and pull. Allows you to add a random distribution of these three values ​​(each separately) for the hairs in the final array. A value of 0.0 means no variation. The maximum is 1.0. Variations of these parameters allow you to add variety and make the final result more lively and realistic.

Distribution:
This section is responsible for how the density of the villi will be distributed on the object.

per face- “By face”, that is, each polygon will contain the specified number of villi.

Per area- By area, in this case the density distribution will be uneven if the polygons have different sizes. Smaller polygons will contain less density, larger polygons will contain more density.

reference frame- reference frame. Used when animating a scene and specifies a frame with the amount of hair to use throughout the animation of the scene.

Placement:

This section determines on which parts of the selected polygon object the fur will be generated.

Entire object- The whole object will be covered with fur.

Selected faces- Fur will be generated only on selected polygons. This option works if using, for example, a modifier MeshSelect create a selection of some polygons on the object, then it is on them that the fur array of Vray Fur will be generated.

Material ID- Polygons that are assigned the specified material ID will participate in fur generation.

Maps (Maps):

In this section, you can control some parameters using texture maps.
Here you can use several different cards at once.

base map channel- Base channel map. Specifies which texture channel number will be used for all textures involved in fur generation.

Bend direction map- Map of the direction of the bend. This is an RGB map that allows you to determine the direction of the curvature of the fur villi in space.
The red component of the map sets the offset along the U (X) direction of the texture, the green one along the V (Y), and the blue component the offset along the normal to the surface.

Length/Thickness/Gravity/Bend map- Map for length, thickness, pull and bend. For these maps, a black-and-white image is used, where black means zero effect of the parameter, and white means maximum (1).

Density map- Density map. A black and white image is also used for this map, the black parts of which correspond to zero density (fur will not be generated in these areas), and the white part provides the fur density specified in the distribution parameters.

Display in the projection windows (Viewport display):

preview in viewport- Allows you to enable or disable the display of VRay Fur hairs in the projection windows.

Max. hairs- The value of the maximum number of hairs to display in the projection windows.

automatic update- Automatic update of view changes in projection windows.

manual update- Show view updates in the projection window in manual mode.

This is a description of all VRayFur settings from the official V-ray documentation.

It's also worth noting that VRayFur does not work with a VRayPlane as its base object.

Now consider changing a parameter such as Gravity:

By setting some parameters, such as Length (Length), Thickness (Thickness), Gravity (Attraction) and Distribution: Per face = 7 (Polygon distribution) we get this render:

In case the density is insufficient, we increase the number of villi on the landfill per face.

We also adjust the length of the grass depending on what we want to get - tall grassy thickets or a mowed lawn.

7. Let's add the sun to the scene.
We will make daylight with the help of VRaySun and VRay Sky.
In the lighting sources, select the VRay group, in which the source type is VRaySun:

To the question "Do we want to set the VRaySky map as the environment map" answer Yes.

Set VRaySun to the required position in the Top and Front window.

8. For further rendering, we will use VRayPhisicalCamera.

Switch the view of the Perspective projection window to VRayPhisicalCamera01:

And adjust the camera position:

VRay Sun parameters:

VRayPhysicalCamera parameters:

Test render:

After changing the grass texture:

In this example, we did not use Global Illumination in the V-ray render settings, so the picture is not realistic and dark enough, but this was done purely to save time and the purpose was to describe how VRay Fur works.

VRayFur is a very simple procedural fur plugin. The fur is generated only during render time and is not actually present in the scene.

To create a VRayFur object, you must first select a mesh from the 3ds Max scene, then go to the Create panel, choose the VRay category, and then click on the VRayFur button. Note that if you have not selected an object, or you have selected an object which is not compatible with VRayFur, the VRayFur button will appear greyed out.

||Select geometry|| > Create menu > V-Ray > V-Ray Fur

||Select geometry|| > Create panel > V-Ray list > VRayFur

||Select geometry|| > V-Ray Toolbar > V-Ray Fur button

Parameters

source object– Specifies the source geometry for the fur. You can click on this button only from the Modify panel (and not from the Create panel).

Length– Specifies the length of the fur strands.

Thickness– Specifies the thickness of the strands.

gravity– Controls the force that pulls fur strands down along the Z-direction.

Bend– Controls the elasticity of the fur strands. When set to0.0, the strands are hard and all straight lines. Greater values ​​cause the strands to bend (e.g. under the influence of gravity).

Taper– Allows the user to add a taper to the individual strands of fur. Increasing this value will make the each strand thinner in its upper end and wider in its base.

MtlID– Assigns a material ID to the generated hairs. This is useful for applying a Multi/Sub-object material to the fur.

Geometric detail


Knots– Fur strands are rendered as several connected straight segments; this parameter controls the number of segments.

Lvl of detail– Level of detail. When enabled, V-Ray will generate less fur geometry for parts of the scene which are far away from the camera. This is done by decreasing the density of the fur strands and increasing their thickness. This parameter helps for two things: First, it conserves memory by decreasing the detail where it is too far to be visible. Second, it helps reduce animation flickering of very fine fur strands when they are far from the camera.

start distance– Specifies the distance from the camera at which V-Ray is going to start implementing the level of detail adjustment. Up to this distance the fur will be generated as specified by the user. After that V-Ray decreases the density and increases the thickness of the strand by a factor of two for every n units of space specified by the rate parameter.

rate– Specifies the rate at which the detail adjustment is applied. Starting from the distance specified in the start distance parameter, V-Ray decreases the density and increase the thickness of the strands by a factor of two for every n units of space specified by the Rate parameter.

Variation


direction variation– Adds slight variation to the direction in which fur strands grow from the source object. Any positive value is valid. This parameter should be adjusted according to the scale of the scene.

Length/Thickness/Gravity/Curl var– Adds variation to the corresponding parameter. Values ​​range from 0.0 (no variation) to 1.0.

distribution

This section determines the density of strands over the source object.

per face– Specifies the number of fur strands per face of the source object. Every face will generate the specified number of fur strands.

Per area– Specifies the number of strands per squared scene unit. For example, if the system units are in meters, this parameter specifies the desired number of strands per square meter; if the system units are centimeters, it specifies the number of strands per square centimeter and so on. The area of ​​the triangle faces (which is used to compute the number of strands for each face) is taken at the frame specified by the Ref. frame parameter. Every triangle face has at least one strand.

Ref. frame– reference frame. When the distribution parameter is set to Per area, this specifies the frame at which the source object is captured to calculate the face area. The captured data will be used throughout the entire animation to ensure that the number of strands for a given face remains constant during animation.

Placement

Determines which faces of the source object will generate fur strands.


Entire object– All faces will generate fur.

Selected faces– Only selected faces (for example with a MeshSelect modifier) ​​will generate fur.

Material ID– Only faces with the specified material ID will generate fur.

Mapping


Generate W-coordinate– In general, all mapping coordinates are taken from the base object. However, the W mapping coordinate can be modified to represent the offset along the hair strands. When this option is enabled, the W coordinate is the offset along the hair strands (0.0 is the strand base, and 1.0 is the tip). The U and V coordinates are still taken from the base object.

Channel– When Generate W-coordinate is enabled, this parameter specifies the channel for which the W coordinate will be modified.

curl


curl– When enabled, adds curls to the fur.

Curl Radius– The radius of the individual curl.

Curl Angle– The number of curls on a strand.

Maps

Base map chan– Some of the texture maps represent vectors in texture space, where the x and y directions are derived from the u and v directions of a texture mapping channel. This parameter specifies which mapping channel is used.

Bend direction map– This is an RGB map which specifies a bend direction of the fur strands in texture space (according to the specified Base map channel). This is the direction in which the fur strands curve to (the amount of curvature is also controlled by the Bend parameter). The red component is offset along the u texture direction, the green component is the offset along the v texture direction, and the blue component is the offset along the surface normal.

Initial direction map– This is an RGB map which specifies the initial direction of the fur strands, in texture space (according to the specified Base map channel). The red component is offset along the u texture direction, the green component is the offset along the v texture direction, and the blue component is the offset along the surface normal.

Length/Thickness/Gravity/Bend map– These maps are multipliers for the corresponding parameters where black is a multiplier of 0.0, and white is a multiplier of 1.0.

Density map– This map is a multiplier for the strand density. Black portions of the map correspond to zero density (effectively no fur will be generated in these areas), and white represents the normal strand density, as specified by the distribution parameters.

Curl map– This map is a multiplier for the strand Curl. Black portions of the map correspond to no curl, and white represents the set curl, as specified by the distribution parameters.

Viewport Display

These parameters control the display of VRayFur in the viewports.

preview in viewport– Turns the preview of VRayFur in the viewports on or off.

Max. hairs– Specifies the maximum number of hair strands that will be represented in the viewport. This lowering this value may help speed up the viewports in the case of very dense fur.

icon text– Enables and disables the display of the "VRayFur" text in the view port

automatic update– When enabled, the viewport preview of the fur will be updated automatically as the source object changes. However, this may slow down the interactive work with the viewports; in this case, turn the option off to disable the automatic update.

manual update– Click this button to manually refresh the viewport preview when automatic update is disabled.

Styling VRay Fur

It is possible to use vertex color maps to style the fur. A separate tool for this task, VRayFurStyler, can be downloaded from this page:

notes

  • Avoid applying textures with Object XYZ mapping to the fur. If you need to use a 3d procedural texture, apply a UVW Map modifier to the source object with the option to convert XYZ to UVW coordinates and use explicit mapping for the texture.
  • Avoid having very large triangles covered with fur, since the fur is generated in groups corresponding to triangles of the original mesh.
  • Shadow maps will not include information about the VRayFur. However, other objects will cast shadows on the fur, even with shadow maps.
  • Sharp VRayShadows may produce flickering with VRayFur in animations, because the lighting situation of individual hairs will change very rapidly. Area shadows or VRayLights may produce smoother results.
  • VRayFur will not work with Infinite Plane | VRayPlane as a base object.

The special VRayFur tool provided in the V-Ray renderer, as well as the standard Hair and Fur module, allows you to create surfaces covered with fur, but it still does not reach the standard module in terms of functionality. The fact is that wool or fur modeled with this tool does not look very impressive when rendered, and it is completely impossible to create hair and especially hairstyles from them. However, for modeling grass and various surfaces with a small pile (carpets, terry towels, etc.), VRayFur is perfect. Moreover, in some cases (if we are talking about relatively large surfaces in the background), it should even be preferred, since the rendering of fur and wool created in it is an order of magnitude faster than in the case of using the Hair and Fur module.

The VRayFur tool is in the category VRay section geometry(Fig. 52). The fur system is usually generated based on an already existing geometric surface (that is, the surface that should be covered with hair), although you can specify the surface after activating the tool VRayFur by clicking on the button source object(source object). The type of fur is set on the panel Modify by setting a series of parameters (Fig. 53), among which the most important ones are concentrated in the scroll Parameters. This is the length, thickness and bend of the villi ( Length, Thickness and Bend respectively), the degree of influence of the gravitational force on them ( gravity) and the number of villi in the group ( Knots). In addition, in the section Variation There are several parameters that can be used to achieve variations in the type of villi: their growth directions ( Direction var), lengths ( Length Var), thickness ( Thickness Var) and the level of gravity effect ( Gravity var). In section distribution the density of villi on the surface of the object is adjusted - hair can be assigned to a face ( per face) or on the area ( Per area). The first option ensures that each face generates the same number of villi, with the second, the number of villi on a face depends on its size (for about there are more villi on the larger faces, less on the smaller ones). There are also settings for limiting the fur distribution area on the surface of an object (these settings are concentrated in the section Placement). When choosing an option Entireobject all faces will generate fur. Option Selected faces will allow you to create fur only on selected faces (such faces need to be selected with a modifier MeshSelect), and the variant Material ID- only on faces with the specified material ID. There is also a scroll Maps, where texture maps are connected to control the parameters of the fur.

Rice. 53. VRayFur Tool Options

To understand the nuances of creating fur with the VRayFur tool, create a new scene with a regular ball (Fig. 54). Select the ball, activate the panel Create, In chapter geometry Select a category VRay and click on the button VRayFur- Separate villi will appear on the ball, scattered in a certain way (Fig. 55). The result obtained in the projection window and during visualization will bear little resemblance to real fur, since the number of villi is small (Fig. 56). It is not difficult to make the fur thicker and more natural - just increase the density of the villi on the surface of the object by entering in the field Per area, for example, 1 (this will not affect the fur in the projection window, since far from all the villi are displayed there, but it will be noticeable during rendering). And also correct the color of the mezdra (that is, the ball itself, to which the fur coating is assigned), by directly changing its color (Fig. 57). It's also a good idea to make the hairs translucent - for this you will have to create a translucent gradient material (Fig. 58) and assign it to the hairs and the ball itself. In addition, you can reduce the thickness of the villi ( Thickness) and increase their density ( Per area) - rice. 59. The resulting fur is already quite similar to the real one (Fig. 60).

Rice. 54. Original scene

Rice. 55. The appearance of individual villi on the ball

Rice. 56. View of a fur-covered ball with default parameters

Rice. 57. The result of an increase in the density of the villi and a change in the color of the mezra

Rice. 58. Gradient Material

Rice. 59. Fur settings

Rice. 60. View of the fur-covered ball after adjusting the parameters

If desired, the created fur can change many different parameters. For example, to make the villi lie more luxuriantly by decreasing the value of the parameter Bend and increasing the value in the field Knots(Fig. 61), or completely confused, significantly increasing the values ​​in the fields Direction var and Gravity var(Fig. 62).

Rice. 61. Type of fur with fluffy villi

Rice. 62. Type of fur with tangled villi

Terry cloth hanging from the ball

Let's use V-Ray's fur generation method to model the terry cloth hanging from the ball. We will not create the fabric itself (we modeled it in one of the previous lessons), so just open the appropriate scene (Fig. 63). Change the background color to light gray and set up lighting based on one Omni and two Spot sources, for one of the Spot sources turn on shadow generation by type VRayShadow(Fig. 64). Set V-Ray as the current renderer and render the scene (Figure 65).

Rice. 63. Original scene

Rice. 64. Emergence of light sources

Rice. 65. Initial view of the stage

Select the fabric thrown over the ball, activate the panel Create, In chapter geometry Select a category VRay and click on the button VRayFur- the fabric will be covered with sparse villi (Fig. 66). Reduce the length of the villi ( Length) to 5, and the thickness ( Thickness) - up to 0.1. Also provide b about More randomness in the location of the villi by entering in the fields Direction var and Gravity var value 0.4. In area distribution choose an option per face(Per face) and increase the density of the hairs on each face by entering in the field per face value 6 (Fig. 67). As a result, the appearance of the image during rendering will change (Fig. 68). Open the material editor and create a new material in it with a gradient texture, set for this texture in the fields color 1, color 2 and color 3 shades of burgundy so that in the field color 1 turned out to be the darkest of them (it will be at the base of the villi), and in the field color 3 (this is a shade for the tips of the villi) - the lightest (Fig. 69). Create a material with the same color in the field diffuse that is set in the field color 1 and assign it to tissue. Increase the density of the villi ( per face) until about 25-30 and visualize - now the fabric is already quite similar to terry (Fig. 70).

It turns out that making hairy carpets in max is not difficult at all. :)) The execution method is as follows:
1. Create Plane.
2.Apply a modifier to it hair and fur. Setting up. To do this, we need to work with the scroll General Parameters modifier.

Settings can be different, you need to try and select.

Scroll General Parameters in fact, it is responsible for setting the parameters of the villi (hair) themselves.

hair count- the total amount of hair.

hair segments is the number of segments in the hair.

hair passes- number of transparent paths (1-20).

Density- density.

Scale- the scale of the hairline of the model.

Cut Length- the total length of the hairline.

Rand Scale- the scale of the unevenness of the edge of the hairline.

Root thick- the thickness of the hair root.

Tip Thick- the thickness of the ends of the hair.

displacement- the distance between the roots of the hair and the surface of the model.

Interpolate- interpolation (construction of the surface of the hair, taking into account interpolation between splines).

You can experiment with these values ​​- create a fluffy and long-haired carpet, or vice versa. We also need the settings from the scroll Multi Strand Parameters - parameters of "curls". Here you can set the following values:

Count- quantity, increase in density;

Root Play- extension at the base;

Tip Splay- expansion at the ends;

Randomize- random distribution.

Now we need to lay our, how to say, hairs, otherwise they stick up.

In setting Styling choose a team Finish Styling. Hair Brush (Comb for hair) - the main mode of working with hair, in which you can move, scale, curl hair and other actions. This tool is represented in the active viewport as a circle whose diameter can be controlled. In fact, it is not a circle, but a cylinder. The comb affects all selected vertices that fall within their area of ​​effect. The size of the comb can be changed using the keyboard shortcut Ctrl + Shift or using the slider under the flag Distance Fade (Attenuation with distance). Switch to the side view - Front.

Now we need to use this tool to lay the hairs of the carpet a little to the sides. Let's see how it is shown in the pictures.
Now switch to the left view - Left. And we do the same.
You can tweak a little in the future .... the direction of the hairs can be set any, to your taste.

To assign materials to our carpet, a scroll is used. Material Parameters . Options Tip Color(end color) and root color(Root Color) allow you to select colors and textures to create a realistic rug. Options Specular(specular highlight) and Glossiness(glosiness) are identical to the Material Editor options.

Now all this needs to be converted to mesh. In the tab Tools choose command - Hair > Mesh. Still I do the following, in the same scroll Tools I click on Visualization Settings, we get the Environment and Effects window, the Effects tab, the Hair and Fur script, we change Hair from buffer to geometry.
The carpet weighs a lot, so you can send it to a proxy.
This is what I got with the following settings.


Sometimes, when 3D modeling, you need to create something fluffy... No, of course, in this lesson we will not talk about kittens (although someday we may touch on this topic), but about everything that has a surface consisting of small hairs. In the interior, these are carpets, various fur products, in architectural visualization - grass, and when people are included in the scene - their hair.

So, to create objects consisting of many hairs, or villi, a very useful modifier is used - Hair and Fur, literally “hair and wool”. And today we will figure out how to use it, and we will create a realistic carpet, fur and hair with it.

So, let's figure out what this modifier is and where to look for it. Those familiar with already know that all modifiers are in the Modify tab in the Modify List drop-down menu. I created a cube to see all the "chips" that I can apply to it, including Hair and Fur. See screenshot:

Let's apply it to our object to see what happens. Select the cube / Modify / Modify List / find our modifier. Here is such a hairy cube I got.

Now let's look at the basic settings of our villi. Scroll down to the General Parameters tab.

Let's consider them in more detail:

  • hair count. The parameter responsible for the number of villi.
  • hair segments. Responsible for the number of segments - the larger the value, the smoother the shape of our hair will turn out.
  • hair passes. Responsible for the number of rendering errors.
  • Density. Shows how densely the surface is planted with pile. 100 is the maximum value.
  • Scale. Hair scale.
  • Cut Length. With this option, you can cut the pile to a given height.
  • Rand. Scale. Responsible for the diversity in the length of the hairs. That is, some of them will be shorter, and some will be longer. A smaller value gives a smaller height difference.
  • root tick. Base thickness.
  • tip tick. Tip thickness.
  • displacement. Extrudes hair roots from the surface of the source object. The default is always 0.

By adjusting these settings, you can easily and quickly get a realistic model of a carpet, six animals or hair. What are we going to do.

Quick Carpet Creation with Hair and Fur

First, let's create the base for our carpet. Select menu Create/Shape/Rectangle.

Create a rectangle and set its parameters in the Modify tab. Let its size be 1000×1000 mm. And also we will make it rounded edges, by 100 mm. See screenshot below.

Now we have it just a contour, and we need to fill it. Apply the Garment Maker modifier to it. This will allow us to get a plane randomly divided into polygons.

Next, apply the UVW Map modifier from the same list of modifiers. We will need it if we further want to add texture to the carpet. It remains only to apply Hair and Fur. Here's what I got:

So far it looks more like an overgrown lawn than a carpet. To get the desired result, enter the parameters, as in the screenshot:

The rendering turned out to be a nice green rug with a fairly long pile.

However, in the interior, such a coating will look strange, because the villi cannot stand cleanly up. It will be much more realistic if we accept them a little, as if they were like him. To do this, scroll up and find the Hair Styling tool. It will allow us to bend our pile in any direction without any problems.

We press the button and with a ball in a chaotic manner we crush the hairs. Don't forget to press the Finish Styling button.

It remains only to stretch the desired texture and that's it - our carpet is ready and looks quite realistic!

Creating hair on a human head

Hair can be created in the same way. But you need to select the necessary polygons on the head of the 3d model of a person, then simply copy them to the side as a separate independent object. And already apply the Hair and Fur modifier to this object, and then deal with the hair settings. Here is another option for working with hair (watch the video tutorial):