AR session best practices for Mega
This article describes how to create and configure AR sessions for Mega to achieve the best runtime results on different types of devices.
Before you begin
- Understand the basic concepts, composition, and workflow of AR Session
- Understand how to create session
Default session configuration
For most applications, it is recommended to use the default Mega session configuration. These configurations have been optimized and are suitable for most common use cases.
The default session supports the following types of devices:
- Devices that support 6DoF motion tracking, such as some modern phones and headsets
- Devices that support 5DoF inertial navigation, such as most Android phones with gyroscopes and accelerometers
In the Hierarchy view, right-click on an empty area. You can create the default Mega session through the menu EasyAR Sense > Mega > AR Session (Mega Block Default Preset).
The corresponding script code is:
ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset.MegaBlock_MotionTracking_Inertial)
This session uses the MegaBlock_MotionTracking_Inertial preset:
- For frame source components and ordering, see the frame source group corresponding to the MegaBlock_MotionTracking_Inertial preset in Frame source group of preset AR Session
- MegaTrackerFrameFilter.MinInputFrameLevel is FiveDof
- MegaTrackerFrameFilter.ServiceType is Block
Choose different presets
In addition to the default Mega session configuration, you can also choose different presets to create session according to specific requirements. Their main difference is the supported device types.
The optional presets when creating a session from the menu or with ARSessionFactory.CreateSession(ARSessionFactory.ARSessionPreset, ARSessionFactory.Resources) include:
- MegaBlock_MotionTracking
- For frame source components and ordering, refer to the frame source group corresponding to the MegaBlock_MotionTracking preset in Frame source groups for preset AR Sessions
- MegaTrackerFrameFilter.MinInputFrameLevel is SixDof
- MegaTrackerFrameFilter.ServiceType is Block
- MegaBlock_MotionTracking_Inertial (default)
- For frame source components and ordering, refer to the frame source group corresponding to the MegaBlock_MotionTracking_Inertial preset in Frame source groups for preset AR Sessions
- MegaTrackerFrameFilter.MinInputFrameLevel is FiveDof
- MegaTrackerFrameFilter.ServiceType is Block
- MegaBlock_MotionTracking_Inertial_3DOF
- For frame source components and ordering, refer to the frame source group corresponding to the MegaBlock_MotionTracking_Inertial_3DOF preset in Frame source groups for preset AR Sessions
- MegaTrackerFrameFilter.MinInputFrameLevel is ThreeDof
- MegaTrackerFrameFilter.ServiceType is Block
- MegaBlock_MotionTracking_Inertial_3DOF_0DOF
- For frame source components and ordering, refer to the frame source group corresponding to the MegaBlock_MotionTracking_Inertial_3DOF_0DOF preset in Frame source groups for preset AR Sessions
- MegaTrackerFrameFilter.MinInputFrameLevel is ZeroDof
- MegaTrackerFrameFilter.ServiceType is Block
Note
Mega runs differently on different types of devices. For details, refer to Mega supported devices and platform applications.
Next steps
- Add tracking target
- Enable editor tool
- Add 3D content aligned with the real world
- Control tracking process
Related topics
- Read frame source to learn the basic concepts of frame sources and how runtime frame sources are selected
- Read add a group of frame sources to learn the configuration and usage of data source groups
- Read Mega supported devices and platform applications to learn about the devices supported by Mega and runtime results on different devices