Questions tagged [arkit]

1

votes
1

answer
407

Views

ARKit floating planes

Sometimes ARKit creates plane over existing one. It doesn't merge them. I am testing ARKit with iPhone 7 in closed space. Object placed on that plane appears to float in space. This scenario doesn't happen often, and I can't reproduce it all the time. Can someone tell me how to prevent overlapping a...
Paki
1

votes
1

answer
185

Views

Stop Sound playing on Node in SceneKit

I have the following code for a gesture recogniser that plays a horn, when tapped, and stops when it is released: @objc func didPressHorn(_ sender: UILongPressGestureRecognizer) { let tapLocation = sender.location(in: sceneView) if sender.state == .began { if (wasNodeTapped(node: hornNode!, tapLocat...
Pascal
0

votes
0

answer
5

Views

How to retrieve an environment texture (MTLTexture) cubeMap and change to Spherical Harmonics

I would like to save the auto-generated environment texture from an ARWorldTrackingConfiguration, and then load that same texture later into a different tracking configuration to be added to a model. How is this done? I have looked through everything I could find online and looked through Apple's do...
A.M.
0

votes
0

answer
8

Views

How to detect plane surface using ARKit

I'm creating an app for measuring height of an object using ARKit. For small objects like bottle , pen and monitor it shows almost accurate result. but when am try for some large objects ie height of a men, height of a door its shows different result for each measuring. I think its because of the su...
Sachu
1

votes
0

answer
175

Views

ARKit - How to rotate the object by swiping?

I use ARKit plugin for Unity in order to place a 3D object on the real world surface. After placing an object, how can I rotate it by swiping my finger over it on the iPhone screen?
Rumata
1

votes
0

answer
695

Views

Contextual type 'Any' cannot be used with dictionary literal

I'm getting that error, I'm new to swift and I would like to create a json out of the ARKit let jsonObject: [String: Any] = [ 'imageName': imageName, 'timeStamp': currentFrame.timestamp, 'cameraPos': dictFromVector3(positionFromTransform(currentFrame.camera.transform)), 'cameraEulerAngle': dictFromV...
andre ahmed
1

votes
0

answer
190

Views

ARKIT stereo - move objects

I have two ARSCNView sessions side by side for stereo view. I am trying to create a box in stereo view and then make it spin. All works fine until I move the parentNode using self.parentNode.runAction The movement only occurs in the right side view (SceneView2). No movement occurs in the left side v...
V S
1

votes
0

answer
382

Views

ARSession + SCNView performance issue

I was trying to do some investigation with ARKit. In its ARKit demo, either using ARSCNView or ARSession + metal, the performance is fine (on iPhone 6s, CPU about 50%). But if I replace ARSCNView with SCNView + ARSession, the CPU turns to over 100% after several seconds, and receive '[Technique] Wor...
Reeonce Zeng
1

votes
0

answer
263

Views

SCNSceneSource identifiersOfEntries not working as expected in Playgrounds App

I’m having no luck trying to selectively extract certain elements of a scene file. I’m using SCNSceneSource class. I’m running this swift code inside the Playgrounds App on my ipad pro. I’ve tried multiple dae, scn files using different ways. From the Resources directory. I’ve also tried...
Clay
1

votes
0

answer
335

Views

translating CLLocation coordinates into SCNVector3 matrics

Goal: Have a AR item fixed to a location in real world based on CLLocation coordinates (LLA), and have it in the same place regardless of my orientation on viewload. Ive been trying to convert geo LLA coordinates into an SCNVector3 matrix. The issues im having are as followed: 1) Lat1 and Long1 are...
Oniwaban
1

votes
1

answer
209

Views

IOS 11 Update changed color of my nodes

This post is regarding an app that I already have in the AppStore. Its not been updated for months now so I'm totally sure that the version in AppStore was working before the iOS 11.2 update. Here is the problem/bug: In the app you can choose between different types of dice to roll in AR. You can s...
Magnus T
1

votes
2

answer
312

Views

iOS - ARKit + Vuforia : Convert Vuforia Coordinates to ARKit Coordinates

I want to detect the marker using Vuforia and place a 3d object on it. From then I want to use the ARKit in my application. How do I know the ARKit world transform for the detected marker or 3d object? I am using same view controller to initialize ARKit SceneView and to start Vuforia Engine. I have...
Venkatesh
1

votes
3

answer
536

Views

Drag object on XZ plane

I am working on an augmented reality app and I would like to be able to drag an object in the space. The problem with the solutions I find here in SO, the ones that suggest using projectPoint/unprojectPoint, is that they produce movement along the XY plane. I was trying to use the fingers movement o...
kemkriszt
1

votes
1

answer
207

Views

Share ARSCNView on multiple ViewControllers

I want to build an app where users can swipe between different AR views filled with different content, but in the same AR session - so they don't need to search for plane/feature every time. I've tried to pass ARSCNView from one ViewController to another via a singleton. But it gives me error: Term...
Adam Roszyk
1

votes
0

answer
334

Views

Rotate entire scene in ARKit

I am currently exploring ARKit (using SceneKit) and have created a simple app with some objects placed at various points around the camera. I’m wondering if it is possible to rotate / drag the entire scene around the origin without moving the camera. I’m imagining a horizontal swipe guesture tha...
Alan Spark
1

votes
0

answer
263

Views

How to manually create an anchor and add it to the ARsession in unity+ Arkit

How can I manually add an anchor to ARSession in Unity+Arkit. I don't want to be limited by HitTest? Appreciate your help
Reza Shirazi
1

votes
1

answer
489

Views

Create UIBezierPath shape in 3D world ARKit

I'm making an app where the user can create some flat shapes by positioning some points on a 3D space with ARKit, but it seems that the part where I create the UIBezierPath using these points is problematic. In my app, the user starts by positioning a virtual transparent wall in AR at the same place...
YoanGJ
1

votes
0

answer
290

Views

Add SCNText to SCNPlane

i am adding an SCNPlane using artPlane = SCNPlane(width: CGFloat(widthRequired) * 0.0254, height: CGFloat(size['width']!) * 0.0254) artworkNode = SCNNode(geometry: artPlane) artworkNode?.geometry?.firstMaterial?.diffuse.contents = UIImage(named: 'loadingar') let translation = SCNMatrix4MakeTranslat...
Monty
1

votes
1

answer
260

Views

How to capture image in ARKit and send Binary data?

I want to make a capture image in ARKit and send byte array to TCP server. Well This is my code. @IBOutlet weak var sceneView: ARSCNView! @IBAction func sendButtonAction(_ sender: Any) { let captureImage:UIImage = self.sceneView.snapshot() } I can get image by snapshot but i don't know how convert...
cslee92
1

votes
1

answer
830

Views

Take screenshot of ARKit view

How would I insert a button and use it to take a photo and place it in photo library. I have noticed when using arkit I cant drag buttons and place them over the view. I am seen some people online say you use snapshot() for taking the photo. import UIKit import SceneKit import ARKit class ViewContro...
Sam Burns
1

votes
0

answer
253

Views

How to enable Vuforia's lighting estimation in native iOS when I use SceneKit and ARKit?

I am writing Scene Node in SCNScene for a VuforiaEAGLView. fileprivate func createMyScene(with view: VuforiaEAGLView) -> SCNScene { let scene = SCNScene(named: 'Models.scnassets/sun/DAE_SUN.dae') guard scene != nil else { print('Scene can't be load') return SCNScene() } boxMaterial.diffuse.contents...
Yi Jiang
1

votes
1

answer
322

Views

Arkit place Button relative to 3d Object - IOS

I am trying to place a UIButton relative to coordinates of my 3d object. Can anyone help me, how can i pin the UIButton on 3d object. Any help would be appreciated.
1

votes
1

answer
433

Views

Apple ARKit inaccurate on iPhone x

I work for Stanley Black&Decker, doing high accuracy measuring with ARKit. I have been testing with an iPhone7+ and iPad Pro (extensively since July), and accuracy between AR and real world is pretty good (within a few inches over 40' for example). However, with iPhone X, the accuracy is off - by...
Kirk Topits
1

votes
1

answer
161

Views

How to replace SCNNode with another on the same place with points on marker?

My AR example app shows heart 3D model in touch. When retouching on the 3D model I want to show parts marker on the heart. For that, I created 2 models one for showing plain another one for showing heart with parts arrow marker. But I don't know how to place a marker on the exact place where I place...
1

votes
1

answer
1.2k

Views

convert fbx to scn programatically

I need to convert a couple of models from fbx to scn/dae is there a way to do it via a script or a framework meant for swift? I have tried Assimpkit.
Anika
1

votes
0

answer
286

Views

Adding Multiple Objects in Unity ARKit

I want a user to place multiple objects in a room (like the IKEA app). I'm using Unity3D ARKit plugin. Currently, when I tap the screen, a new object is placed where I tap and the previous object is destroyed. How can I keep every object in the scene after I add them?
Jason Nelson
1

votes
0

answer
208

Views

Magnifying glass UIView

Trying to add a magnifying-glass effect to a uiview, but the magnfifying glass is always black. My code for the Magnifing glass view: public override func draw(_ rect: CGRect) { let context = UIGraphicsGetCurrentContext()! context.translateBy(x: self.frame.size.width/2, y: self.frame.size.height/2)...
user3653164
1

votes
3

answer
113

Views

image is not displaying in scene

I am creating an app based on Augmented Reality. I have downloaded one 3D object from the internet in .obj format and it is converted in a .scn format in Xcode. When I am running the app camera get started but the image is not added to the scene. I am using ARKit SceneKitView import ARKit import UIK...
Naresh Patil
1

votes
0

answer
172

Views

ARKIT application crashing with iOS version 11.2.5

I have an AR application developed using ARKIT it is working fine with iOS Version 11.2.2. When the OS is upgraded to 11.2.5 the application launches correctly. In the ARView it is able track the surface and place the object correctly. However if any UI interaction like rotate, move etc is done in t...
shri
1

votes
1

answer
589

Views

ARKit: How to place one imported 3D model above another?

I am working on a AR project using ARKit. If I touch only the imported 3D object on a point, I want to place another 3D object above it. (For example I have placed a table above which I have to place something else like a flower vase on the touched point). How can I solve the problem that the secon...
Informatics
1

votes
0

answer
388

Views

ARKit Draw 3D Curved Line

I am trying to draw a curved 3D line (doesn't matter if it made by a cylinder, rectangle, etc) on a ARSCNView (Renders using SceneKit). I currently have something like this which renders lines using SCNCylinder but not sure how to curve them. I tried using SCNShape from UIBezierPath to no success....
Nicholas Mata
1

votes
4

answer
1.1k

Views

Why some devices don't support ARCore?

I've seen that ARCore has a few compatible devices (Samsung or Google Pixel), which also appear, along with a few more Android and Apple devices, in the compatible devices of ground plane detection in Vuforia SDK. Why only those devices can support this technology and others not?
Josean Muñoz
1

votes
0

answer
267

Views

ARKit - create world boundaries/get position at edge of visible plane?

Ok, what I am trying to do is create physics body/colliding boundaries for my character, my SCNNode, in my SceneKit game Im building with ARKit. This is so my node cannot move out of the user's vision/go so far away that it isn't visible as it is currently doing. My SCNNode is moved by user input, s...
skyguy
1

votes
0

answer
187

Views

SceneKit Swift - just play dae scene? Just getting white screen?

Ok, I have created an animated scene (.dae) in Blender and exported it into Xcode. I followed a tutorial for that and already made a camera in Blender, etc. In the SceneKit editor, I can click play on bottom and it plays my animation, that's great. I had read that you can just set your scene view s...
skyguy
1

votes
1

answer
93

Views

ARKIT - 3d text - state of the art

request is to be able to render in arkit test input from keyboard. So far I have used SCNText, which is 3d render of plain 2D text. I am not satisfied with that result as the text is clearly a projection in 3D space of a 2D text in X/Y plane. Also applying effects like 'neon' is not effective. The o...
czane
1

votes
1

answer
110

Views

How to draw ARFaceGeometry using OpenGLES?

I am drawing ARFaceGeometry using OpenGLES on my iPhoneX, I draw GL_POINTS and the points tracking my face, but it seems not the correct result, anyone please help me to find where is wrong? Here is my drawing code: ARFaceGeometry *faceGeometry = [[ARFaceGeometry alloc] initWithBlendShapes:self.face...
Misery
1

votes
1

answer
165

Views

How to find orientation of a real-world surface in ARKit

Once I have an ARHitTestResult, how do I go about finding information regarding its orientation. For example, once I use hit-test to find a wall, how do I know its orientation? The worldTransform matrix seems to enclose orientation information, but I find no way of extracting it.
AJ Z.
1

votes
1

answer
141

Views

how to track the position of a node after applying force in Arkit 1.5

As soon as a node starts moving, for some reason, it stops tracking the position of the node. and here's what I mean: internal func launchNode(force:Float) { let force = force * 0.004 currNode.physicsBody = SCNPhysicsBody(type: .dynamic, shape: nil) currNode.physicsBody?.mass = 0.05 let direction =...
LeftyT
1

votes
0

answer
111

Views

how to remove the flicker and shadows of an scnnode in swift

I am using a directional SCNLight attached above the chair. The shadow around the legs of the chair are flickering and there is unwanted shadows on the seat of the chair.
Anika
1

votes
1

answer
42

Views

How can I refresh an SKScene embed in a previous View Controller when dismissing View Controller with ARSKView?

In my SpriteKit game, I have two View Controllers. One is my MenuViewController, which has an SKView/SKScene in it - this handles the level selection, etc. I then have my GameSceneViewController - this has an ARSKView/SKScene in it. When a user completes multiple levels and, for example, earns 3 sta...
podomunro

View additional questions