computer-generated image on a user's view of the real world, thus providing a composite view. • It creates the illusion that virtual object placed in the physical world
api to create Augmented Reality applications. It support all A9 and up iOS Devices. The major components of ARKit are :- • Tracking • Scene Understanding • Rendering
External Setup Tracking provides the ability to track devices in real time. With world tracking we can get device relative position in physical environment.
the device camera and motion processing needed for augmented reality experiences. • Configuration ARKit provides tracking based on device capabilities. ARSessionConfiguration is used for less capable devices, and it only tracks device orientation.ARWorldTrackingSession Configuration is used for fully-capable devices, and it tracks device orientation, relative position, and scene information. Additional AR session features can be enabled or disabled through these configuration classes.
detailed tracking, and scene information which contains the current tracking points and lighting conditions. • Anchors An anchor is a position and orientation in real-world space. ARKit will maintain that position and orientation for you as you move the camera around.
surface like a floor or a table surface. When enabled, ARKit will detect, maintain, and track available surfaces in the real-world space. You can then use these surfaces to place your content, which will appear on top of the surface. • Lighting ARKit also tracks the current lighting conditions, which can be used to properly light virtual content in a more believable fashion
Session // Create an AR Session let arSession = ARSession() // Nominate self for session delegation arSession.delegate = self // Run the session arSession.run(configuration)
PAUSE. This will suspend all AR processing. session.pause() // RESUME. This will resume the AR session and continue processing. session.run(session.configuration) // CHANGE. This will change or update the configuration, should you want to do so. session.run(newConfiguration) // RESET. This will restart the session tracking process from scratch. session.run(configuration, options: .resetTracking)
func session(_: ARSession, didUpdate: ARFrame) provides a detailed frame by frame update. The ARFrame contains a captured image, tracking and scene information, feature points, and lighting conditions. • Anchor Added. func session(_: ARSession, didAdd: [ARAnchor]) gets called when an anchor gets added to the AR session. Anchors can be added by calling session.add(anchor: newAnchor). • Anchor Updated. func session(_: ARSession, didUpdate: [ARAnchor]) gets called when and anchor requires an update.