Skip to content

RT vegetation: a dense casting meadow needs more builds per frame than the budget allows, so the TLAS is withheld near it #1578

Closed

Description

@drsnuggles8

What happens

In the IntegratedRenderer benchmark meadow (Scenes/Benchmark/IntegratedRenderer.olo, camera inside the grass), the two casting grass layers plan 1,681 to 1,954 ray-traced vegetation groups within their 150 to 170 m view distance. The per-frame vegetation budget allows VegetationPolicy::UpdatesPerFrame = 1024 acceleration-structure builds. A group is one build per part, whatever its plant count.

At the live editor's 0.1 s frame step, every group is past its proxy deadline (0.05 s), so every group refreshes every frame. The casting plan from #1354 then puts 657 to 930 groups OUT and withholds the TLAS from every ray-traced effect. It is explicit, counted and stable (pressure: frameWork, one fallback engagement, raster shadow maps instead), but it is withheld for as long as the camera is anywhere near the meadow.

Measured live on Vulkan with olo_rt_scene_stats, Release editor, RTX 4090, 2026-10-09:

view casting groups planned as cards out castingDemandBuilds
overview, 200 m 83 0 0 83
meadow edge 1,954 215 930 1,024
inside the meadow 1,681 233 657 1,024

The complete lower-cost tier (cards) does not help here: a card group is still one build, so the build count, not memory, is what binds.

The decision this needs

Which of these, or what mix:

  1. Coarser casting groups beyond the mesh distance, e.g. card groups sized by area rather than by CardPlantsPerGroup = 256 plants, so a far field costs fewer builds.
  2. A larger UpdatesPerFrame for casting layers, measured against the backend's actual build time.
  3. A longer proxy deadline for far casting groups, i.e. a looser shadow error bound at distance than the 0.25 m MaximumWorldDisplacementError.

Each one changes either a declared error bound or the budget the backend is sized for, so it is a design call rather than a bug fix.

Found while working on #1354.
Not fixed in #1579 because: needs a decision — the fix changes a declared error bound or the backend's per-frame build budget, and both options trade shadow fidelity or frame time.

capability: 3
craft: 3
stability: 2
decay: 2
effort: 3
confidence: 0.6
learning: 3
fun: 2
kano: performance
blocked_by: []
blocks: []

Rebuild validation in #1603

Not fixed in #1603 because: needs a decision — changing the vegetation frame-work budget, grouping or declared shadow error/representation-quality bounds changes frame cost or fidelity. The staged rebuild preserves the complete-representation policy.

The committed FoliageMeadowToWoodland scene has 491,773 plants. Six Vulkan RT-enabled near/overview/far CSM/VSM cells preserve census through replacement but withhold the shadow TLAS under the default budget. At Step8 there are 239 planned casting groups and 173 refused; admitted castingDemandVertices is 992031, not the complete-scene cost. Unlike the original integrated-meadow example above, the rebuild fixture also reaches the vertex-work cap, so raising the build-count cap alone would not resolve every case.

The preserved synchronous control has the same 173 refusals, admitted demand, withheld shadow TLAS and canonical census before/after rebuild. This is an existing budget-policy gap, not a staged-publication regression or successful RT shadow execution. Raster fallback remains active. Summary: https://github.com/drsnuggles8/OloEngineBase/blob/feature/foliage-rebuild-stalls-1582-code/docs/analysis/foliage-rebuild-stalls-1582.md . Raw proof stays in ignored local .v-build/pr-evidence-retained/ (final-live/rt-control and live-matrix/vk-rt).

Activity

  1. added
    performancePerformance / data-oriented optimization
    questionFurther information is requested
    on Oct 10, 2026
  2. drsnuggles8 commented on Oct 17, 2026

    @drsnuggles8
    OwnerAuthor

    Decision (user, 2026-10-17): measure all three options and pick. The implementing session prototypes (1) area-sized casting groups beyond mesh distance, (2) a measured larger UpdatesPerFrame for casting layers and (3) a distance-scaled proxy deadline. For each it measures builds, vertex work (#1603 showed the vertex-work cap also binds), frame time and shadow error on IntegratedRenderer.olo and FoliageMeadowToWoodland.olo, then ships the best mix with the trade-off stated in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance / data-oriented optimizationquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions