How to Add Material to ModelEntity programatically in RealityKit?

Updated: January 26, 2023 RealityKit materials There are 6 types of materials in RealityKit 2.0 and RealityFoundation at the moment: SimpleMaterial UnlitMaterial OcclusionMaterial (read this post to find out how to setup SceneKit occlusion shader) VideoMaterial (look at this post to find out how to setup it) PhysicallyBasedMaterial CustomMaterial (Medium story) SwiftUI version Here I … Read more

What is the real benefit of using Raycast in ARKit and RealityKit?

Simple Ray-Casting, the same way as Hit-Testing, helps to locate a 3D point on a real-world surface by projecting an imaginary ray from a screen 2D point onto a detected plane. In Apple documentation (2019) there was the following definition of a raycasting: Ray-casting is the preferred method for finding positions on surfaces in the … Read more

RealityKit vs SceneKit vs Metal – High-Quality Rendering

Updated: October 08, 2022. TL;DR This post is not only about RealityKit, SceneKit & Metal, but also about related APIs and USD files. RealityKit 2.0 RealityKit (and RealityFoundation) is the youngest SDK in Apple family of rendering technologies. This high-level framework was released in 2019. RealityKit is made for AR / VR projects, has simplified … Read more

ARKit – What do the different columns in Transform Matrix represent?

ARKit, RealityKit and SceneKit frameworks use 4 x 4 Transformation Matrices to translate, rotate, scale and shear 3D objects (just like simd_float4x4 matrix type). Let’s see how these matrices look like. In 3D Graphics we often use a 4×4 Matrix with 16 useful elements. The Identity 4×4 Matrix is as following: Between those sixteen elements … Read more