arkit

Why does ARKit app stop working after a few days?

你说的曾经没有我的故事 提交于 2019-12-02 03:56:48
I developed a simple ARKit app in Unity for iOS. It works great, but there is a strange problem: after several days it stops working. So when I click on the app icon on the iPhone, it opens the app for a millisecond and instantly quits. If I reinstall the app again it works perfectly as before. Why is it happening? Is there any way to prevent it? I use "Personal team" in Xcode, can it be the reason? Thank you in advance! Unlike in Android, you can’t install any app on an iOS device. It has to be signed by Apple first. However, when you’re developing an app, you probably want to test it before

AR Reference image - The histogram of the image is narrow

烂漫一生 提交于 2019-12-01 13:36:01
I am adding an image into ARKit project. But it gives error. You have an image whose content is not good for detection. There's a section in the WWDC18 talk What's New in ARKit 2 that talks about this and has some examples of what's good and what's not: The image on the right has multiple problems, but shares the "uniform color regions" and "narrow histogram" issues you have. For a human, that image is pretty easy to recognize, because it uses our ability to identify solid shapes on empty backgrounds — that ability apparently isn't a strength of the computer vision algorithm in play here,

Adding a material to a ModelEntity programmatically

陌路散爱 提交于 2019-12-01 13:02:12
The docs for RealityKit include the structs: OcclusionMaterial , SimpleMaterial , and UnlitMaterial for adding materials to a ModelEntity . Alternatively you can load in a model with a material attached to it. I want to add a custom material/texture to a ModelEntity programmatically. How can I achieve this on the fly without adding the material to a model in Reality Composer or some other 3D software? As you said, there are 3 types of materials in RealityKit at the moment: SimpleMaterial , UnlitMaterial and OcclusionMaterial . So you can try the following code using SimpleMaterial class: var

ARKit 2 freezes: a bug or my misfortune?

南笙酒味 提交于 2019-12-01 11:03:49
Is it just me who experiences the whole scene freezing in ARKit on iOS 12? It usually happens when you use the app for too long in a space that generates too dense point cloud. After certain amount of time, the whole picture starts to lag and then would stop moving at all, until you cover the camera, or turn it away from your objects, or reset AR session. Since I have updated to iOS 12, I started to experience this issue, but I searched a few forums to see if someone else got this problem and couldn’t find anyone. I wonder if it’s just me, or is it a common bug? UPD: iOS 12 beta 2 - the issue

ARKit 2 freezes: a bug or my misfortune?

大兔子大兔子 提交于 2019-12-01 08:36:09
问题 Is it just me who experiences the whole scene freezing in ARKit on iOS 12? It usually happens when you use the app for too long in a space that generates too dense point cloud. After certain amount of time, the whole picture starts to lag and then would stop moving at all, until you cover the camera, or turn it away from your objects, or reset AR session. Since I have updated to iOS 12, I started to experience this issue, but I searched a few forums to see if someone else got this problem and

WKWebView is showing only background

末鹿安然 提交于 2019-12-01 08:33:40
问题 I have a simple ARKit app (SceneKit). I create a SCNBox and then I'd like to add a web view on the front side of the cube. func createBox(position: SCNVector3) { let box = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 1) guard let url = URL(string: "https://www.google.com") else { return } let request = URLRequest(url: url) let webView = WKWebView(frame: CGRect(x: 0, y: 0, width: 500, height: 500), configuration: WKWebViewConfiguration()) webView.load(request) let sides = [

Create a CMSampleBuffer from a CVPixelBuffer

丶灬走出姿态 提交于 2019-12-01 06:25:35
I get a CVPixelBuffer from ARSessionDelegate: func session(_ session: ARSession, didUpdate frame: ARFrame) { frame.capturedImage // CVPixelBufferRef } But another part of my app (that I can't change) uses a CMSampleBuffer. CMSampleBuffer is a container of CVPixelBuffer. In order to create a CMSampleBuffer I can use this function: func CMSampleBufferCreateReadyWithImageBuffer(_ allocator: CFAllocator?, _ imageBuffer: CVImageBuffer, _ formatDescription: CMVideoFormatDescription, _ sampleTiming: UnsafePointer<CMSampleTimingInfo>, _ sBufOut: UnsafeMutablePointer<CMSampleBuffer?>) -> OSStatus The

Create a CMSampleBuffer from a CVPixelBuffer

爱⌒轻易说出口 提交于 2019-12-01 04:53:33
问题 I get a CVPixelBuffer from ARSessionDelegate: func session(_ session: ARSession, didUpdate frame: ARFrame) { frame.capturedImage // CVPixelBufferRef } But another part of my app (that I can't change) uses a CMSampleBuffer. CMSampleBuffer is a container of CVPixelBuffer. In order to create a CMSampleBuffer I can use this function: func CMSampleBufferCreateReadyWithImageBuffer(_ allocator: CFAllocator?, _ imageBuffer: CVImageBuffer, _ formatDescription: CMVideoFormatDescription, _ sampleTiming:

Adding a SCNBillboardConstraint makes the node dissapear

99封情书 提交于 2019-12-01 03:19:50
After what I've read in the documentation and on the internet a SCNBillboardConstraint would rotate a node to always face the pointOfView node - in the case of ARKit , the user's camera. The thing is, when I add a SCNBillboardConstraint to a child node, it dissapears. The nodes are just some SCNTexts added as a subchild of a more complex model. The hierarchy looks something like this: RootNode - > Text node (two of them). Just after I added the root node to the scene's root node, I add this constraint in the following way: updateQueue.async { self.sceneView.scene.rootNode.addChildNode

How to create a Portal effect in ARKit just using the SceneKit editor?

假装没事ソ 提交于 2019-12-01 01:07:06
I would like to create a prototype like this one : just using Xcode SceneKit Editor. I found an answer where the room is created programmatically with simple SCNPlane objects and playing around with the rendering order. However, I would like to put together something more elaborated like downloading the 3d model of a room and make it accessible only through the portal. I'm trying to achieve the same effect directly in the Xcode's SceneKit editor converting this part: //a. Create The Left Wall And Set Its Rendering Order To 200 Meaning It Will Be Rendered After Our Masks let leftWallNode =