Giter Club home page Giter Club logo

arheadsetkit's Introduction

ARHeadsetKit

Google Cardboard plus AR

Using a $5 Google Cardboard, the average person can now replicate Microsoft HoloLens. Apps built with ARHeadsetKit are immersive AR headset experiences, simultaneously providing handheld AR alternatives. In just 30 lines of code, even someone without a background in Swift can work with AR.

ARHeadsetKit brings more than just AR experiences. With easy-to-render AR objects and a CPU ray tracing API, ARHeadsetKit provides a unique environment for experimenting with 3D graphics. Its tutorial series simultaneously serves as an introduction to headset AR and iOS, using AR to make the learning process interactive. It can even be used for creating VR apps, when virtual objects cover someone's entire field of view.

For the story behind how ARHeadsetKit was created, check out creating the first affordable AR headset. This framework also has a YouTube video and an official research paper.

Quick Start

Xcode 13 or higher is required for working with ARHeadsetKit, and an iOS device running at least iOS 14. You DO NOT need Google Cardboard. To get started, follow this guide on how to use ARHeadsetKit's tutorials.

If you are just starting out, ignore the sections below that deal with configuring ARHeadsetKit. Sample code from each tutorial's project files already has those settings configured.

Tutorial Series

Learning ARHeadsetKit involves following tutorials hosted in Xcode, similar to Apple's SwiftUI tutorials. ARHeadsetKit's article series compliments its tutorials to provide a deeper understanding of how the framework works.

  • Ch. 1 - Essentials
    • Tutorial 1 - Setting Up ARHeadsetKit
    • Tutorial 2 - Adding Custom Settings
    • Tutorial 3 - Working with AR Objects
    • Tutorial 4 - Alternative Rendering Modes
  • Ch. 2 - Interactive Experiences
    • Tutorial 5 - Selecting Objects
    • Tutorial 6 - Physics-Based Interaction
    • Tutorial 7 - Using Delegate Renderers
    • Tutorial 8 - Creating a User Interface
  • Ch. 3 - Unlocking Everything
    • Tutorial 9 - Reconfiguring ARHeadsetKit

How to Configure ARHeadsetKit from Scratch

Follow the "Creating an Xcode project" section of the quick start guide, but name your project something other than "ARHeadsetKit Documentation". In the project navigator on the left of the Xcode window, click the folder at the very top with your project's name. The project settings will open, with a sidebar stating PROJECT and TARGETS. Click your project's name under TARGETS. In the tab bar at the top, ensure that "General" is selected.

If your app provides an AR experience supported by ARHeadsetKit, follow this guide to configure your app's Info.plist correctly. Otherwise, your app will crash on launch. You do not need to perform this step if you will only use ARHeadsetKit for its utility functions (such as MTLLayeredBuffer).

Choosing a Swift Package vs. an Xcode Framework

There are two options for adding a dependency to ARHeadsetKit: a Swift package or an Xcode framework. A Swift package is easier to set up, and recommended unless you plan to create Metal shaders. An Xcode framework is required for importing ARHeadsetKit's Metal Shading Language utility functions. In addition, the Xcode framework lets you use ARHeadsetKit's launch screen without breaking the file's connection to this GitHub repository.

To set up ARHeadsetKit as a Swift package, follow the "Adding the Swift package" section of the quick start guide. To configure it as an Xcode framework, follow ARHeadsetKit's tutorials and reach "Unlocking Everything". The first tutorial in that chapter is a step-by-step guide to configuring the Xcode framework in a new or existing project.

arheadsetkit's People

Contributors

cody-ferguson avatar garrettsickles avatar philipturner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

arheadsetkit's Issues

Command ExtractAPI failed with a nonzero exit code

Hi Philip, thank you so much for creating a great package/framework! I have been trying to make it work as a framework but it fails with 'Command ExtractAPI failed with a nonzero exit code' and it fails to find metal_stdlib file in the framework - "fatal error: 'metal_stdlib' file not found". I am working with iOS SDK 16.2. Not sure if that's something to do with it. I am new to metal (and to AR) so not quite sure how to fix this issue. I am quite sure I followed the tutorial for 'Reconfiguring ARHeadsetKit' to the T. I tried setting the header paths in the settings but to no avail. What might I be doing wrong?

API for exporting mesh and color data

I am working on an API to export the raw data from ARHeadsetKit. It takes all geometry and color data present at one point in time, then reorders it into a simple serialization format. This is entirely lossless and should happen very quickly.

  • To work with this format, you need a programming language with low-level access to memory layout. Python is not ideal; rather, use Swift or C/C++ compiled in release mode.

The next step is converting the YCbCr data to RGB (if you wish) or rearranging the geometry data into a different layout.

cc @knightfork

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.