text
stringlengths
0
1.11k
You currently cannot perform Space Setup over Meta Quest Link. You must perform Space Setup on-device prior to loading the Scene Model over Link.
Scene Anchors
The fundamental element of a Scene Model is the Scene Anchor. Each Scene Anchor is attached with geometric components and semantic labels. For example, the system organizes a user’s living room around individual anchors with semantic labels, such as the floor, the ceiling, walls, a table, and a couch. Many anchors are also associated with a geometric representation. This can be a 2D or 3D bounding box, or both. Scene Mesh is also a form of geometric representation, presented as a Scene Anchor component.
Scene Model can be considered a collection of scene anchors, each of which have any number components on them that provide further information. Components hold information such as whether the anchor is a plane, whether it’s a volume, whether it has a mesh, whether it’s locatable, whether it’s a room, whether it holds other anchors, etc. The idea is that anchors are generic objects, and an API user queries the components on the anchor to find what information they have.
For example, if you have a Scene Model with four walls, then you will have four scene anchors. Each anchor will be Locatable, have a Semantic Classification of WALL, and be a Plane which holds dimensions.
Spatial Anchors and Scene Anchors Are Different
There are a few differences between spatial and scene anchors. Scene anchors are created by the boundary, while spatial anchors are created by your application. Scene anchors contain other information specific to the scene, such as the anchor's pose. And finally your app can create spatial anchors only, but it can query scene anchors.
Next Steps
Now that you have a broad overview of Scene, learn more by digging into any of the following areas:
To learn more about how MR Utility Kit provides high-level tooling on top of Scene, see our MR Utility Kit overview.
To get up and running with Scene in Unity, see our Get Started guide.
To see Scene in action in various use cases, checkout our Samples.
To understand the details of how Scene works, see Using the Scene Model.
To see how the user’s privacy is protected through permissions, see Spatial Data Permission.Get Started with Scene
Unity
All-In-One VR
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
This page outlines the steps required to Get Started with Scene, in order for a developer to have a basic working version of Scene running in Unity.
Prerequisites
Before you begin working with Scene, do the following:
Set up your Unity development environment and configure your Quest headset.
Verify that your headset is running the latest OS version. In the headset, go to Settings > System > Software Update and update if necessary. Scene requires OS v40 or higher.
Set up a new Unity project following the guide Create Your First VR App on Meta Quest Headset.
Optionally, set up Meta Quest Developer Hub and Meta Quest Link.
Use OVRCameraRig and configure permissions
In order for a Unity project to use Scene, we need to enable permissions which allow access to Scene data. We modify permissions using the OVRCameraRig prefab.
Create a new Unity scene, or open an existing one from your project.
Remove the Main Camera from your scene.
Add the OVRCameraRig prefab. Search for OVRCameraRig in the Project tab, and drag it into your scene.
If you use the Project Setup Tool, you will receive automatic warnings and suggested fixes for the permissions.
To set permissions manually, select OVRCameraRig in the Hierarchy tab. In the Inspector tab, under the OVRManager component, do the following:
Under the Quest Features > General tab, find Scene Support and select either Required or Supported.
When selecting Scene Support, Anchor Support should automatically be enabled.
Further below, find the section Permission Requests On Startup, and toggle the Scene checkbox. This will request the permission when the app starts.
Scene Meta Quest Features
In the toolbar, select Oculus > Tools > Create / Update AndroidManifest.xml. This will create/update the AndroidManifest.xml to let the OS know that your app would like to use the Scene permission.
The Spatial Data Permission page contains further information and guidelines on how to manage permissions.
Use OVRSceneManager
The easiest way to interact with Scene is with the OVRSceneManager prefab. This prefab will help query the Scene data from the OS, and spawn game objects for the various Scene anchors in your space.
Add the OVRSceneManager prefab. Search for OVRSceneManager in the Project tab, and drag it into your scene.
In the Hierarchy tab, select OVRSceneManager.
In the Inspector tab, you can see that the Plane Prefab and Volume Prefab fields are empty. OVRSceneManager will spawn these prefabs for each Scene object that is a plane and volume, respectively.
In order to create a Plane Prefab, do the following:
Right click in an empty space in the Hierarchy tab, and click Create Empty. Select the created game object.
In the Inspector tab, change the name to Plane Prefab. Reset the Transform, and add a component by searching for OVR Scene Anchor.
In the Hierarchy tab, right click on the Plane Prefab game object and select 3D Object > Quad to create a child game object. Select the created game object.
In the Inspector tab, reset the Transform and then set the Y Rotation to 180.
Plane Prefab Quad Rotation
In the Project tab, navigate to the Assets > Oculus > VR > Prefabs folder.
Drag the Plane Prefab from the Hierarchy tab into the Assets > Oculus > VR > Prefabs folder to create a prefab there.
Delete the non-prefab object in the Hierarchy tab.
In order to create a Volume Prefab, do the following:
Right click in an empty space in the Hierarchy tab, and click Create Empty. Select the created game object.
In the Inspector tab, change the name to Volume Prefab. Reset the Transform, and add a component by searching for OVR Scene Anchor.
In the Hierarchy tab, right click on the game object and select 3D Object > Cube to create a child game object. Select the created game object.
In the Inspector tab, reset the Transform and then set the Z Position to -0.5.
Volume Prefab Cube Position
Drag the Volume Prefab from the Hierarchy tab into the Assets > Oculus > VR > Prefabs folder to create a prefab there.
Delete the non-prefab object in the Hierarchy tab.
In the Hierarchy tab, select OVRSceneManager.
Drag your Plane Prefab from the Project tab into the OVRSceneManagerPlane Prefab field.
Drag your Volume Prefab from the Project tab into the OVRSceneManagerVolume Prefab field.
Scene Prefabs Set Up
The OVRSceneManager is now set up. Build and run the application. When the app starts, you will be prompted to grant the Spatial Data Permission. If you have not run Space Setup, the app will prompt you to capture your space. The app will then load the Scene, instantiating the Plane Prefab and Volume Prefab for the relevant Scene objects.
Next steps
There are a few different directions you can now take.
To understand the details of how Scene works, see Using the Scene Model.
To see how the user’s privacy is protected through permissions, see Spatial Data Permission.
To learn about using Scene in various use cases, have a look at the Samples.