Android Vulkan Mobile Renderer

Setting up your UE4 Android project to work with the Vulkan mobile render

Windows
MacOS
Linux

Vulkan_500px_Mar15.png

Unreal Engine 4 (UE4) has built in support for the Vulkan graphics API. Vulkan is a low-overhead, cross-platform 3D graphics library that gives developers more control over the GPU and lower level CPU usage for their Android base mobile projects. In the following document, we will go over how you can enable and use Vulkan in your UE4 Android projects.

At this time, Vulkan is under development and should be considered an experimental feature. If you wish to build and deploy a mobile project using Vulkan, you will need to download and compile UE4, Version 4.12 or later as explained on our Unreal Engine GitHub page.

Vulkan Video Drivers for PC Development

To make sure that you can visualize the rendering options Vulkan has available on your development PC, you will need to make sure you download and install the latest version of video card drivers for your graphics card. Below you will find the minimal driver version you need to use to be able to preview what Vulkan will look like on your development PC.

Checking Vulkan Device Compatibility

Determining if your smartphone supports the Vulkan rendering API can be challenging due to the wide range of Android smartphones on the market. To help you quickly find out if your smartphone supports the Vulkan API, we recommend installing the following program from Google Play Store: Hardware Caps Viewer for Vulkan.

The Vulkan Hardware Capability Viewer is a client tool aimed at developers needing to gather hardware implementation details for devices that support the new Vulkan Graphics API.

Supported Vulkan Devices

Currently, only the following mobile device chipsets have support for the Vulkan API.

  • Google Pixel/Pixel XL or newer

  • Nexus 6P (Android N Devices)

  • Galaxy S7 (Mali & Adreno variants)

  • Galaxy S8

  • Galaxy S9

  • Razer Gaming Phone

Please note that the ability to use the Vulkan API depends on if your mobile carrier has released the Vulkain update for your specific device variant. To find if this support has been pushed to your mobile device, you will need to contact your mobile carrier.

Building for Vulkan

To build a UE4 project that has support for the Vulkan API you will need to do the following:

  1. Before you begin, make sure that you have your Android smartphone plugged into your development PC via USB and that your Android smartphone has developer mode enabled.

  2. Next, download and compile the latest version of UE4 from the UE4 Github branch as the binary version you get from the launcher will not allow you to build for Vulkan.

    If you are unsure how to do this check out the Download Unreal Engine Source Code page for detailed instruction on what to do.

  3. Once UE4 has finished building, launch the UE4 Editor and create a new project using the following settings:

    • Blueprint Project

    • Blank Template

    • Mobile / Tablet

    • Maximum Quality

    • No Starter Content

    Click for full image.

    When that is completed, press the Create button to create and load the new project.

  4. Once the project has loaded, go to Edit > Project Settings, then under Engine, go to the Rendering section and make sure that Mobile HDR has been enabled.

    Click for full image.

  5. Next, locate the Android section, which is under Platforms.

    Click for full image.

  6. In the Android section under APKPackaging, set the Minimum SDK Version to 19 and set the Target SDK Version to 19.

    Click for full image.

  7. Below the APKPackaging section in the Build section, make sure that the following options are enabled:

    • Support arm7 [aka armebi-v7a]

    • Support OpenGL ES2

    • Support Vulkan [Experimental]

    Click for full image.

  8. In the Android SDK section, make sure that SDKConfig paths are pointed to the correct SDK on your development PC.

    Click for full image.

  9. From the menu bar, go to File > Package Project > Android, and select the Android(ASTC) option.

    Click for full image.

  10. Select a location for UE4 to save the Android build and then press the OK button to start the packaging process.

    Click for full image.

  11. When the packaging process has been completed, open up the folder that the packaged build was placed in. Inside this folder, you should see two .BAT files. Locate the .BAT file that has the word Install in the name and double-click on it to install it to your device.

    Click for full image.

  12. Once installed on your device, press on the UE4 icon that has your project name under it to launch the project on the device.

    Click for full image.

Enabling Vulkan Preview Rendering in Editor

You can enable Vulkan Render while inside of the UE4 Editor, and to do so, do the following in your project:

Note: When using the Vulkan Render on PC, what you see in the UE4 Editor Viewport will match one-to-one with what you see on your Vulkan enabled device.

  1. From the Main Toolbar, go to the Edit option and then select the Editor Preferences option from the menu.

    VMP_00.png

  2. In the General section under the Experimental category, expand the Rendering section and click on the checkmark box next to the Enable Metal/Vulkan/High-end mobile Preview Rendering Level in editor.

    Click for full image.

    After doing this, the Editor will need to recompile the entire shader cache to include the required Vulkan options. Depending on the size of your project and power of your development computer, this process could take anywhere from a few minutes, to an hour or more to complete.

  3. On the Main Toolbar, click on the Settings button and go to the Preview Rendering Level option, selecting High-End Mobile / Metal option to enable the OpenGL ES 3.1 preview in the UE4 Viewport.

  4. In the lower right corner of the UE4 Editor Viewport, you should see the text, Feature Level: ES3_1. If you see this text, then everything is setup correctly and you are now seeing what your project will look like when viewed on a device that supports the Vulkan API.

    Click for full image.

Enabling the Vulkan Mobile Preview Render

To enable Vulkan Render with the Mobile Preview Render, do the following in your project:

  1. From the Main Toolbar, go to the Edit option and then select the Editor Preferences option from the main menu.

    VMP_00.png

  2. In the General section under the Experimental category, expand the PIE section then select the checkmark box next to the Allow Vulkan Mobile Preview option.

    Click for full image.

  3. On the Main Toolbar, change the Play Mode from Play this level in the selected viewport to the Vulkan Mobile Preview (PIE) option by clicking on the small white triangle next to the play button, selecting Vulkan Mobile Preview (PIE) from the drop down list.

    VMP_02.png

  4. Click on the Play button that is on the Main Toolbar to launch your UE4 project in a new preview window with Vulkan Render enabled. If everything has been setup successfully, you should see something similar to the image below.

    Click for full image.

If you do not see (SF_VULKAN_ES31) at the top of the preview window next to the project name, that means the project is not using the Vulkan API. Should this happen, make sure that your video card drivers are up to date.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback