Replace OldVertices transfer description with the final persistent TMap solution. Document plow ridge widening and AddDepth cap removal for snow volume conservation. Update project status with commit hash and next test steps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.6 KiB
2026-06-07 KAMAZ Snow Tracks Persistence Fix
Project: garage/kamaz5360
Machine: wuu (C:\git\kamaz5360)
Scene: kamNiagraSnow
User Goal
- Tracks on snow from vehicle Kleos and plow never disappear.
- Plow can pile snow into a heap/snowdrift (сугроб).
- Total snow volume in the scene does not decrease.
Root Cause Found
ASnowTiledSurfaceManager::UpdateProceduralSnowSurface was called with bForceRebuild=true
whenever the vehicle moved more than SnowSurfaceHalfExtentCm * 0.65 (~32 m) from the
surface origin. This reset all six vertex arrays from scratch, erasing all deformations.
Fix Applied
SnowTiledSurfaceManager.h — added
TMap<FIntPoint, float> PersistentSurfaceDepths;
TMap<FIntPoint, FColor> PersistentSurfaceColors;
FORCEINLINE FIntPoint WorldToSurfaceGridKey(float WorldX, float WorldY) const
{
const float Spacing = FMath::Max(SnowSurfaceVertexSpacingCm, 1.0f);
return FIntPoint(FMath::RoundToInt(WorldX / Spacing), FMath::RoundToInt(WorldY / Spacing));
}
SnowTiledSurfaceManager.cpp changes
-
UpdateProceduralSnowSurfacevertex loop — restores from map before pushing vertex:const FIntPoint PersistKey = WorldToSurfaceGridKey(WorldX, WorldY); if (const float* StoredDepth = PersistentSurfaceDepths.Find(PersistKey)) LocalPosition.Z = LocalBasePosition.Z + *StoredDepth; -
All stamp functions (
StampProceduralSnowSurface,StampProceduralSnowBox, plow cut, plow deposit) — write to map after modifying vertex:const FIntPoint PersistKey = WorldToSurfaceGridKey(WorldBase.X, WorldBase.Y); PersistentSurfaceDepths.Add(PersistKey, SnowSurfaceVertices[Index].Z - SnowSurfaceBaseVertices[Index].Z); PersistentSurfaceColors.Add(PersistKey, SnowSurfaceColors[Index]); -
ClearAllSnowTiles— empties both maps. -
Volume conservation — removed
GlobalSnowDepthCm * 0.75fcap on plow depositAddDepth; widened ridge zone (RidgeHalfY55→90 cm, factor 2.5→3.5). Full removed volume is deposited.
Commit
garage/kamaz5360 master: 4b9ff68
Knowledge Base Links
problems/2026-06-07-kamaz-snow-tracks-disappear-on-surface-rebuild.mdprojects/kamaz5360/status.md
About git.4min.pro Access
- Forgejo instance at
192.168.170.41(aliasforgejoin SSH config). - SSH key:
C:/Users/post/.ssh/id_ed25519_forgejo. - Agent can commit/push via SSH:
forgejo:infra/agent-knowledge-baseandforgejo:garage/kamaz5360.git. - API token stored only in local memory (
C:\Users\post\.claude\projects\...\memory\reference_forgejo_access.md), never in git.