# Scene Settings

The **Scene Settings** component is a scene-wide singleton for Flora behavior.

## What This Affects

* Scene render enable/disable
* Terrain foliage integration and auto-registration
* Scene-level occlusion, motion vectors, light probes, density gating
* Terrain detail streaming controls

***

### Properties

#### <mark style="color:yellow;">OverrideCullingPipeline</mark> *(Obsolete)*

* Kept for migration compatibility.
* Has no effect in current Flora.

#### <mark style="color:yellow;">CullingPipelineOverride</mark> *(Obsolete)*

* Kept for migration compatibility.
* Has no effect in current Flora.

***

#### <mark style="color:yellow;">EnableRendering</mark>

* Master scene toggle for Flora rendering.

#### <mark style="color:yellow;">EnableTerrainFoliage</mark>

* Enables Flora rendering for terrain trees/details.

#### <mark style="color:yellow;">AutoRegisterTerrains</mark>

* Automatically registers active terrains using `FloraTerrainProvider`.

***

#### <mark style="color:yellow;">AllowGPUOcclusionCulling</mark>

* Scene-level gate for GPU occlusion.

#### <mark style="color:yellow;">AllowPerObjectMotionVectors</mark>

* Scene-level gate for per-object motion vectors.

#### <mark style="color:yellow;">AllowPerTreeMotionVectors</mark>

* Tree motion vectors; requires `AllowPerObjectMotionVectors`.

#### <mark style="color:yellow;">AllowPerDetailMotionVectors</mark>

* Detail motion vectors; requires `AllowPerObjectMotionVectors`.

#### <mark style="color:yellow;">AllowPerTreeLightProbes</mark>

* Enables per-tree probe sampling.

#### <mark style="color:yellow;">AllowPerDetailLightProbes</mark>

* Enables per-detail probe sampling.

#### <mark style="color:yellow;">AllowDensityCulling</mark>

* Enables density systems in this scene.

#### <mark style="color:yellow;">AllowLegacyLightProbes</mark>

* Enables legacy baked light-probe usage for scene content.

***

#### <mark style="color:yellow;">DetailStreamingMode</mark>

* Controls the overall terrain detail streaming behavior.
* `Immediate` spends as much work as needed to make visible details appear quickly.
* `Streamed` is the default mode and uses the responsiveness slider to control how aggressively Flora spends its per-frame streaming budget.
* `Custom` exposes Flora's internal per-frame rebuild and structural budgets directly for advanced tuning.

#### <mark style="color:yellow;">DetailStreamingResponsiveness</mark>

* Controls how aggressively Flora spends its streaming budget.
* Higher values make visible details catch up faster.
* Lower values spread work across more frames to reduce spikes.
* Ignored when `DetailStreamingMode` is `Immediate` or `Custom`.

#### <mark style="color:yellow;">CustomDetailPatchLayerBudgetPerFrame</mark>

* Advanced-only control used when `DetailStreamingMode` is `Custom`.
* Limits how many detail patch-layer rebuilds Flora may schedule per frame.
* `0` means unbounded.

#### <mark style="color:yellow;">CustomDetailStructuralInstanceBudgetPerFrame</mark>

* Advanced-only control used when `DetailStreamingMode` is `Custom`.
* Limits how many detail create/destroy instance operations Flora may apply per frame.
* `0` means unbounded.

#### <mark style="color:yellow;">DetailUnloadHysteresisSeconds</mark>

* Acts as an unload grace period.
* Flora keeps terrain details alive for this many seconds after they leave range before unloading them.
* Increasing it reduces rapid disappear/reappear popping when hovering near the detail distance boundary.

## Runtime User Settings Workflow

You can apply user-controlled render/density values at `Start` (or any runtime point) via the global Flora volume components:

```csharp
var sceneSettings = FloraSceneSettings.GetOrCreate();

var render = sceneSettings.GetGlobalRenderSettings();
render.MaxRenderDistance.Override(userRenderDistance);

var density = sceneSettings.GetGlobalDensitySettings();
density.GlobalDensityMode.Override(FloraDensityMode.RenderersOnly);
density.GlobalDensity.Override(userDensity);
```

Use `Override(...)` instead of assigning `.value` directly, so the volume parameter is actually active.

## How To Verify

* Disable `EnableRendering` and confirm Flora-rendered content disappears.
* Disable `EnableTerrainFoliage` and confirm terrain foliage returns to non-Flora behavior.
* Change the detail streaming controls and verify streaming behavior near distance boundaries.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flora.magneticarcade.com/scripts/scene-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
