instructions

Apple has been making continuous efforts in the direction of AR. In 2017, It launched ARKit, and in 2019, it launched RealityKit and Reality Composer editor.

Perhaps many AR developers will feel that ARKit has not been skilled, RealityKit is coming, and doubts also arise:

  • Must we start moving to RealityKit now?
  • What is the difference between RealityKit and ARKit?
  • After two or three years, ARKit was abandoned and only RealityKit was used?

contrast

I have been using ARKit in real development for over a year now. Recently, I also read Raywenderlich’s new RealityKit book, wrote several demos, and tried Reality Composer. These questions also bother me, so here’s a comparison:

project ARKit RealityKit
System version A9 chip +, iOS 11.0+ IOS 13.0+, macOS 10.15+, Mac Catalyst 13.0+
Development of language Objective-C, Swift Swift
Rendering technique SceneKit(based on OpenGL or Metal) Not disclosed (based on Metal)
Rendering features With SceneKit, you can customize lighting and other interfaces Photorealistic rendering, only support PBR
Shader support Support, OpenGL/Metal The document shows that shader is supported, but the actual usage is not available
Physics engine Support, and can be deeply customized Support for real physics, a small number of parameters can be customized
Gesture interaction Not supported, you need to write your own Supports movement, scaling, rotation, etc
animation Support, CAAnimition, SCNAnimation,SCAction, model built-in animation, etc Support motion, zoom, rotation and other Matrix animation, model animation
Many people online Support, need to write their own MultipeerConnectivity related code Support, with MultipeerConnectivity related properties and methods
Music sound 3D sound effects, normal sound effects, background music 3D sound effects, normal sound effects, background music
Map format support color (NSColor, UIColor, CGColorRef), image (NSImage, UIImage, CGImageRef),layer (CALayer), path (NSString or NSURL), SpriteKit scene (SKScene), texture (SKTexture, id or GLKTextureInfo), NSNumber, AVCaptureDevice/AVPlayer is supported on macOS 10.13, iOS 11 and tvOS 11. Materials are supported in documents (colors, shaders, textures, etc.), but only for nowSimpleMaterial``UnlitMaterialTwo concrete classes
Development mode OOP+MVC POP+ECS, native support for the Combine framework

It can be seen that the current RealityKit framework has supported almost all the functions of ARKit in AR, while being more concise and efficient. The main disadvantage lies in the deficiency of rendering.

This is because RealityKit also has an ARSession class that handles AR data and events, so it inherits almost all the AR capabilities. The disadvantages are mainly caused by RealityKit’s ruthless abandonment of SceneKit, the rendering engine; It also comes with MultipeerConnectivity, Combine framework support, and gesture support, which makes it much easier to use.

The advantage of RealityKit leaving SceneKit behind is that it can focus on Metal technology and photorealistic rendering (PBR), and the display is faster and better. Of course, this may also have something to do with the ECS mode. Instead of continuing to use the all-purpose SCNNode class, RealityKit uses Entity to combine the required data. However, the disadvantages are that Shader is not supported for the time being (it is stated in the document that material can be Shader, but there is no way to use it at present). Meanwhile, the textile format is greatly reduced, and the lack of CALayer and AVPlayer is unsatisfactory. Maybe apple will continue to improve RealityKit this year with WWDC2020.

thinking

ARKit, as a basically mature framework, is widely used in AR development at present. It has more open data and supports more rendering types. It still seems to be the first choice for AR development. In particular, the support of texture type is very important for the current AR development. Many AR software try to use a plane as the display screen and display information on it, which is not possible for RealityKit at present.

This makes everyone a little confused: born yu why born bright? We already have a pretty good ARKit, so why redevelop a RealityKit for a little improvement and a little convenience? What’s more, the current RealityKit also has quite a few deficiencies.

After careful consideration, I personally think that the historical baggage of ARKit is too heavy and the development cost is too high. Another problem is that once ARKit has matured and stopped adding significant new features, it faces the embarrassment of being overtaken by cross-platform AR engines like Unity.

The reason why ARKit is taken seriously now is because it is apple’s own, new features introduced first, the best fit, but SceneKit-based rendering in front of Unity is a short board, no matter how powerful and convenient the rendering is not as Unity and Unreal, and ARKit is not cross-platform.

The launch of RealityKit and Reality Composer is to make up for such defects: use Reality Composer to reduce the threshold of development and speed up the development progress. RealityKit is lightweight, improving performance while speeding up the pace of evolution, ready for the future AR glasses. RealityKit and Reality Composer also have cross-platform (Apple Ecosystem only) functionality, available for iOS, iPadOS, macOS, and perhaps future glassOS. Perhaps in the future, Reality Composer will become a full-featured, cross-platform AR development tool IDE rather than just a 3D UI editor, thus avoiding the embarrassment of being replaced by Unity and others.

For the future, it seems inevitable for AR development to turn to RealityKit, but most of the knowledge in ARKit is also applicable to RealityKit, and the cost of relearning is very low. And this process will not be too fast, in apple’s AR glasses before the emergence of ARKit platform will not be abandoned, strong vitality. Of course, if it is a new project with simple features, it would be nice to try RealityKit, and WWDC2020, RealityKit will inevitably be updated with a lot of new features, should be enough for new projects.