Category "arkit"

How to setup physical based rendering in SceneKit from code?

I want to present some scene with PBR. I created metalness and roughness textures and want to apply it to the mesh. When I try to do it in Xcode - everything is

RealityKit – Text mesh resource performance warning

I have an object in RealityKit that I hover some text over. I make the text using the built in static function on MeshResource like this. let textMesh = MeshRes

ARKit -[UIView setAnimationsEnabled:] Performing any operation from a background thread on UIView or a subclass is not supported

I have a ViewController that has a collectionView inside of it. I display the contents of the collectionView's cells inside an ARSCNView. When I set the ViewCo

When I try to run "xcrun usdz_convert" I get an error

I updated to macOS Catalina 10.15 and Xcode 11.0. Now this command is not running now: xcrun usdz_convert I get this error even though I've updated both $PAT

RealityKit – How to add a Video Material to a ModelEntity?

I use the code to add a picture texture in RealityKit and it works fine. var material = SimpleMaterial() material.baseColor = try! .texture(.load(named: "ima

Occlusion Material or Hold-Out Shader in ARKit and SceneKit

I have seen some examples demo of ARKit where material A is blocking material B, kind of creating occlusion effect, or black hole, or masking. But all of them s

ARKit how position nodes base on horizon and not the camera orientation?

When I add a new node with ARKit (ARSKView), the object is positioned base on the device camera. So if your phone is facing down or tilted, the object will be i

How to load animations made in Blender to ARKit?

I made a 3D object in Blender and made some custom animation to it. However, I manage to load the object to the scene, but not the animation. This is what it

RealityKit – Getting runtime warning when placing a model in ARView

I get the following warning during runtime when I tap to load the model in ARView: Warning (secondary thread): in AppendProperty at line 859 of sdf/path.cpp --

How to use environment map in ARKit?

ARKit 2.0 added a new class named AREnvironmentProbeAnchor. Reading it's instructions, it seems that ARKit can automatically collect environment texture (cubema

Adding 3D object to ARGeoAnchor

Please forgive me if this question is not that great. I've hit a bit of a road block on Apple's documentation of ARGeoAnchor. Currently ARGeoAnchor just shows a

RealityKit – Adding ModelEntity to an ARGeoAnchor

I am in USA (Houston, TX) and I am trying to add a ModelEntity in RealityKit to a specific geo location. But I am not able to see the entity anywhere. Am I doin

Why does RealityKit memory does not clear after deinit called?

I cannot manage to release my RealityKit ARView() from memory. I am aware that there were similar issues with ARKit + SceneKit with workarounds which doesn't so

Unable to activate constraint with anchors

So, I'm trying to create a sceneView programatically class ViewController: UIViewController, ARSCNViewDelegate { var sceneView: ARSCNView = ARSCNView()

How can I replace a ModelEntity in RealityKit?

I want to switch the ModelEntity from the fvBoatAnchor.fvBoatObject to the fvBridgeAnchor.fvBridgeObject with the click of a button, but I'm not sure how I do i

Stereo ARSCNview to make VR and AR mix

I want to make a mix of virtual reality and augmented reality. The goal is I have a stereo camera (for each eyes). I tried to put two ARSCNView in a viewCotnro

How retrieve the normal for a given face of ARMeshGeometry?

given a ARMeshAnchor 'meshAnchor', i can retrieve its geometry and faces : let geometry = meshAnchor.geometry let faces = geometry.faces var i = Int(0) while i

ARView counterpart to SCNView's SCNTechnique?

I have made project with ARKit that uses metal shaders to perform a mirroring effect, and this is assigned by using sceneView.technique. I am trying to figure o

In which cases ARSCNView.raycastQuery returns nil?

In my renderer delegate I create a raycast query from the center of the view to track estimated plane and display a 3D pointer that follows the raycast result.

Can I track more than 4 images at a time with ARKit?

Out of the box it's pretty clear ARKit doesn't allow for the tracking of more than 4 images at once. (You can "track" more markers than that but only 4 will fun