Quick answer: Unity terrain has a Tree Distance setting that controls the maximum distance at which trees are rendered. Beyond this distance, trees are culled entirely. Additionally, the Billboard Start value determines when 3D tree models switch to flat billboard sprites.
Here is how to fix Unity terrain trees disappearing distance. You paint thousands of trees across your terrain, everything looks great in the Scene view, but at runtime half the forest vanishes beyond a certain distance. Players see a barren horizon where a dense woodland should be. Sometimes trees pop in and out as the camera moves, or they turn into flat cardboard cutouts far too close. This guide covers every cause of disappearing terrain trees and how to fix each one.
Understanding Terrain Tree Rendering
Unity renders terrain trees in three stages based on distance from the camera. Close to the camera, trees render as full 3D mesh models with all LOD levels. At a configurable distance, they switch to 2D billboard sprites that always face the camera. Beyond the maximum tree distance, they are culled entirely and not rendered at all.
The two critical settings that control this behavior are Tree Distance and Billboard Start, both found in the Terrain component under the Settings tab (gear icon) in the Tree & Detail Objects section.
Solution 1: Increase Tree Distance and Billboard Start
The most common cause of disappearing trees is simply that the Tree Distance value is too low for your scene. The default value of 5000 units works for many games, but large open-world terrains may need much higher values.
using UnityEngine;
public class TerrainTreeSettings : MonoBehaviour
{
[SerializeField] private Terrain terrain;
[SerializeField] private float treeDistance = 10000f;
[SerializeField] private float billboardStart = 200f;
[SerializeField] private float detailObjectDistance = 250f;
void Start()
{
// Set tree draw distance
terrain.treeDistance = treeDistance;
// Distance at which trees switch from 3D mesh to billboard
terrain.treeBillboardDistance = billboardStart;
// Also adjust detail distance for grass and small objects
terrain.detailObjectDistance = detailObjectDistance;
}
}
You can also set these values directly in the Inspector on the Terrain component. Select your Terrain, click the gear icon for Settings, scroll to Tree & Detail Objects, and adjust Tree Distance and Billboard Start.
Solution 2: Fix Billboard Rendering Issues
Sometimes trees do not disappear entirely but switch to billboards that render incorrectly—they turn invisible, show as pink quads, or face the wrong direction. This usually happens when the billboard atlas texture is missing or the billboard shader is not included in the build.
using UnityEngine;
// Script to regenerate terrain tree billboards at runtime
public class TreeBillboardFixer : MonoBehaviour
{
[ContextMenu("Regenerate Tree Billboards")]
public void RegenerateBillboards()
{
Terrain terrain = GetComponent<Terrain>();
if (terrain == null) return;
// Force terrain to rebuild its billboard textures
terrain.terrainData.RefreshPrototypes();
// Flush the terrain system to apply changes
terrain.Flush();
Debug.Log("Tree billboards regenerated for: " + terrain.name);
}
}
If billboards show as pink, it means the shader is missing. Go to Project Settings → Graphics → Always Included Shaders and add Nature/SpeedTree Billboard and Hidden/TerrainEngine/BillboardTree to the list.
Solution 3: Fix SpeedTree Shader Compatibility
SpeedTree assets include their own shaders that must match your render pipeline. Using a Built-in pipeline SpeedTree shader in a URP project causes trees to render pink or not at all. The same applies when upgrading a project between render pipelines.
using UnityEngine;
public class SpeedTreeShaderValidator : MonoBehaviour
{
void Start()
{
Terrain terrain = GetComponent<Terrain>();
TreePrototype[] prototypes = terrain.terrainData.treePrototypes;
foreach (TreePrototype proto in prototypes)
{
if (proto.prefab == null) continue;
Renderer[] renderers = proto.prefab.GetComponentsInChildren<Renderer>();
foreach (Renderer rend in renderers)
{
foreach (Material mat in rend.sharedMaterials)
{
if (mat != null && mat.shader.name.Contains("Hidden/InternalErrorShader"))
{
Debug.LogError($"Tree '{proto.prefab.name}' has a broken shader. " +
"Assign the correct SpeedTree shader for your render pipeline.");
}
}
}
}
}
}
For URP projects, SpeedTree materials should use Universal Render Pipeline/Nature/SpeedTree8. For HDRP, use HDRP/Nature/SpeedTree8. You can batch-update materials by selecting all tree prefabs and reassigning the shader in the material inspector.
Solution 4: Adjust Camera Far Clip Plane
Even if your terrain tree distance is set high, the camera’s far clip plane can still cull trees. If the camera’s far clip is 1000 but your tree distance is 5000, trees beyond 1000 units will not render regardless of terrain settings.
using UnityEngine;
public class CameraDistanceSync : MonoBehaviour
{
[SerializeField] private Terrain terrain;
void Start()
{
Camera cam = GetComponent<Camera>();
// Ensure camera can see as far as trees are rendered
if (cam.farClipPlane < terrain.treeDistance)
{
cam.farClipPlane = terrain.treeDistance + 500f;
Debug.Log($"Camera far clip adjusted to {cam.farClipPlane} to match tree distance");
}
}
}
Solution 5: Performance-Aware Tree Distance Scaling
Rendering thousands of trees at extreme distances is expensive. Rather than setting tree distance to the maximum and hoping for the best, scale it based on the player’s quality settings or current frame rate.
using UnityEngine;
public class AdaptiveTreeDistance : MonoBehaviour
{
[SerializeField] private Terrain terrain;
[SerializeField] private float minTreeDistance = 2000f;
[SerializeField] private float maxTreeDistance = 10000f;
[SerializeField] private int targetFPS = 60;
private float currentDistance;
void Start()
{
// Set initial distance based on quality level
float quality = QualitySettings.GetQualityLevel() / (float)(QualitySettings.names.Length - 1);
currentDistance = Mathf.Lerp(minTreeDistance, maxTreeDistance, quality);
terrain.treeDistance = currentDistance;
}
void Update()
{
// Dynamically adjust based on frame rate
float fps = 1f / Time.unscaledDeltaTime;
if (fps < targetFPS - 5 && currentDistance > minTreeDistance)
{
currentDistance -= 50f;
terrain.treeDistance = currentDistance;
}
else if (fps > targetFPS + 10 && currentDistance < maxTreeDistance)
{
currentDistance += 25f;
terrain.treeDistance = currentDistance;
}
}
}
“Disappearing trees are almost always a settings issue rather than a bug. Check Tree Distance, Billboard Start, camera far clip, and shader compatibility in that order. Nine times out of ten, one of those four is the culprit.”
Related Issues
If your terrain trees look correct but terrain textures are blurry at distance, see Fix: Unity Terrain Textures Blurry at Distance. For trees that render correctly but have no collision, check Fix: Unity Terrain Tree Collision Not Working. To track visual bugs like disappearing trees across different hardware, read Bug Reporting Tools for Unity Developers.
Always check Tree Distance and Billboard Start first. Match your camera far clip plane to your tree distance. Use the correct SpeedTree shader for your render pipeline. If performance is a concern, scale tree distance dynamically rather than reducing it globally.