How rsodre/fulldomecameraforunity works
Project Type & Purpose
• This is a Unity‐based plugin/tool suite (Assets/FulldomeForUnity) aimed at rendering standard Unity scenes into Fulldome (“Domemaster”) output.
• It supports three distortion approaches:
– Fulldome Camera (cubemap→fisheye)
– VFX Graph (custom particle blocks)
– Shader Graph (vertex distortion)
• It includes example scenes, legacy implementations, and pipelines for HDRP, Standard, and Legacy renderers.
• It also offers external streaming integrations (Syphon, Spout, NDI).
File Structure for Architectural Clues
• Top level:
– Assets/… (the plugin code & resources)
– Packages/, ProjectSettings/ (Unity project config)
– Logs/, README.md, LICENSE, images/
• Under Assets/FulldomeForUnity:
– FulldomeCamera/ – C# scripts (core logic), shaders, prefabs → camera‐based cubemap approach
– Examples/ – demo Unity scenes & assets for each renderer variant
– Xperiments/VFXGraph – custom Visual Effect Graph blocks & example scenes
– Xperiments/VertexShader (ShaderGraph) – custom shader nodes & test scenes
• External integrations: KlakSyphon, KlakSpout, KlakNDI are referenced in README (not in code tree), but should appear as “optional streaming modules.”
Key Insights from README
• The core runs by attaching FulldomeCamera.cs to a GameObject, pointing it at the Main Camera.
• It invokes Camera.RenderToCubemap, stitches faces, then samples to Domemaster layout.
• Performance considerations: HDRP quality overrides, disabling post effects, etc.
• VFXGraph/ShaderGraph approaches bypass cubemap but require Unity’s SRP or custom nodes.
• Streaming output: Unity RenderTexture → Syphon/Spout/NDI → external VJ apps (Blendy Dome VJ).
Diagramming the System
a. Main Components
– Unity Host Environment (Editor/Player)
– Main Camera (user’s scene camera)
– FulldomeCamera Module
• Cubemap Renderer (6 faces via RenderToCubemap)
• Domemaster Extractor (shader or CPU)
• RenderTexture Output
– VFXGraph Module (custom VFX Blocks library)
– ShaderGraph Module (custom Vertex Shader Graph nodes)
– Example Scenes (demonstrations of each approach)
– External Streamers (KlakSyphon, KlakSpout, KlakNDI)
– External VJ Apps (Blendy Dome VJ, NDISyphon)
– ProjectSettings & Package Manager (HDRP Asset, manifest.json)
b. Relationships & Data Flow
1. Scene content → Main Camera →
• (Option A) FulldomeCamera:
– RenderToCubemap → Cubemap RT → Domemaster RT → Unity’s Output
• (Option B) VFXGraph: Scene particles → VFX Graph blocks → On‐screen distortion
• (Option C) ShaderGraph: Scene meshes → ShaderGraph distortion → On‐screen fisheye
2. RenderTexture Output → Optional Streamer Component → External App
3. External App → Dome Projection Hardware
c. Architectural Patterns & Principles
– Modular plugin design: separate folders for core, examples, experiments
– SRP‐aware modules (HDRP vs Standard vs Legacy)
– Editor vs Runtime separation (Scripts vs Editor scripts under “Editor” folders)
– Scriptable Render Pipeline overrides for performance
– Optional extensions via KlakSyphon/Spout/NDI (client‐server model for texture sharing)
d. Key Technologies/Libraries
– C# scripts (FulldomeCamera.cs, Capture.cs, PipelineChecker.cs)
– Unity APIs: Camera.RenderToCubemap, RenderTextures, SRP frame settings
– Shader Graph & HLSL shaders (ShCubemapToDome, custom ShaderGraph nodes)
– Visual Effect Graph custom blocks
– External plugins: KlakSyphon, KlakSpout, KlakNDI