SpeedTree
    Show / Hide Table of Contents

    Level of detail

    Level of detail (LOD) refers to decreasing the complexity of a model as it moves away from the camera. A model that's far away doesn't need to have as much detail as one that's close. Reducing complexity in this fashion reduces the load on rendering hardware, allowing many trees to render on screen at the same time.

    SpeedTree has 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 LOD is for real-time use. For VFX, use Resolution instead.

    Previewing LOD

    To turn on LOD for a tree, do one of the following:

    • In the Tree Window toolbar, select LOD and enable Dynamic LOD.
    • In the Tree generator properties, under Dynamic LOD, check the box for Enable.

    When you turn on LOD, the LOD indicator becomes editable from the Tree Window toolbar. The same indicator appears in the bottom left corner of the Tree Window.

    The Level of Detail control. It spans from "Low" to "High," with the arrow set closer to "High" in this scenario.

    By default, the slider is in Manual mode. If you drag the arrow up and down in the LOD control (or hold CTRL while dragging the left mouse button up and down), the tree will dynamically change LOD. You can see the polygon counts update as this occurs.

    Switch the LOD mode from Manual to Screen Area to disable any mouse input on the control. The tree will dynamically change LOD as you move the camera nearer or farther away.

    Global settings

    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.

    A tree undergoes an LOD transition in three stages, which is shown through three trees. The first tree has many branches, the second tree has some branches shrunk to their spines, and the third tree shows that the shrunken branches have disappeared.

    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.

    Leaves

    As previously mentioned, leaves not only shrink away but the leaves that stay will 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:

    Three trees. The first tree, labeled "Original," has a bushy appearance with many leaves. The second tree, labeled "Lowest LOD," has few leaves at its interior, making it far less bushy. The third tree, labeled "Lowest with Jumble and Grow," has foliage that looks almost as full as the original.

    Individual settings

    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.

    Segments

    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.

    Closely packed segments are illustrated on a branch with no optimization. Less complex and dense segments are illustrated on a branch with optimization.

    Note

    Too much segment reduction, especially in length, can cause visible pops. Preview the LOD switch to make sure this isn't noticeable.

    Mesh LOD

    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.

    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.