reality-composer

Programmatically setting texture in Scene generated by Reality Composer

为君一笑 提交于 2019-12-23 03:15:53
问题 I am creating a cylinder object using Reality Composer. My requirement is to wrap the cylinder with custom image. Image is dynamically created by the app. I have tried following approach and so far it's not working. After loading the anchor from Experience. Fetch model entity from anchor. Fetch model component from model entity. Add or edit material. Code: // Load the "anchor" scene from the "Experience" Reality File let anchor = try! Experience.loadAnchor() // Add the anchor to the scene

Programmatically setting texture in Scene generated by Reality Composer

送分小仙女□ 提交于 2019-12-23 03:15:17
问题 I am creating a cylinder object using Reality Composer. My requirement is to wrap the cylinder with custom image. Image is dynamically created by the app. I have tried following approach and so far it's not working. After loading the anchor from Experience. Fetch model entity from anchor. Fetch model component from model entity. Add or edit material. Code: // Load the "anchor" scene from the "Experience" Reality File let anchor = try! Experience.loadAnchor() // Add the anchor to the scene

Adding a material to a ModelEntity programmatically

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 04:14:14
问题 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? 回答1: Updated : 21st October 2019 . As you said, there are 3 types of materials in RealityKit

Set text programmatically of an Entity in Reality Composer - iOS 13

旧巷老猫 提交于 2019-12-10 11:09:16
问题 In my iOS app I want to introduce a part of AR using the new Reality Composer. In my project I load a scene with this code: let arView = ARView.init(frame: frame) // Configure the AR session for horizontal plane tracking. let arConfiguration = ARWorldTrackingConfiguration() arConfiguration.planeDetection = .horizontal arView.session.run(arConfiguration) arView.session.delegate = self self.view.addSubview(arView) Experience.loadSceneAsync{ [weak self] scene, error in print("Error \(String

Programmatically setting texture in Scene generated by Reality Composer

余生长醉 提交于 2019-12-07 17:28:33
I am creating a cylinder object using Reality Composer. My requirement is to wrap the cylinder with custom image. Image is dynamically created by the app. I have tried following approach and so far it's not working. After loading the anchor from Experience. Fetch model entity from anchor. Fetch model component from model entity. Add or edit material. Code: // Load the "anchor" scene from the "Experience" Reality File let anchor = try! Experience.loadAnchor() // Add the anchor to the scene arView.scene.anchors.append(anchor) let cylinderEntity : Entity = anchor.cylinder! let cylinderModelEntity

Set text programmatically of an Entity in Reality Composer - iOS 13

别说谁变了你拦得住时间么 提交于 2019-12-06 16:05:18
In my iOS app I want to introduce a part of AR using the new Reality Composer. In my project I load a scene with this code: let arView = ARView.init(frame: frame) // Configure the AR session for horizontal plane tracking. let arConfiguration = ARWorldTrackingConfiguration() arConfiguration.planeDetection = .horizontal arView.session.run(arConfiguration) arView.session.delegate = self self.view.addSubview(arView) Experience.loadSceneAsync{ [weak self] scene, error in print("Error \(String(describing: error))") guard let scene = scene else { return } arView.scene.addAnchor(scene) // THIS IS THE