PolyTerrain debugging
When Preview, bake, or Play misbehave, confirm Registry gates first, then use Outliner timing, Build To, and the ImGui diagnostics panel.
ImGui diagnostics
- Set
/O3DE/PolyTerrain/DebugOverlayEnabledtotrue(andEnabled). - Open ImGui → Poly Partition Diagnostics (requires ImGui Gem).
Typical columns: per-section last eval ms, ContentHash, pending dirty AABB, Build To layer, eval path (CPU / GPU when GPU Preview is used).
Outliner also shows last eval ms and ContentHash tooltips without ImGui.
Build To and incremental Preview
| Tool | Use |
|---|---|
| Outliner Build To | Truncate Preview to a Priority Layer while iterating |
| Rebuild Preview | Synchronous full (or Build To) refresh; invalidates in-flight GPU / async jobs |
| PreviewRebuildBudgetMs | Raise slightly if dense sections feel sticky; prefer Refine-only dirty regions |
| GpuPreviewEnabled | Faster Sculpt Preview only—never changes bake |
Dirty rebuilds may run on AZ::Job and publish one frame later. Explicit RebuildPreview stays synchronous.
Constraints and budgets
| Topic | Guidance |
|---|---|
| Preview stroke | Target ≤ ~1.5 ms budget (PreviewRebuildBudgetMs); overflow goes async |
| Section span | Prefer ≤ ~2 km per section |
| Preview vertices | Cap via MPD Preview max complexity (default design target ~256 K) |
| Compiled / collision | Variant and Collision Transformer budgets (e.g. collision ~16 K tris) |
| Determinism | CPU evaluator is ContentHash authority; GPU Preview may differ slightly |
Troubleshooting
| Symptom | Likely cause | What to try |
|---|---|---|
| No Poly Terrain Mode menu | Registry off | Set Enabled and EditorModeEnabled; restart editor |
| Modifiers do nothing | Wrong layer / target | Layers must match MPD names; check m_targetPartition and Outliner order |
| Preview slow | Section too dense | Raise budget, Refine only dirty areas, Build To, or enable GPU Preview for eligible Sculpt |
| Bake skipped / stale | AP not running / hash | Confirm AssetProcessor; force non-incremental only if needed; check MPD pipeline |
| Seam cracks after Refine | Expected at displaced borders | Skirt Transformer; keep Shared border verts locked on Coarsen |
| Heightfield + mesh fight | Dual colliders | Sync Bridge exclusion; blend band; avoid dual physics owners on the same XY |
| VT / trails blank | VtEnabled false or no volume | Enable VT; assign .vt; cover with VT Volume + Box Shape |
| PIE missing terrain | Not baked / not in cell | Build Compiled Sections; confirm PrefabProcessor / WS cell membership |
| Boolean no hole | Non-watertight / failed CSG | Fix operand topology; check editor warnings; weights need re-paint after Boolean |
| Paint looks wrong after Boolean | Weights cleared | Move WeightPaint above Boolean; re-paint |
| PCG Write no-op at runtime | Gate / missing component | PcgRuntimeExecutionEnabled; pre-place PCG Write / Patch / MeshProjection components |
| Weight stamp ignored | Gate / non-authority | RuntimeWeightRewriteEnabled; clients cannot Submit when Multiplayer authority is server |
Limits reminder
- Not a
TerrainDataRequestBusprovider—useGetUnifiedSurfacePointDor compiled mesh / SurfaceData. - Gem enable ≠ edit mode ≠ VT ≠ weight rewrite (separate keys).
- Section entities are not net actors; only weight overlays replicate with the Multiplayer submodule.
Next steps
- Reference — full Registry and bus list.
- Getting started — re-verify the minimal loop.