Giter Site home page Giter Site logo

arbrush's Introduction

ARBrush

Quick demo of 3d drawing in ARKit using metal + SceneKit.

Code adapted from: https://github.com/lapfelix/ARKit-line-drawing and: https://www.raywenderlich.com/146414/metal-tutorial-swift-3-part-1-getting-started

NOTE: This is experimental code! ..I'm just learning swift.

Also note: this demo is pretty trivial to accomplish in Unity with the ARKit plugin (https://forum.unity3d.com/threads/arkit-support-for-ios-via-unity-arkit-plugin.474385/ https://www.assetstore.unity3d.com/en/#!/content/92515 ). This demo was more to see if metal drawing could be layered on top of scenekit.

Alt text

Author

This project was created by Laan Labs. We design and build solutions at the intersection of Computer Vision and Augmented Reality.

http://labs.laan.com

@laanlabs

License

ARBrush is released under the MIT License. See LICENSE for details.

arbrush's People

Contributors

cclaan avatar laanlabs avatar willperkins 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arbrush's Issues

I cannot run the code successfully .

I am trying to run the code on Xcode 10.1, iOS 11 and Swift 4. However, I am getting two errors in shaders.metal line 104 and 109:
line 104: no matching function for call to 'dot'
line 109: no matching function for call to 'reflect'
does anyone solve the same issue?
Please let me know if you have any idea how to solve them. thank you

License

Can you please update the license?

Is it possible to clear line?

I try to brush.clear() and clearDrawing(). It works, but if I draw after clear -> app fails without any information in log.

App is broken

Something changed with metal / arkit to make this app no longer draw correctly for me. I'm on iOS 13.3

touch moved on screen

If I want to pan on the screen,not hold the draw button and remove the device,what should I do?thx.

Crashes on bgra10_XR_sRGB

The app crashes on view touch unless I change the pixelFormat in VertBrush.swift to pipelineStateDescriptor.colorAttachments[0].pixelFormat = MTLPixelFormat.bgra8Unorm_srgb

I'm on a iPhone 7, is this expected?

SCNMatrix4 init issue

Cannot invoke 'SCNMatrix4.Type.init' with an argument list of type '(matrix_float4x4)'

any fix ?

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.