VR Cave Support
VIROO Applications are VR and Desktop compatible. To add CAVE support, once you have completed the Creating a VIROO Application steps, you will need to follow this article.
To add support for CAVE, VIROO Studio packages containing the necessary functionality must be added:
- com.viroo.tracking.dtrack and com.viroo.sceneloader.dtrack: add DTrack support.
- com.viroo.multidisplay and com.viroo.sceneloader.multidisplay: support for rendering from a user's perspective in CAVE.
- com.viroo.stereorender: support for native stereoscopic rendering.
After adding these packages, the VIROO Main scene must be modified to add the prefabs corresponding to these packages. The next sections explain how to add the aforementioned packages and how to add them to the VIROO Main scene.
Add new scopes to OpenUPM scoped registry
To add new packages needed for CAVE support, you need to add new scopes to OpenUPM scoped registry. You can do it from the Unity Editor or by editing the manifest.json.
Using the Unity Editor
Open Edit -> Project Settings -> Package Manager
and follow this steps:
- In the
Scoped Registries
section select OpenUPM (package.openupm.com). - In the
Scopes
lists, press+
twice and add:- com.ar-tracking
- jp.keijiro
Editing manifest.json file
You can find the project manifest file, called manifest.json
, in the Packages
folder under the root folder of your Unity project.
Find the scopedRegistries
block. Locate the OpenUpm and add com.ar-tracking
and jp.keijiro
to the scopes
list:
{
"dependencies": {
/* ... your dependencies ... */
},
"scopedRegistries": [
/* ... other scoped registries ... */
{
"name": "OpenUPM",
"url": "https://package.openupm.com",
"scopes": [
"com.cysharp.unitask",
"com.openupm",
"com.ar-tracking",
"jp.keijiro"
]
}
]
}
Install VR CAVE Packages
The following Viroo packages should be added to the project:
- com.viroo.tracking.dtrack
- com.viroo.sceneloader.dtrack
- com.viroo.multidisplay
- com.viroo.sceneloader.multidisplay
- com.viroo.stereorender
The latest package version for VIROO Studio packages can be found here.
There are 2 ways to add the necessary packages in Unity. Choose the one you prefer from the following.
Using the Unity Editor
Open Window -> Package Manager
.
To install the needed packages:
- Click the
add (+) button
in the status bar. - Select
Add package by name
from the add menu. - Enter the package name, from the list above, in the
name
field. - Enter the exact version (e.g.,
1.0.0
) in theversion
field. - Click
Add
.
This process must be repeated for each of the packages listed above.
Editing manifest.json file
Follow the steps below:
- Open
manifest.json
file. - Add the references to the VR CAVE packages in the
dependencies
section.
{
"dependencies": {
/* ... your other dependencies ... */
"com.viroo.multidisplay": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.stereorender": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.sceneloader.dtrack": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.sceneloader.multidisplay": "1.0.0", /* Change 1.0.0 to the correct version */
"com.viroo.tracking.dtrack": "1.0.0", /* Change 1.0.0 to the correct version */
},
},
- Return to Unity Editor to download the packages.
Add VR CAVE prefabs to main VIROO scene
Locate the main scene for the project (created from the VIROO Main
scene template).
To it, the following prefabs should be added. To find these prefabs, you can use the Search
function of the Unity Project
tab, selecting the In packages
option.
- VirooDTrack
- VirooMultiDisplay
- VirooSceneLoaderDTrack
- VirooSceneLoaderMultiDisplay
- VirooStereoRender
Save the scene.