8.9 KiB
LED Cube 3D Project Context
This file is the handoff note for AI coding agents working on this Unreal project. Read it before making changes, and update it whenever you make a meaningful project, architecture, workflow, or debugging decision.
User Language And Workflow
- The user speaks Russian and prefers direct, practical progress.
- Keep answers in Russian unless the user asks otherwise.
- The user wants implementation on this machine, then verification in Unreal Editor/PIE.
- Ask questions only at important decision points. Prefer inspecting the project and making reasonable engineering choices.
- Do not revert unrelated dirty Unreal-generated files in
Saved,Intermediate,DerivedDataCache, ortmp.
Project Goal
Build an Unreal Engine 5.8 visualizer for a physical volumetric LED display:
- Target physical layout:
120 x 120 x 120LEDs. - Physical interpretation: a 10m-scale hanging LED matrix/curtain made of vertical strings and cabinet lines.
- Cabinet layout currently modeled as
20 x 20cabinets,6 x 6dots per cabinet,120LEDs per string. - LEDs should look like real suspended beads/lenses, not a perfectly clean abstract cube.
- Wires between LEDs should be white/matte, visible, and physical-looking.
- LEDs should have slight random imperfection/jitter, not perfect alignment.
- User wants control through Unreal Remote Control Web API and a custom dashboard.
Current Architecture
Main C++ files:
-
Source/ledcube3d/LedVolumeDisplayActor.*- Main display actor.
- Owns instanced/GPU-style LED rendering and physical matrix support.
- Supports voxel shapes, test patterns, physical wires/fixers/cabinets, and sublevel/source modes.
-
Source/ledcube3d/LedVolumeRemoteControlActor.*- Remote-control-facing actor.
- Mirrors editable properties to
ALedVolumeDisplayActor. - Exposed in Remote Control preset as
LED_Remote_Control. - Calls
ApplyToTarget,RebuildTarget,SyncFromTarget.
-
Source/ledcube3d/ledcube3d.cpp- Game module plus editor helpers.
- Opens demo map if the editor starts empty.
- Builds/updates
/Game/LedVolume/RemoteControl/RCP_LedVolumeLive. - Disables editor/background throttling needed for remote control while the editor is minimized.
Web dashboard:
- Source:
Web/RemoteControlDashboard/index.html - Runtime copy used by UE Remote Control Web Interface:
C:/Program Files/Epic Games/UE_5.8/Engine/Plugins/VirtualProduction/RemoteControlWebInterface/WebApp/Server/public/index.html - Dashboard uses
/api/proxyso LAN clients can usehttp://192.168.170.218:30000/even though UE HTTP API listens on127.0.0.1:30010. - After property writes, dashboard calls
ApplyToTargetimmediately so changes do not wait for viewport/game ticks.
Important maps/assets:
- Demo map:
/Game/LedVolume/Maps/L_LedVolume_Demo_Single - Rotating cube sublevel exists for earlier voxelization tests:
/Game/LedVolume/Maps/L_RotatingCube_Sublevel - Rotating 3D snowflake source level:
/Game/LedVolume/Maps/L_RotatingSnowflake_Sublevel - Samba Dancing FBX source level:
/Game/LedVolume/Maps/L_SambaDancing_Sublevel; imported assets live in/Game/LedVolume/Sources/SambaDancing. - Remote Control preset:
/Game/LedVolume/RemoteControl/RCP_LedVolumeLive
Remote Control / Minimized Editor Notes
The user reported that Remote Control worked only while Unreal was active; when Editor/PIE was minimized, updates stopped.
Current fix:
Config/DefaultGame.inisets:t.IdleWhenNotForeground=0Slate.bAllowThrottling=0Slate.AllowSlateToSleep=0Slate.ThrottleWhenMouseIsMoving=0
Config/DefaultEditorSettings.inisets:bThrottleCPUWhenNotForeground=FalsebAllowSlateThrottling=False
FLedcube3dModule::ConfigureUnattendedRemoteControl()enforces these settings at startup and periodically.ALedVolumeRemoteControlActorandALedVolumeDisplayActorhavePrimaryActorTick.bTickEvenWhenPaused = true.PostEditChangePropertyon the remote control actor applies immediately.
Verification already performed:
- Built with:
C:/Program Files/Epic Games/UE_5.8/Engine/Build/BatchFiles/Build.bat ledcube3dEditor Win64 Development -Project="C:/Users/post/Documents/Unreal Projects/ledcube3d/ledcube3d.uproject" -WaitMutex -FromMsBuild - Launched editor with:
UnrealEditor.exe "C:/Users/post/Documents/Unreal Projects/ledcube3d/ledcube3d.uproject" -EnablePython -RCWebInterfaceEnable -ModelContextProtocolStartServer -ModelContextProtocolPort=8000 - Confirmed:
http://127.0.0.1:30000/serves the custom page.PUT http://127.0.0.1:30000/api/proxycan call/remote/presets.ApplyToTargetreturns200.
- With the Unreal window minimized, a property write plus
ApplyToTargetstill succeeds through the proxy.
Remote Control parameter persistence:
ALedVolumeRemoteControlActorsaves live Remote Control settings to local config under[LedVolume.RemoteControl].- In editor this lands in
Saved/Config/WindowsEditor/GameUserSettings.ini, which is intentionally ignored. - Settings are loaded in
PostLoad,BeginPlay, and first tick, then applied to the display actor. ApplyToTargetandSyncFromTargetsave the current settings immediately.- Verified by setting
ApplyDebounceSeconds=0.11, restarting Unreal Editor, and reading the same value back through the Remote Control API.
Remote Control exposure rule:
- Every new user-controllable parameter must be added to
ALedVolumeRemoteControlActoras an editable UPROPERTY. - The preset builder has an explicit exposure list in
Source/ledcube3d/ledcube3d.cpp; add every new controllable property there in the same change. - Do not blindly auto-expose every reflected field; UE Remote Control can crash on unsupported/stale fields in an existing preset.
- If a parameter needs a convenient user choice, prefer an enum preset property over asking the user to type raw asset paths.
- The current sublevel source selector is
SublevelSourcePresetwithCustom,RotatingCube,RotatingSnowflake,SambaDancing, andDanceMice. VoxelizedSublevelis still exposed for custom source maps.SublevelSceneScalescales the dynamically streamed source level instance and must stay exposed in Remote Control.
Sublevel source notes:
ALedVolumeDisplayActorstreams the selectedVoxelizedSubleveldynamically before sampling.- Dance Mice test source level path:
/Game/LedVolume/Maps/danceMice.danceMice. - Sublevel voxelization is incremental and uses
ColorUpdatesPerFrameas the per-frame sampling budget; do not sample all 120^3 voxels in one frame. - GPU-first rule: avoid CPU voxelization for final 120^3 workflows. CPU sublevel sampling is only a temporary/editor preview path.
- When adding a new source/animation, prefer GPU material parameters, volume textures, Niagara/render-target driven data, or compute-shader/RDG paths over per-voxel CPU loops.
ELedTestPattern::SambaDancingis the current fast GPU procedural dancer path inM_LedVolumeRaymarch; the imported Samba FBX sublevel remains available as a reference/source asset.- Final visual mode for the current demo is
GeometryMode=PhysicalMatrix,SourceMode=TestPattern,TestPattern=SambaDancing,bUseGpuTestPattern=true, with wire/fixer instances visible and LED colors computed inM_LedVoxelGpu. - Source actors must have tag
LedVoxelSource. ARotatingSnowflakeActorcreates a rotating 3D snowflake from many small static mesh crystals so the bounds-based sampler sees a volumetric shape.
Git History Milestones
Recent commits:
f9d3787- Model physical LED curtain display72b9174- Add LED remote control dashboard148ffec- Proxy dashboard API through web serverae97ea7- Keep remote control responsive in backgroundae011fe- Add AI agent project context
Public Repository
Primary public Forgejo repository:
- Web:
http://192.168.170.41:3000/post/ledcube3d - Git remote:
http://192.168.170.41:3000/post/ledcube3d.git - Primary local remote name:
origin - Previous GitHub remote, if present:
github
Local credentials are stored on this machine in .env.local, which must remain ignored and uncommitted.
Use Scripts/PushForgejo.ps1 to push with the local token without putting the token into .git/config.
Important Working Tree Rules
- Unreal generates a lot of local noise in:
Intermediate/Saved/DerivedDataCache/tmp/
- These generated folders are intentionally ignored and should not be tracked in git.
- Do not clean, delete, reset, or revert those unless the user explicitly asks.
- When committing, stage only intentional source/config/content/web changes.
Binaries/Win64/UnrealEditor-ledcube3d.dlland.pdbare currently tracked and may change after C++ builds.
What To Update Here
Append or edit this file when:
- The physical LED model changes.
- Remote Control API/preset/dashboard behavior changes.
- Map/asset names or startup flow changes.
- Build/run commands change.
- A major bug is diagnosed and fixed.
- A user preference or important design decision becomes clear.