arkit

How to create USDZ file using Xcode converter?

偶尔善良 提交于 2019-11-27 01:59:25
问题 At the 2018 WWDC Apple annouced the introduction of new USDZ file format. https://developer.apple.com/videos/play/wwdc2018/603/ In relation to creating USDZ file the following was said: To create your own usdz files, a usdz_converter has been bundled as part of Xcode 10 beta. Its a command line tool for creating the usdz file from OBJ files, Single-frame Alembic (ABC) files, USD file (either .usda or usd.c) the basic command line is xcrun usdz_converter myFile.obj myFile.usdz I have installed

How do I programmatically move an ARAnchor?

人走茶凉 提交于 2019-11-27 00:57:51
问题 I'm trying out the new ARKit to replace another similar solution I have. It's pretty great! But I can't seem to figure out how to move an ARAnchor programmatically. I want to slowly move the anchor to the left of the user. Creating the anchor to be 2 meters in front of the user: var translation = matrix_identity_float4x4 translation.columns.3.z = -2.0 let transform = simd_mul(currentFrame.camera.transform, translation) let anchor = ARAnchor(transform: transform) sceneView.session.add(anchor:

ARKit: Placing an SCNText at a particular point in front of the camera

∥☆過路亽.° 提交于 2019-11-26 20:45:29
问题 I've managed to get a cube (SCNNode) placed on a surface where the camera is pointed, however I am finding it very difficult to do the simple (?) task of also placing text in the same position. I've created the SCNText and subsequent SCNNode, however when I add it to the rootNode the text always seems to be added above my head and off the camera to the right (which tells me thats the global origin point). Even when I use the exact same values of position I used for the the cube, the SCNText

ARKit hide objects behind walls

≡放荡痞女 提交于 2019-11-26 18:54:37
问题 How can I use the horizontal and vertical planes tracked by ARKit to hide objects behind walls/ behind real objects? Currently the 3D added objects can be seen through walls when you leave a room and/ or in front of objects that they should be behind. So is it possible to use the data ARKit gives me to provide a more natural AR experience without the objects appearing through walls? 回答1: You have two issues here. (And you didn't even use regular expressions!) How to create occlusion geometry

ARKit with multiple users

夙愿已清 提交于 2019-11-26 18:52:45
问题 What is the best way, if any, to use Apple's new ARKit with multiple users/devices? It seems that each devices gets its own scene understanding individually. My best guess so far is to use raw features points positions and try to match them across devices to glue together the different points of views since ARKit doesn't offer any absolute referential reference. ===Edit1, Things I've tried=== 1) Feature points I've played around and with the exposed raw features points and I'm now convinced

What's the difference between using ARAnchor to insert a node and directly insert a node?

随声附和 提交于 2019-11-26 12:07:17
问题 In ARKit, I have found 2 ways of inserting a node after the hitTest Insert an ARAnchor then create the node in renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? let anchor = ARAnchor(transform:hit.worldTransform) sceneView.session.add(anchor:anchor) Insert the node directly node.position = SCNVector3(hit.worldTransform.columns.3.x, hit.worldTransform.columns.3.y, hit.worldTransform.columns.3.z) sceneView.scene.rootNode.addChildNode(node) Both look to work for me,