Fur Thickness and Overall Shape

From Warren's Fast Fur Shader
Jump to navigation Jump to search

Fur Thickness and Overall Shape[edit | edit source]

FurThicknessOverallShape..png

Fur Shape Data Map[edit | edit source]

The Fur Shape Data Map contains the grooming data for the fur. The channels are encoded as follows:

  • Red - Combing direction X (0 = left, 0.5 = centre, 1 = right)
  • Green - Combing direction Y (0 = down, 0.5 = centre, 1 = up)
  • Blue - Fur thickness (0 = no fur, 1 = maximum thickness)
  • Alpha - Hair density (0 = 1% density, 0.5 = 100% density, 1 = 10,000% density)

The shader package includes a Fur Grooming tool for editing the Fur Shape Data Map.

Advanced users may wish to edit the Fur Shape Data Map directly, using other tools, such as Photoshop or GIMP. If so, then be aware that a "blank" texture should have the Red, Green, and Alpha channels set to 0.5, not 0. Also, it is worth noting that the Red/Green combing direction is the same encoding used by Normal Maps.

Height Masks[edit | edit source]

Height Masks are typically used to trim the fur when clothing is being worn. All 4 channels (ie. Red, Green, Blue, and Alpha) of all 4 Height Masks are treated as additional Fur Shape Data Map fur thickness channels (ie. Blue). The shader will use the lowest (ie. shortest) value out of all the channels that are active.

For example, on my avatar, I have chosen to use Height Mask 1 for my shirts, and Height Mask 2 for my pants. I then use the Red channels for large items of clothing, Green for medium, and Blue for small. You don't need to follow my example, you are free to organize the masks however you wish.

So, to trim my fur when I am wearing large pants and a large shirt, I use an Animation to turn on the red channels of my Height Masks:

My large shirt and large pants height masks.

Height Mask channels are typically made by making a copy of your Fur Shape Data Map, re-grooming it to remove the fur from areas that are covered by clothing, and then copying the Blue channel from that re-groomed Fur Shape Data Map to a Height Map channel.

The shader includes a utility to do this, in the Fur Shape Data Map Utilities section of the shader GUI.

Fur Thickness Calibration[edit | edit source]

The shader will scale itself according to the length of a mesh's "Normals", which allows it to correctly grow/shrink the fur's thickness whenever the avatar itself is scaled.

To do this correctly, it first needs to be calibrated. The shader GUI will attempt to do this automatically the first time a material is loaded, however, it may not be correct.

The calibration can be manually adjusted by clicking the "Increase" or "Decrease" buttons, which will double or half the calibration number. Or, in v4.2 and higher, the calibration number can be set manually.

Fur Thickness[edit | edit source]

The Fur Thickness slider is multiplied by the calibration number in order to determine the fur's maximum length. This is then multiplied by the groomed length to get the fur's final length.

The shader will automatically pack the geometric layers together wherever the fur is shorter, which increases the resolution. Fur that has been groomed to less than 50% maximum height will also have some of the layers skipped, as a speed optimization.

Note: thicker fur is more demanding on the GPU despite being lower resolution, while shorter fur is less demanding despite being higher resolution.

The resulting maximum world-space thickness is displayed in the GUI, as well as how dense the fur layers will be packed together:

Image.png

The "Max fur: 33mm thick" refers to the maximum thickness of my avatar's fur. On my avatar, most of my fur is groomed to 70% maximum length, and only my cheeks, tail, and chest are groomed to 100% maximum length.

"100% density" refers to how the shader's automatic optimization algorithm will render the thickest fur. If the fur is very thick, the shader will need to make the gaps between the layers bigger, so a density level less than 100% means that the fur is being rendered at lower quality than normal. Conversly, very short fur will have the layers packed tightly together, giving it a density higher than 100%, and thus being rendered at higher quality.

Fur Min Height Cutoff[edit | edit source]

Any fur lower than this limit will be treated as zero-height, and will not be rendered.

Note that this should never be set to zero, since texture compression artifacts will cause barely-visible "peach fuzz" fur to be rendered, which will lower the shader's performance.

Combing Strength[edit | edit source]

Body Shrink / Expansion[edit | edit source]