Creating “Spline Guides” and “Mesh Guides”

Mesh that generates the fur can be a skinned mesh or a static mesh. When using free gFur, only skinned meshes are supported. There are two options to style the look of the fur – splines and meshes. Seems like currently splines can be reliably generated and exported only from 3ds Max. We will try to add some more options later.

There are two basic requirements for spline guides to work in any 3D app:

• splines have to “grow” from vertexes of the mesh (not from faces or edges)
• the 3d application has to be able to export splines into the fbx file format without conversion to geometry

Mesh guides are exported as separate skinned meshes, but they have to have the same vertex ID’s as the mesh that will be used to grow the mesh. Easy verification for a correct guide mesh is that these have to work as morph targets in the 3D application. This serves only as a way to check for errors, meshes are not exported as morph targets, but rather as separate meshes skinned to the same bones as the mesh that will be used to grow the fur.

First let’s have a look at the workflow with the “Spline Guides”. Spline Guides have to “grow’ from the vertexes of the “Grow Mesh” because each vertex becomes associated with it’s spline and the same vertex on each successive layer/shell will follow and stick to that spline. Because of how this fur technique works, we can’t control the direction of every single hair, but rather we control the direction and “trajectory” of each vertex across the generated shells and in effect we can control the shape of a cluster of many fur hairs.

The following steps are required in 3ds Max to get working “Spline Guides”. The process can be replicated in any 3d application where splines can “grow” from vertexes and where they can be exported into fbx file format without conversion to geometry.

1. We take our skinned mesh and duplicate it and remove the skin. We could do the whole process on the original mesh with the skin. This first step is more of a workflow preference than anything else.
2. Assign the “Hair and Fur” modifier to our mesh.
3. Next we turn on “Display Guides” and turn off “Display Hair”

4. Now we can groom and style the fur with the available tools in Hair and Fur modifier
5. After we are done with grooming, we have to extract the Hair and Fur guides into spline object. Make sure to place the mesh in [0,0,0] coords if you were grooming on a mesh that is moved out of the middle of the scene.

Mesh Guides work very differently in the setup phase in 3d application, but they end up being almost the same in Unreal Engine. It could be said that with Mesh Guides we are creating a frame in which “Guide Splines” will be generated by gFur shell component. Advantage of Mesh Guides is that they seem to be easier to get done right in any 3D application.

As mentioned earlier, Mesh Guides have to follow a few rules:

• they have to be skinned to the same bones as the Grow Mesh
• they have to work as morph targets for the Grow Mesh – this is a quick way to check if vertex IDs are the same (they have to be the same)
• Mesh Guides should not cross each other as this will lead to different visual errors in the engine

Depending on how much control we want to have over the shape of the fur, we can decide how many Mesh Guides we want to create and how we want to deform them. Even only one Mesh Guide could be sufficient to define the tip of the fur. More Mesh Guides would be useful if you want your fur to be more defined along the length of the fur hairs – e.g. you may want to bend them or twist them along their length.

Let’s have a look at the workflow that can be easily replicated across different 3d apps:

1. Duplicate the mesh with skinning already applied, keep the skinning on the duplicate too – this will be the first Mesh Guide
2. Make sure you “bake out” the skinning into vertexes (skinning in envelopes will not work correctly)
3. Shaping of the Mesh Guide should be done in modifiers below the skin modifier

a. You should make sure that each successive Mesh Guide is pushed at least slightly above the previous Mesh Guide (or the original Grow Mesh in the case of the first Mesh guide mesh) – this can be easily achieved by “Push Modifier” being always the first one in the stack
b. continue with with different vertex selections with falloff followed by modifiers like bend, noise or anything else that helps you to style the fur

4. Duplicate the mesh from step 3 and continue shaping another Guide Mesh – make sure, that after more modifications, this mesh won’t be crossing the previous Guide Mesh
5. Finally, export all the meshes to fbx file format. For optimization purposes, it’s common to export the following meshes:

a. mesh with suffix like “_Base” – this mesh usually contains parts of the character that don’t need fur
b. mesh with suffix like _GrowMesh – this is the mesh that we want to cover with fur
c. export every “Guide Mesh” as separate fbx file – remember that these meshes have to be also skinned to the same bone structure as the _Base and _GrowMesh meshes

Most of the import works as you are used to. The only exception are “Fur Guides” which even with “auto import” on, have to be imported manually.

When importing skeletal “Mesh Guides” you should use the skeleton of the “Grow Mesh” or “Base Mesh”.