How ovi-lab/vicon-nexus-unity-stream works
And sketch the main components
• External Vicon Nexus Service:
• This is represented by the Vicon Nexus Unity Stream Python package (external to this Unity project) that streams motion capture data.
• Communication Layer:
• The WebSocket component (found under Assets/Scripts/WebSockets) handles the network communication between Vicon Nexus and the Unity runtime.
• Core Unity Module:
• ViconNexusUnityStream Package: Highlight the scripts responsible for processing streaming data; these include classes for managing stream data (ViconStreamData.cs), one-euro filter for smoothing (OneEuroFilter.cs), and hand properties (HandProperties.cs).
• XR Subsystem:
• Under the XRSubsystem directory there are implementations of ViconHandProvider.cs, ViconHandSubsystem.cs, ViconXRDevice.cs, ViconXRLoader.cs, and settings – this area handles the connection of the streaming data to Unity’s XR framework.
• Scene and Prefabs:
• The Prefabs in Assets/Prefabs (e.g., Vicon XR Origin and MainViconCamera) and relevant sample scenes (in Samples~) represent how the streamed data is used to render and drive the XR scene, including hand representations.
• Assets and Blender Models:
• The Meshes directory and the “source” folder with Blender files (LeftHand.blend, RightHand.blend) indicate the visual assets used for modeling the hands. The README also explains specific export settings required for the left hand model.
• Editor Tools:
• The Editor folder under Assets/Scripts/ViconNexusUnityStream contains custom inspectors and post-processors (e.g., ViconBuildPreProcessor.cs, HWDMergerEditor.cs, etc.) which are used to simplify configuration and asset import tasks.
Relationships and data flow between these components
• Next, connect the WebSocket layer to the “Core Unity Module (ViconNexusUnityStream)”—this component is responsible for receiving, filtering (e.g., OneEuroFilter), and pre-processing the incoming stream data.
Architectural patterns and design principles
• Separation of Concerns: Different parts of the system take care of separate responsibilities (networking, data processing, XR integration, editor configuration).
• Layered Architecture: Distinguish clearly between external data ingestion (Vicon Nexus service and WebSocket communication), internal data processing (ViconNexusUnityStream scripts), and rendering/integration (XR subsystem and scene prefabs).
• Extensibility: The presence of custom editor tools and modular XR subsystems (with clear interface separation found in distinct directories) enable developers to extend or modify parts of the system independently.
• That each component is as granular as needed—if helpful, break down the XR subsystem further into individual classes such as the hand provider and device loader.