New: Nature Renderer 2021

Render vast amounts of detailed vegetation on your terrain.

Learn more
This page may not work correctly inside the Unity editor. Open in browser

Render Distance Limit

Nature Renderer limits the render distance for detail objects to 250 in the component's inspector, this is done to keep the performance in check. Increasing the distance further can have a large impact on performance and memory usage, so it is not recommended to increase it unless absolutely necessary for your project.

Script

Increasing the distance past 250 can be done with a script. Create the following script in your project and attach it as a component to the Terrain (make sure the name of the script file is "NatureRendererDetailDistance"):

using UnityEngine;
using VisualDesignCafe.Rendering.Nature;

[ExecuteAlways]
public class NatureRendererDetailDistance : MonoBehaviour
{
    [Delayed]
    [SerializeField]
    private float _detailDistance = 500;

    private void OnEnable()
    {
        ApplyDetailDistance();
    }

    private void OnValidate()
    {
        ApplyDetailDistance();
    }

    private void ApplyDetailDistance()
    {
        var natureRenderer = GetComponent<NatureRenderer>();
        if( natureRenderer != null )
            natureRenderer.DetailDistance = _detailDistance;
    }
}

Troubleshooting

If the render/culling distance appears to be less than the distance that is set then it may be caused by one of the following:

  • Some custom shaders (such as the shaders used by Nature Manufacture) have their own culling distance that is handled by the shaders themselves. In this case, you'll need to edit the culling distance in the material because Nature Renderer can't override the shader code.
  • Objects can fade out due to mipmapping long before the culling distance. It is recommended to enable Mip Maps Preserve Coverage in the import settings of your textures to ensure that objects don't fade out too quickly.
  • If the detail object has a LOD Group then the culling distance of the LOD Group is used instead of the Detail Distance that is set in the Nature Renderer component.
Was this article helpful?
2 out of 2 found this helpful