How sack-kazu/360videotopictures works
Main Components
• Unity Engine Environment: The backbone of the project where the Scenes (e.g., 360VideoToPictures.unity), Prefabs (e.g., Cameras and UI_Canvas), and Asset management take place.
• User Interface (UI) Module: Represented by the UI_Canvas.prefab along with the VideoUIManager script. This component gathers input from the user (video file selection, frame rate, field of view, file save location).
• Video Processing Module: Governed by the VideoCaptureController script; this component is responsible for processing the input 360° video (mp4 format) and performing the extraction of images.
• File Browser Integration: Offered by the StandaloneFileBrowser folder and related scripts and plugins; this module facilitates the selection of video files and destination folders.
• Auxiliary Components: This includes the SystemMessage script (for in-game messaging/feedback) and supporting Unity assets (materials, cameras, etc.), making up various Unity prefabs that support visual and interaction layers.
Relationships and Interactions
• The UI Module captures user configuration details (save location, video file, frame rate, and horizontal field of view) and passes these parameters to the Video Processing Module.
• The Video Processing Module (VideoCaptureController) interacts with Unity’s rendering pipeline and possibly the camera Prefab components to simulate the four directional capture.
• The File Browser Integration component (via StandaloneFileBrowser) is used by the UI to open dialogs for file selection.
• The SystemMessage component provides system-level feedback or error messages across modules.
• The Unity Engine orchestrates these component interactions within the game loop (executing scenes, prefabs, and script updates).
Architectural Patterns and Design Principles
• Component-Based Architecture: Typical for Unity projects, where functionality is split into separate scripts attached to GameObjects (e.g., separate scripts for UI management and video capture).
• Separation of Concerns: Input collection (UI_Canvas and VideoUIManager) is separated from the video processing logic (VideoCaptureController), and file handling is isolated by the Standalone File Browser.
• Integration of External Plugins: The use of the StandaloneFileBrowser plugin shows a clean extension point for external file dialogs within Unity.
Relevant Technologies and Frameworks
• Core Platform: Unity (version 2021.3.4f1) with Built-in Render Pipeline (BRP).
• C# for script implementation.
• StandaloneFileBrowser open source project for handling file dialogs.
• Additional Unity asset configurations (Prefabs, Materials, Scenes).