All Projects → arirawr → Arkit Floorislava

arirawr / Arkit Floorislava

Basic ARKit example that detects planes and makes them lava.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Arkit Floorislava

Measurethings
ARKit framework demo for our article
Stars: ✭ 97 (-19.17%)
Mutual labels:  ios11, arkit, ar, scenekit
Arplayer
Playback videos using ARKit and AVFoundation.
Stars: ✭ 117 (-2.5%)
Mutual labels:  ios11, augmented-reality, arkit, scenekit
Arpaint
Draw with bare fingers in the air using ARKit
Stars: ✭ 672 (+460%)
Mutual labels:  ios11, augmented-reality, arkit, scenekit
Augmentedsolarsystem
An Augmented reality experience to explore planets in our Solar System
Stars: ✭ 69 (-42.5%)
Mutual labels:  ios11, augmented-reality, arkit, scenekit
Argithubcommits
Show your GitHub commit records in 3D with ARKit and SceneKit. 用 ARKit 展示你的 GitHub 提交图
Stars: ✭ 280 (+133.33%)
Mutual labels:  ios11, augmented-reality, arkit, scenekit
Arkit Projects
Experimenting with ARKit
Stars: ✭ 70 (-41.67%)
Mutual labels:  ios11, augmented-reality, arkit, scenekit
Arkit Shell Game
Shell Game built with ARKit and SceneKit
Stars: ✭ 82 (-31.67%)
Mutual labels:  ios11, arkit, scenekit
Realityui
A Swift Package for creating familiar UI Elements and animations in a RealityKit rendered Augmented Reality or Virtual Reality scene.
Stars: ✭ 275 (+129.17%)
Mutual labels:  augmented-reality, arkit, ar
Arkit Sampler
Code examples for ARKit.
Stars: ✭ 1,334 (+1011.67%)
Mutual labels:  ios11, arkit, scenekit
ARKit-Sample-ObjC
ARKit sample application is written in Objective C with features of Add, Remove, Scale, Move, Snapshot for single and multiple objects with plane/surface detection, reset session and AR support checking.
Stars: ✭ 72 (-40%)
Mutual labels:  augmented-reality, scenekit, arkit
Jeelizar
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
Stars: ✭ 296 (+146.67%)
Mutual labels:  augmented-reality, arkit, ar
Arkit
ARKit Base Project. Place virtual objects based on WWDC example project
Stars: ✭ 297 (+147.5%)
Mutual labels:  ios11, arkit, scenekit
Arbottlejump
An ARKit version of WeChat Bottle Jump game. ARKit 版微信跳一跳游戏
Stars: ✭ 259 (+115.83%)
Mutual labels:  ios11, arkit, scenekit
Simple-ARKit-Game
No description or website provided.
Stars: ✭ 13 (-89.17%)
Mutual labels:  augmented-reality, ios11, arkit
stardust-SDK
Stardust SDK and sample app for Unity
Stars: ✭ 23 (-80.83%)
Mutual labels:  augmented-reality, ar, arkit
Arkit By Example
Apple ARKit example app
Stars: ✭ 458 (+281.67%)
Mutual labels:  augmented-reality, arkit, scenekit
Arshooter
A demo Augmented Reality shooter made with ARKit in Swift (iOS 11)
Stars: ✭ 794 (+561.67%)
Mutual labels:  ios11, augmented-reality, arkit
GVRSCNRenderer
SceneKit Rendering and ARKit 6DOF Tracking for Google Cardboard
Stars: ✭ 19 (-84.17%)
Mutual labels:  augmented-reality, scenekit, arkit
ar-resume-with-visual-recognition
An augmented reality based résumé with Face recognition. The iOS app recognizes the face and presents you with the AR view that contains 3D mock face and details of your resume.
Stars: ✭ 71 (-40.83%)
Mutual labels:  augmented-reality, ios11, arkit
Arkit Scnpath
Create paths for your Augmented Reality environments using just points to represent the centre of the path.
Stars: ✭ 312 (+160%)
Mutual labels:  augmented-reality, arkit, scenekit

FloorIsLava

Basic ARKit example that detects planes and makes them lava.

Requirements

  • Xcode 9 (you can view the code in Xcode 8 but will not be able to build the project)
  • Device running iOS 11, with an A9 chip or higher (iPhone 6S or newer, iPad Pro)

Project Walkthrough

Welcome to ARKit! This basic project setup shows how to start an AR session and watch for planes that are detected. We are using an ARSCNView, a specially designed SceneKit view that contains an ARSession.

1. Configuring and starting the session

The ARSession gathers data from the world and processes it. Because we want to place objects on horizontal planes, we need to configure the session to detect them:

let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = .horizontal

We can then start the session with this configuration by running:

sceneView.session.run(configuration)

2. Add a SceneKit node to detected planes

Next, we override the ARSCNViewDelegate renderer methods. The SceneView will call these methods when AR "anchors" are detected in the world. Since we've configured the session to detect horizontal planes, these methods will be called for those as well.

In the didAdd method, we check that the discovered node is a plane, then use a helper function to create a simple SceneKit plane. Finally, we add the SceneKit plane as a child of the automatically-generated node for the anchor.

func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {

  guard let planeAnchor = anchor as? ARPlaneAnchor else { return }
  
  let planeNode = createPlaneNode(anchor: planeAnchor)
  
  // ARKit owns the node corresponding to the anchor, so make the plane a child node.
  node.addChildNode(planeNode) 
}

3. Update the SceneKit plane when the AR plane is updated

As the user moves the device camera around the world, the session gets more information about anchors. We implement the didUpdate method, which is called when the session updates an existing anchor, so we can update our SceneKit node to match the AR plane.

func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) {

    guard let planeAnchor = anchor as? ARPlaneAnchor else { return }

    // Remove existing plane nodes
    node.enumerateChildNodes {
        (childNode, _) in
        childNode.removeFromParentNode()
    }

    let planeNode = createPlaneNode(anchor: planeAnchor)

    node.addChildNode(planeNode)
}

4. Remove the SceneKit plane when the AR plane is removed

Finally, we implement the didRemove delegate method to remove any SceneKit planes we've created if a plane is removed from the world.

func renderer(_ renderer: SCNSceneRenderer, didRemove node: SCNNode, for anchor: ARAnchor) {

    guard anchor is ARPlaneAnchor else { return }

    // Remove existing plane nodes
    node.enumerateChildNodes {
        (childNode, _) in
        childNode.removeFromParentNode()
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].