Read this in other languages: English, 中文.
👋 Join our Discord
CubeVi_Swizzle_Unity is a Unity SDK for light field rendering.
In BatchCameraManager, multiple cameras (up to forty) are first created, with each camera responsible for rendering different views. Camera settings include focal length, viewport, and other parameters. Then, a DisplayCamera is created to display the final rendering result, and all camera outputs are merged onto a Quad. The Quad is a plane object used to display the rendered image in the scene. The entire workflow is as follows:
- Initialize cameras and set their parameters;
- Create
DisplayCamerafor displaying the composite image; - Create
Quadand set its material to the rendering result texture; - In each frame update, update camera positions and focus to ensure the rendering result reflects scene changes in real-time;
Provides basic usage methods for interlacing algorithms in Unity environment.
- Newtonsoft.Json library, which can be added in Package Manager by name
com.unity.nuget.newtonsoft-json - Supports Unity 2017 and above versions
- Please ensure your computer is properly connected to the Companion 01 device. For tutorials and OpenstageAI client download, please click here
- Attach the
BatchCameraManagercomponent to the scene; - Set a
Rootas the center position of the grid cameras; - Set a
TargetTransformto lock the focal plane of the camera group; - The above two variables are mandatory. After setting them, run the scene.
-
Root: Set the center position of the cameras; -
BatchCameraPrefab: Select the camera prefab to use; -
useCameraPrefab: Whether to use custom camera prefab; -
TargetTransform: Target object's Transform, used to lock the focal plane; -
FocalLength: Camera lens focal length, affects field of view range; -
useTartgetFocal: Whether to use the target object center as the focal plane; -
showFocalPlane: Whether to display the focal plane; -
showFrustumFrame: Whether to display the frustum;
