Scene API Getting Started with Scene Actor (deprecated)
OculusXRSceneActor Deprecation
As of v65, OculusXRSceneActor is deprecated. New features will be delivered through MR Utility Kit. Refer to the following as guidance on which APIs to use:
New projects:
Existing projects:
Before you begin with Scene, make sure to use the latest version of the Meta Quest or Meta Quest 2 operating system and Oculus Integration SDK. Do the following:
- Scene functionality is supported on the Meta Quest or Meta Quest 2 operating software version 40 or later. Ensure the headset is connected to the internet and has the latest version installed. To verify the latest version, in the Meta Quest headset, go to Settings > System > Software Update and check the latest version, which should begin with the number 40 or higher.
- Obtain the latest Unreal Engine 5.0 release with Oculus Integration SDK from Github and follow the instructions.
- Open Edit > Project Settings > (in Plugins section) > Meta XR.
- In the General section, go to the XR API list, and then select Oculus OVRPlugin + OpenXR backend (current recommended).
- In the Mobile section, select Passthrough Enabled, Scene Support and Anchor Support.
- Follow the typical steps for adding a Passthrough Layer to an Unreal project.
You can use the Scene Actor as any other type of actor in Unreal. The easiest way to start experimenting with the Scene Actor is to place it on a level within the editor. From the “Place Actors” panel, search for the “Oculus Scene Actor” class and drag-drop it anywhere on your level.
Spawned Scene Entities Properties
Within Scene Capture, you may create two types of entities: Bounded 2D and Bounded 3D entities.
- Bounded 2D: These planar entities do not have a depth component.
- Bounded 3D: These entities include a volume.
For example, a captured room layout will have its walls, floor, and ceiling represented as Bounded 2D entities. For more details about the various types of scene entities you can capture within Scene Capture, refer to
this page.
Within the editor, looking at the details panel for Scene Actors, two maps can be found representing the properties of Bounded 2D and Bounded 3D entities that you will spawn. The key to each map member corresponds to the semantic label associated with a captured scene entity. The maps can be modified to add or remove (hence ignore) the various spawned scene entities during runtime. These maps dictate the scene entities that will make up the final Scene Model.
By default, the Scene Actor will populate properties for the following scene entities:
- Bounded 2D
- WALL_FACE
- CEILING
- FLOOR
- COUCH
- TABLE
- DOOR_FRAME
- WINDOW_FRAME
- WALL_ART
- OTHER
- Bounded 3D
- COUCH
- TABLE
- STORAGE
- BED
- SCREEN
- LAMP
- PLANT
- OTHER
You can find more information about these labels and the complete list of supported labels
hereThe map’s member values provide various settings that dictate how you will spawn a scene entity. For example, you will see three properties if you expand one of the map’s members:
- Actor Component: The spawned actor will have an actor component that will update the actor’s pose based on the position of the related scene entity in the physical space. This actor component must either be or derive from the UOculusSceneObjectComponent class type.
- Static Mesh: The spawned actor will be a static mesh actor. The static mesh you define in this property will be set to the spawned static mesh actor.
- Force Parallel to Floor: If this property is enabled, the system will adjust the transformation (based on the scene entity’s pose) to ensure that the actor remains parallel to the ground/floor. The Quest device will internally adjust poses to combat drifting (related to tracking sensor accuracy). This drift causes the physical scene entity poses to change slightly over time. Though this is not visibly noticeable, it can introduce odd behaviors with actors that simulate physics, such as a ball rolling on a floor. Enabling this setting can resolve such issues.
For the time being, it is not possible to make use of Scene within PIE or via the Link Quest feature. Scene logic will only work when running the application within the Quest device.