Uni-CAVE: A Unity3D Plugin for Non-head Mounted VR Display Systems Ross Tredinnick * Brady Boettcher Simon Smith Sam Solovy § Kevin Ponto Living Environments Laboratory, Wisconsin Institute for Discovery, University of Wisconsin - Madison USA ABSTRACT Unity3D has become a popular, freely available 3D game engine for design and construction of virtual environments. Unfortunately, the few options that currently exist for adapting Unity3D to dis- tributed immersive tiled or projection-based VR display systems rely on closed commercial products. Uni-CAVE aims to solve this problem by creating a freely-available and easy to use Unity3D ex- tension package for cluster-based VR display systems. This exten- sion provides support for head and device tracking, stereo rendering and display synchronization. Furthermore, Uni-CAVE enables con- figuration within the Unity environment enabling researchers to get quickly up and running. Index Terms: I.3.7 [Three-Dimensional Graphics and Real- ism]: Virtual Reality—Unity3D; I.3.2 [Graphics Systems]: Dis- tributed/Network Graphics—Unity3D 1 I NTRODUCTION Unity3D has become a popular, freely available 3D game engine for design and construction of virtual environments. Much of this can be attributed to a friendly user interface for designing content when compared to some other 3D design applications, together with a robust tool set for working with common elements of a 3D envi- ronment such as terrains, physics, particle effects, sounds, models, and animated characters. Unfortunately, when it comes to using Unity3D on immersive projection-based virtual reality display sys- tems, some support exists but at an additional monetary cost. While previous efforts have been made to adapt Unity3D to tiled displays [5] and to immersive VR display systems [2], these solutions have utilized closed commercial products. The presented work, entitled Uni-CAVE, adapts Unity3D to general non-head mounted immer- sive display systems, including CAVEs and tiled display systems. The Uni-CAVE plugin allows for different stereo techniques, such as OpenGL quad buffered stereo, passive stereo, and side-by-side stereo. The intention of this work is to provide a free to use solu- tion that can be adapted to any immersive VR projection system. 2 METHOD Uni-CAVE is a Unity3D package for importing into an exist- ing Unity3D scene and contains several pre-defined immersive projection-based VR display system configurations in the form of Unity3D prefabs. Prefabs created with the plugin consists of a se- ries of Unity C# scripts and resources. Display Configuration: To make the configuration more user- friendly, projection surfaces are created directly inside of the Unity3D editor. To accomplish this, quad objects which define pro- jection surfaces, are paired with camera objects. The UniCAVE * e-mail: rdtredinnick@wisc.edu e-mail:boettcher2@wisc.edu e-mail:spsmith5@wisc.edu § e-mail:solovy@cs.wisc.edu e-mail:kbponto@wisc.edu Figure 1: A camera configuration within the Unity3D editor consisting of twelve Unity3D camera objects and six quad objects (transparent grey) representing the walls of a CAVE. plugin subsequently calculates the correct camera projections based on the technique described in [1] and presents a visualization of the viewing frustums in the Unity3D editor. Figure 1 shows an exam- ple configuration for a six-sided CAVE style immersive VR display system. Stereo: The Uni-CAVE plugin provides support for different stereo techniques. Techniques such as quad-buffered stereo, side by side stereo, or split-screen stereo are configured by way of setting up the correct camera and viewport configurations in the Unity3D editor, together with pairing these cameras to the Unity3D quads that represent the physical display setup. For quad-buffered stereo, which often requires setting an underlying operating system stereo flag for the window, different options exist in the plugin depending on the version of Unity3D. Prior to version 5.1, Unity3D provided no support for quad-buffered active stereo. To support OpenGL quad buffered stereo in this case, the Uni-CAVE plugin provides a stereo injection technique by way of GLIntercept [7]. The plugin works by counting how many glClear calls are made on a bound frame buffer that returns true for a glGetBooleanv(GL STEREO) call. The GL STEREO check ensures that the counter only incre- ments for the main rendering window, instead of frame buffer ob- jects for off-screen rendering, as they return false for this check. The release of version 5.1 of Unity3D added a player settings option titled “virtual reality supported”. When checking this box, a list of VR supported devices can be chosen. This was largely for support of upcoming commercially available HMDs such as the Oculus Rift and HTC Vive. One option, titled “Stereo Display (non-head mounted)”, provides support for quad-buffered stereo. As Unity3D has no knowledge of the physical layout of the pro- jection surface, a standard camera projection is used. When used in a CAVE system, this can cause viewing artifacts between dis- play surfaces as shown in Figure 2a. Version 5.4.2 introduced a function Camera.SetStereoProjectionMatrix within Unity’s camera class that allows a user to over-ride the default stereo projection matrix that Unity3D configures internally. With this ability to over-