Optimization tips

In this guide, we will have a look at some optimization techniques that can be used with gFur.

Often times we need fur with both, very short and very long hair on different parts of the character. Imagine a mane of a lion or a deer. To achieve good visuals, we need certain amount of gFur shells or layers. On the other hand, the more fur layers we have, the higher is the performance hit.

So when dealing with both short and long fur on a single character we may first cover the character in short hair with only a few layers. Then we create a new “Grow Mesh” which only covers the parts of the character where we want to use long fur. For this new “Grow Mesh” we need separate set of “Spline Guides” or “Mesh Guides”.

We could go one step further and actually remove the parts of the mesh from the short fur where we will be growing the long fur. But because short fur is using only a few layers, this may not be worth the extra work involved.

While we could cover the whole character with fur, including for example the tongue and teeth and then remove the fur on those parts via “Blend Mask” (green channel texture specifically), it’s practical and faster to have those parts separated into a “Base Mesh”. “Grow Mesh” then contains parts that will be covered in fur.

There is a caveat – it’s usually problematic to detach parts like a nose or hoofs into the “Base Mesh” because most often we will get seams between the mesh without fur and mesh with fur. So for those it’s better to keep them in the GrowMesh and remove the fur via “Blend Mask”.

 

Quite many times it’s better for the grow mesh NOT to represent a “naked” character, but already have some volume. This volume can replace lowest/deepest parts of the fur and then gFur can simulate the rest of the fur where it matter the most for the visuals.

This will better work for denser fur, for example on an animal.

There are two parts, or two different optimization techniques that can be used in the LOD system. The first makes use of Unreal Engine LOD system and the other one uses gFur layer (shell) removal for LODs. We can use these separately or both at the same time. LODs are quite powerful optimization technique which involves some work and setup to work correctly and therefore we will talk about them in a separate guide.

Bias parameter may help optimize the performance without affecting the visuals much. By default the fur layers or shells are generated linearly along the length of fur hairs. Quite often the fur is long enough for fur tip to actually occlude the root of the fur hair. This is a good opportunity to make use of the “Bias” parameter. Bias will push the fur layers more towards the fur tip, making layers more sparse at the roots and more dense at fur tip. Default value 1.0 is already pushing the shells a bit more towards the tip. Zero would be the linear distribution. Using too large Bias will lead to visual issues at the fur root. So as with many options, experimenting is necessary to find the right balance.

If performance is crucial and too few fur layers have to be used, and certain type of stylization is not an issue, the “Noise” parameter can help to break up the too obvious shell slices. Together with “Bias” parameter it should be possible to achieve a working and performant compromise. “Noise” parameter may be a stylistic choice even if performance is not such an issue.