realitykit

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

What does the different columns in transform in ARKit represent?

落爺英雄遲暮 提交于 2019-11-30 07:52:51
问题 An ARAnchor has 6 columns of which the last 3 represent the x , y , and z coordinates. I was wondering what the other (first) 3 columns represent? 回答1: If you're new to 3D then these transformation matrices will seem like magic. Basically, every "point" in ARKit space is represented by a 4x4 transform matrix. This matrix describes the distance from the ARKit origin (the point at which ARKit woke up to the world), commonly known as the translation, and the orientation of the device, aka pitch,

What is ARAnchor exactly?

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:22:17
问题 I'm trying to understand and use ARKit. But there is one thing that I cannot fully understand. Apple said: A real-world position and orientation that can be used for placing objects in an AR scene ...but that's not enough. What is ARAnchor exactly? What are the differences between anchors and feature points? Is ARAnchor just part of feature points? And how does ARKit determines its anchors? 回答1: Merely saying, ARAnchor is an invisible null-object that can hold a 3D content (at anchor's