How aniketrajnish/3d-shapes-dataset-generator works
Main Components
• User Interface & Experience:
– The UI elements are managed via the “Menu” assets in Assets/Menu (including animations, UI scripts, audio, images, fonts, and prefabs).
• Core Rendering Engine:
– The project relies on a raymarching renderer (see Assets/Scripts/RaymarchRenderer.cs and Raymarcher.cs) that is built on an open source Raymarching Engine.
• Dataset Generation Subsystem:
• Screenshot & Data Export Utility:
– Found within the Assets/ScreenshotUtility folder, this part manages capturing the rendered images (screenshots) and exporting data (including CSV files that log parameter values and seed details) to the designated dataset folder.
• Configuration & Project Settings:
– The Unity ProjectSettings and Package files (e.g., manifest.json, ProjectSettings/*.asset) indicate how the runtime environment and dependencies are set up.
– They also reflect important engine-level configurations for input, graphics, quality, etc.
Relationships and Interactions
• The UI (Menu) accepts user inputs and sets parameters which are fed into the data generation pipeline.
• The Dataset Generation Subsystem leverages these parameters to drive procedural generation by triggering:
• Once the scene is rendered, the Screenshot Utility captures the image output.
• Finally, the processed images and metadata are stored in the output directory (as mentioned in the README under the “Datasets” section).
Architectural Patterns & Design Principles
• Modular design: Each major function (UI, rendering, dataset management, image export) is organized into separate directories and assets for easier maintenance.
• Separation of concerns: The project clearly divides responsibilities (front-end interaction vs. back-end rendering logic vs. data management).
• Leverages Unity’s component-based architecture: Scripts (e.g., MenuScript.cs, SceneViewFilter.cs) act as components attached to GameObjects enabling a dynamic and scalable design.
• Reuse of third-party libraries and utilities (e.g., TextMesh Pro for UI text, and external plugins like AnotherFileBrowser) to extend functionality.
Relevant Technologies, Frameworks, & Libraries
• Unity Engine (version 2020.3.30f1 or later).
• C# scripting for custom behaviors.
• Shader programming (using .shader and .cginc files) for raymarching and rendering effects.
• External dependencies include the open source Raymarching Engine which the tool builds upon.
• Standard Unity packages and assembly definitions (*.asmdef for Editor scripts).