This is an old revision of the document!
“Level of detail” (LOD) refers to decreasing the complexity of a model as it moves away from the camera. A model that is far away doesn't need to have as much detail as one that is close. Reducing complexity in this fashion reduces the load on rendering hardware, allowing many more models/trees to be rendered on screen at the same time.
Certain SpeedTree products includes automatic, dynamic LOD generation. The LOD is “dynamic” because it changes smoothly as the distance to the tree changes, hiding any geometry “pops” that discreet LOD levels would otherwise cause.
Note: Automatic Level of Detail is a feature included only in the SpeedTree products for real-time use (SpeedTree for Games, UE4, Unity, Lumberyard, etc.). SpeedTree products for VFX (Cinema, Studio, etc.) do not include LOD and should instead use Resolution.
When you do this, an LOD control will appear in the bottom-left of the Tree Window, shown to the left. By default, the slider is in “Manual” mode. If you drag the arrow up and down in the LOD control, the tree will dynamically change LOD. You can see the polygon counts update as this occurs.
Clicking the “…” button at the bottom of the LOD control allows you to switch the LOD mode from “Manual” to “Screen Area.” This will disable any mouse input on the control, but the tree will dynamically change LOD as you move the camera nearer or farther away.
During an LOD transition, parts of the tree will be removed intelligently to reduce complexity but keep the transition seamless. This is done by analyzing the tree to see which parts are hidden in the interior. A part that will be removed shrinks until it is invisible before the geometry is completely removed in the next LOD level.
For example, branches will shrink away to their spine before ultimately going away (see below). Leaves shrink away in a similar fashion, but other leaves also grow to maintain the tree's silhouette.
To control how many parts are removed at a global level, use the LOD curves property in the Dynamic LOD property group in the Tree Generator. With these curves, you are controlling the reduction over the course of the tree's total LOD transition. There are a number of these properties, to control the reduction of different geometry types in the tree: branches, leaves, decorations, etc.
As previously mentioned, leaves not only shrink away, but leaves that stay will also grow. You can control how much they grow with the “Grow Scale” property.
Often, leaves in the interior of the tree will be flagged for removal before those on the outside of the tree. This might result in the interior leaves being carved out, leaving just a shell around the tree. This may or may not be what you want. You can add some noisiness to this removal by adjusting the “Jumble” property.
Using “Grow Scale” and “Jumble” are key to maintaining the silhouette and keeping the “fullness” of the tree:
In addition to the global settings, there are additional settings on each Generator for dealing with LOD. With these you can fine-tune LOD changes to be more seamless, or reduce complexity in a more aggressive manner in places that won't be seen.
The “Dynamic LOD:Weight” property is an important one, as it influences what gets removed. When you adjust the global LOD curve for Branches, for example, you are setting how many branches you want at each level. Branches are removed based on their size and how “hidden” they are in the tree. However, modifying the “Weight” property on individual parts of the tree will influence this computation. Branches with higher weight will “win” over branches with lower weights, and will remain in the tree.
Branches and fronds can change their segments with LOD, reducing the complexity of the geometry even if it stays in the tree. This can be done explicitly for length or radial segments, or you can adjust the “Optimization” property so the Modeler will intelligently decide where to remove segments to keep the same overall shape.
Note: Too much segment reduction, especially in length, can cause visible pops. Preview the LOD switch to make sure this isn't noticeable.
On parts of the tree that can use a mesh (leaves, fronds, etc), you can switch out this mesh to lower quality versions as LOD changes.
Mesh LOD levels are set up in the Mesh Asset Bar. As the LOD curve on the “Mesh Index” property decreases, the lower LOD meshes will be chosen to place in the tree.
Similar to segment reduction, mesh LOD can cause visible pops you need to be careful to avoid. This is especially so if you are using mesh anchors to place children. If the mesh anchors move with LOD, the tree might change drastically.