This script creates curves starting from the selected surfaces with controlled CV point distribution. The curves, that are generated following the normal direction of the surface, can be used to create a hair system.
Create hair function in Maya nHair generates hairs that can only have a linear distribution of CV point. The number of CV points has to be set in order to obtain a division length (divided by the subdivision) that allow a nice curve where hairs bend.
Because normally hairs bend close to their roots, having a distribution with more CV points on the root can be useful to reduce the total number of CV points required. Reducing the number of CV points comports a lower number of faces in the polygon obtained after the conversion of the paint effect into poly.
The customization of the CV point’s distribution is done considering the hair divide in two parts.
The value Division is the position of the end of the first part of the hair (considering the hair a unit length).
The two part also have a value Exp that indicate the exponential factors of the distribution fall off (values between 1 and 2 work well).
In the first image are showed two hair systems, on the left side there is the one generated with the script and with a quadratic fall off. On the right side is the one generated with Maya and with linear distribution. Both the systems have the same number of CV points and hair length. The hairs generated with the script have a better shape compare with the one with linear distribution. Only with a value of subdivision of 2 (increasing the number of poly faces 4 times) the linear distribution has a nice curve as show in the other image.