PolyTerrain integrations
PolyTerrain is designed to sit beside heightfield terrain and World Streaming—not replace them. Use bridges for transition bands and unified queries.
Heightfield coexistence
PolyTerrain does not implement TerrainDataRequestBus. Heightfield systems keep their handlers; mesh terrain answers through PolyTerrain buses and compiled meshes.
| Need | Tool |
|---|---|
| Sample heights into Base | Poly Partition Heightfield Bridge → Sample Heightfield Into Base Sections |
| Soft edge toward heightfield | Heightfield Blend modifier (boundary band) |
| Export mesh heights to Image Gradient | Bridge → Export Heights To Image Gradient |
| Unified editor / tool query | PolyPartitionDataRequestBus::GetUnifiedSurfacePointD (mesh first, heightfield fallback; sectionId null means heightfield hit) |
| Avoid dual colliders | Bridge Sync Collision Exclusion Regions (m_autoSyncExclusion for debounced updates) |
Prefer mesh-only physics authority where overhangs / caves exist. Use a blend band at the XY transition; keep exclusion regions padded slightly.
World Streaming
When WS is enabled:
- Transformer WS Actor Properties stamps streaming metadata into compiled assets.
- PrefabProcessor injects
WorldStreamingMemberComponent(soft, API-header only) before WS processors ($stack_beforeinprefab.tools.setreg). - FarField geometry can contribute to WS HLOD via an external geometry source registered by PolyTerrain.
- Editor: Partition View can show
[MT]external content; Focus Load WS Cells builds a Loaded Region from partition footprints.
Diagnostics: ws_dumpStats may include polyPartitionSections= and polyPartitionNetSig= when the WS bridge is active. Content signature XOR helps compare server/client residency; it is not entity replication.
Cell unload evicts VT tiles that lose section coverage (when VT is enabled). Weight-rewrite overlays survive streaming and recompose when sections flow back in.
SurfaceData and vegetation
Add Poly Partition Surface Data on runtime section entities (PrefabProcessor can attach it with collision).
| Field | Role |
|---|---|
| Default tag | e.g. poly_terrain |
| Channel → tag map | e.g. Grass → surface_grass |
| Priority | Higher priority wins when multiple creators hit the same point (default 1 = mesh overrides heightfield at 0) |
Queries ray against compiled LOD0 and sample baked weights. Existing Vegetation consumers work from tags without Vegetation Gem changes.
Double-precision rendering
Section anchors and brush picking use Vector3d / *D paths. Open-world projects should enable
double-precision rendering so viewport brushes and large coordinates stay accurate. Keep section span ≤ ~2 km when possible (
Debugging constraints).
Related handbook pages
- Optional features — VT volumes, PCG, multiplayer weight stamps.
- World Streaming — cell bake and FarField HLOD.
- Materials and bake — Collision / FarField / WS Transformer stages.