For the comparison we developed an application with the same features in each of the two game engines. Although the UI elements differ visually, they serve the same purpose and enable us to distinguish between the two engines.
The application is AR-based and allows for placing a dancing couple in the room and to watch their dancing movements in detail. The models throw correct shadows on the ground, and the light intensity on the dancing couple is computed based on the current ambient brightness. By means of buttons the dance animation can be started and stopped. Moreover, its speed can be regulated with a slider.
The Unreal Engine is known for its high-quality graphical presentation of 3D objects without having to change too many settings. However, this is only the case when a high-end terminal device such as a PC is used. As soon as applications are exported to mobile devices, first limitations are encountered since those devices offer less processing power, and the usage of materials is restricted.
If the goal is to realize an AR application with the Unreal Engine, this will become especially complicated. While the objects look fine in the engine itself, there is a substantial quality loss on mobile devices. Additionally, the engine’s documentation does not include any guideline on this matter, and therefore developers are forced to simply try out different settings to find the one that works best and delivers the most appealing result.
The problem becomes especially clear with respect to light settings or the presentation of materials in AR. While the models and textures look smooth in the engine, they become coarse and angular in AR. The reason for this is that several materials of 3D objects are not fully supported on mobile devices. However, an acceptable result can be achieved after a few alterations to the materials.
In contrast to the Unreal Engine, Unity is constructed in such a way that it allows for changing it for a specific type of terminal device right from the beginning. Not only does this enable developers to build correctly on mobile devices, for example, but it also changes the engine’s visual computing. Consequently, the look of the materials is adjusted for the operating system of the respective terminal device, which allows for using the materials’ optimal visual quality.
Additionally, there are different render pipelines for Unity that are customized for mobile devices. This enables an appealing look while the performance does not suffer due to a reduced computing power.
Despite these positive points, Unity still requires developers to adjust several settings and to invest further work into the visual look. This extra effort is however balanced by the fact that shaders and materials are available through the asset store and that there are several additional tutorials on the internet, optimized for mobile devices.
In general, there is a lack of fitting settings for the Unreal Engine regarding AR, which makes it more difficult to achieve a pleasing result. Moreover, this engine displays several bugs when developing AR applications. Those errors are rarely documented so that developers are forced to experiment with different versions of the engine until the application runs as desired. An example for this is the “VideoBackgroundMaterial”, which is required to insert an ‘invisible’ surface under the models to make their shadows visible. This was only possible by means of a work-around in the preview version UE4.26 because other versions tended to scale the material incorrectly or not at all.
In addition to this, there are difficulties in building the project on iOS because in our case the Unreal Engine does not recognize Xcode and can therefore not be created. It is possible to create an .ipa file instead that can be installed with Xcode on a mobile device. In order to generate such a file directly in the Unreal Engine, however, an Apple developer account is required to be able to create a provisioning profile and a developer certificate, which are then integrated into the project settings in the Unreal Engine.
The AR framework available in the engine is small and only offers basic functions for AR. If developers want to create more complex applications, for example with occlusion or motion capture, they will need to use functions of ARCore or ARKit. This has the disadvantage that an application cannot be developed for both systems at once because the ARCore library can only be used with Android devices while the ARKit library only supports iOS. Overall, the blueprint programming of the Unreal Engine still offers a fast prototyping, which can save time in the development process.
ARFoundation is now a powerful tool for implementing AR in Unity. Even though bugs are still encountered regularly, they can be eliminated fast given that the tool is constantly being enhanced. ARFoundation directly uses the functions that are provided by ARCore and ARKit. This way, switching between iOS and Android is unproblematic in most cases and facilitates developing for two platforms.Unity itself offers several examples via GitHub, providing a useful overview of the functions delivered by ARFoundation and how they can be used.
It is recommended to settle for either iOS, Android or both before developing for mobile devices. If an app is designed only for Android, it can certainly be developed in Windows. However, if it is supposed to run on both operating systems or even exclusively on iOS, it is recommended to use an Apple device for the development. The reason for this is that Unity must first open the project in Xcode so that it can be run on iOS devices, but Xcode is only available for OS, which significantly complicates building on Windows.
Despite the above-mentioned technical variations, tracking the real space runs very smoothly in both engines and there are no striking differences.
Conclusion of the Comparison:
In recent years, augmented reality and especially the development for it have been enhanced rapidly. Therefore, the comparison of Unity and the Unreal Engine has been an important experience for us to obtain a new overview of the features both game engines can offer for this purpose. Based on the comparison outlined above and our current knowledge, we have decided to keep utilizing Unity for our AR development.