Creating and Using LODs

Let’s have a deeper look at gFur LODs, how to correctly create them and what are the necessary steps in Unreal Engine. There are two options with LODs which can be used separately or both at the same time. First option is polygon reduction of the “Grow Mesh” which will result in every fur layer using less polygons. The other option is to reduce the number of fur layers for each successive LOD level.

Great thing about the system is that it does not require any more work on “Spline Guides” or “Mesh Guides”.

The most important requirement for gFur LODs to work correctly is that the optimized meshes can’t move the vertexes of the mesh. The reduction in polygons has to work by removing polygons, edges and vertexes, but new vertexes can’t be created or old vertexes can’t move. Each successive LOD should usually have around 50% of polygons of the previous mesh. As many LODs as necessary can be used, but on the other hand, more LODs take up more memory. So usually, around 4 or even 3 or 2 LODs will do the job.

1. We start by duplicating the original Grow Mesh and remove the skinning.
2. Then we apply optimization modifier, in 3ds Max ProOptimizer works great.
3. For the first LOD we can use around 50% of polygon reduction
4. We then collapse the whole mesh.
5. Using Skin Wrap or similar in other 3D applications we re-skin the LOD using the original mesh as source.
6. Convert the skinning from Skin Wrap to regular Skin.
7. We export the LOD with the skeletal structure to fbx file format, call the mesh something like “RedDeer_GrowMesh_LOD1”.
8. Repeat steps 1-7 as many times as required, using more and more optimizations (keep 25% polygons for LOD #2 and so on).

1. In Unreal Engine we import the LODs and use the “RedDeer_Base_Skeleton” as target skeleton. 2. Next we open the RedDeer_GrowMesh and once again we import and assign the LODs from the fbx file. We could leave out the first step altogether, but this way we will have everything nicely together in the project, ready for experimentation (we could, for example, use the first LOD importend in step 1. directly as a grow mesh).

a. For LOD 0 (main mesh) we can leave “Screen Size” at 0.0 b. For LOD 1 try 0.75 c. And for LOD 2 try 0.5 for “Screen Size” Remember the values because they will be useful in the next steps

3. Then we setup the fur as usually – drop the _Base mesh into viewport, add gFur component, assign the _GrowMesh and Spline Guides or Mesh Guides. 4. Next step would be to setup gFur component to use the LODs of the Grow Mesh for the fur layer generation.

a. In gFur component, “gFur Shell Settings” section add a new LOD and use similar value for “Screen Size” as in 2b., for example 0.75; for LOD set the value to 1 which will use the first LOD of the Grow Mesh b. Add as many LODs as needed

5. Now when zooming away from the mesh, at a certain point, both, the Grow Mesh will switch to first LOD and also gFur component will switch fur to be generated from Grow Mesh LOD1. Zooming further away will switch to any more successive LODs

This optimization is much simpler to setup. It can be used even if we haven’t created LOD meshes for the Grow Mesh. We just add a few LOD levels in the gFur component and for each we setup a lower number of shells or layers to be used along the “Screen Size” at which gFur should start using less layers.

Finally, we combine the “LOD optimized meshes” and “shell removal” for the best optimization.