You are here: / en / tutorials / pixel-streaming-made-easy

PIXEL STREAMING MADE EASY

Presenting performance-heavy Unreal Engine 4 applications often brings low-powered devices to their knees. Large and graphically high-quality projects are therefore not suitable for every terminal device. With Pixel Streaming, performance-intensive Unreal Engine applications can be made available How can this be achieved? This article shows you how.

WHAT IS PIXEL STREAMING?

Pixel Streaming streams Unreal Engine applications, comparable to Youtube or other streaming services. In contrast to conventional streaming services, this stream can be controlled via mouse and keyboard and the application can be launched on a virtual computer instance using cloud computing. The consumer can conveniently operate the application from the web browser without any additional software. In the following sections, the process is explained using the example of a Windows 10 (64-bit) instance and Amazon Web Services (AWS).

Cloud-Computing

Cloud computing is the relocation of computing power. These computer resources are not used locally (on one's own PC). They are provided in the form of a virtual computer via the Internet and are device-independent. There are many cloud computing providers to choose from. In this article, we will focus on the setup with AWS (Amazon Web Services). AWS is an established cloud computing provider whose services are used by companies such as Netflix or Dropbox.

PREPARING APPLICATIONS FOR PIXEL STREAMING


ACTIVATE THE PIXEL STREAMING PLUGIN

In order to stream an Unreal Engine application, a few simple steps are required. The Pixel Streaming Plugin is not active by default and must be activated manually. To do this, open the "Plugins" menu under the "Edit" tab in the Unreal Engine Editor. Under the category "Graphics" you will find the Pixel Streaming Plugin. After checking the "Enabled" box, the editor must be restarted.

PACKAGING OF THE UNREAL ENGINE APPLICATION

In order to use the application independently of the Unreal Engine Editor, a "package" must be created from the project. This "Package" contains all necessary files for the single application. A "Package" is created in the main menu under: File - > Package Project - > Windows (64-bit). A destination for the application is then selected. The duration of the process varies depending on the project size.

AWS INSTANCE SETUP

To enable Pixel Streaming, an AWS computer instance must be set up. The first step is to create a user account on AWS. Although AWS is a subsidiary of Amazon, it is handled with separate accounts. Once the account is created, the region can be changed. In the best case, the closest possible location of the server is selected. In the case of Studio Merkas, "eu-central-1", whose location is in Frankfurt, was selected. To do this, navigate to the "Region" item at the top right of the dashboard. The dashboard is the main menu after the successful login. There, the desired location can be selected in the drop-down menu.

THE SELECTION OF THE DESIRED HARDWARE

When choosing a computer instance, it is important to know the application's scope. Before starting a computer instance, the selected instance type must be determined in advance. New AWS accounts start without available virtual processors. The number of these vCPUs determines the computing power of the instance. Since applications from the Unreal Engine are mostly performance-heavy, gaming computer instances are suitable for this. For the test, a "g4dn.xlarge instance" is selected, which was developed for graphics-intensive workloads. It contains 4 vCPUs and 16GB RAM

REQUEST AN INCREASE IN THE VCPU LIMIT

To request an increase in vCPU, EC2 (Elastic Computing Cloud) can be searched for in the search bar in the dashboard. In the EC2 dashboard, "Calculate vCPU limit" can be clicked under the "Limitations" tab. Here, the desired "g4dn.xlarge instance" is selected from the drop-down menu. Under "Current limit" 0 vCPUs should be available. Via "Request increase of on-demand limit" the increase can now be requested. For on-demand instances, costs are only incurred by starting an instance. After submitting the request, the case will be reviewed by AWS and may take a few days. The current status, as well as the corresponding correspondence, can be viewed on the support page. For this purpose, "Support" can be entered in the search bar.

AFTER ACCEPTANCE OF THE INCREASE BY AWS

If the increase was accepted, the instance can be started. The instance can be started on the EC2 dashboard under "Instances" on "Start Instances". To get to the desired instance, search for the keyword "Gaming" in the search bar. The search results of the AWS Marketplace can be displayed there. In the search results, the desired "NVIDIA Gaming PC - Windows Server 2019" computer is now located. This can be selected. The figure shows a price overview of this instance. The cost of the "g4dn.xlarge" instance is $0.842 per hour. The price of the memory is 0.119$ per GB. After that the instance is selected from the list and marked. Under "Configure Instance Details" the default settings are applied. The next step is to determine the memory. For the test, 30 GB of the general purpose SSD volume type is selected here. The "Tags" step can be skipped.

CREATE SECURITY GROUPS AND SECURITY KEYS

In order for the instance to be accessible from the Internet, a Security Group must be created. These Security Groups are comparable to a virtual firewall and control the data traffic. From the following figure the different ports can be transferred. The settings are a standard configuration to stream an Unreal Engine application. Ports 80/8888 are necessary for pixel streaming via the Unreal Engine. 19302-19303 is needed for the STUN server. 3389 is used for remote access to the desktop. In the next window all settings can be checked. The button "Start" is now available and can be pressed. After that you will be asked to create a key pair. For this, a key pair name is selected and then downloaded. This "pem" file must be kept safe, as it is required for remote access. The instance can now be started.

FIRST BOOT OF THE VIRTUAL INSTANCE

The current status of the instance can be checked under "Instances" in the EC2 Dashboard. The status check can take about 10 minutes when the instance is started. Before establishing a remote connection to the desktop, an Elastic IP should be created. This IP address is used to access the instance. To do this, navigate to "Assign Elastic IP address" under the "Elastic IP" tab in the EC2 dashboard. The default settings can be applied. In the Instances tab, the running instance can be marked and restarted under Actions. Afterwards, the instance can be connected under Actions. The Remote Desktop File is practical for the connection. This can be downloaded in the popup window and executed afterwards. Under "Retrieve password" the downloaded key can be decrypted. In the following window the .pem file is needed. This is inserted and decrypted. The key can be inserted in the Remote Desktop application. After the password has been confirmed, a new window opens with the desktop of the instance. The instance can now be used like a normal desktop. On the remote desktop, the firewall can now be turned off and node.js can be installed.

SETTING UP AN APPLICATION ON THE VIRTUAL DESKTOP

The application package prepared in advance can now be transferred to the instance. There are several options available here. In the test, WeTransfer is used. In the main directory of the package, a shortcut is created from the .exe file to be executed. To do this, the .exe is dragged into a free area of the folder by holding down the ALT key. Afterwards the start options for this shortcut are determined. With a right click on the shortcut the start options are inserted in the properties under "Target". -AudioMixer -PixelStreamingIP=[IP ADDRESS]-PixelStreamingPort=8888 Instead of "IP address" the public IP address of the instance is used. This is located on the desktop in the upper area on the right side. The last step is to set up the STUN and TURN server. This is done by making a copy of the Start_AWS_WithTURN_SignallingServer.ps1 file. This file is located in WindowsNoEditor\Engine\Source\Programs\PixelStreaming\WebServers\SignallingWebServer. By holding down the CTRL key, the file is dragged into a free area of the folder to create a copy. This copy is for backup only and is optional. The file can now be edited in any text editor. Here only three places must be changed. First the STUN server is inserted. For this there is a list of freely usable servers . Afterwards the TURN server is added. For the TURN server the public IP address is used. The following figure shows the correct insertion of the addresses. As last the Invoke-WebRequest is changed, so that the public IP address is sufficient to call the application. The address https://api.ipify.org/ can be changed in the third line. For this the existing address is overwritten. Afterwards the file can be saved. The file runAWS_WithTURN.bat can be executed in the same folder. After a short loading time, the console window should display three green colored commands. If this is the case, the .exe shortcut in the root directory can be started. The application can now be accessed in any web browser using the public IP address.

CONCLUSION

Pixel Streaming is an easy way to present Unreal Engine games or applications over the Internet. Especially for customers who do not have the necessary know-how or hardware, Pixel Streaming is an excellent way to interact with the application. If Pixel Streaming is to be the transmission medium of choice, a few days should be planned for the setup. It may take several days for AWS to enable the virtual processors.

Offene Fragen

Hat Ihnen der Artikel gefallen? Sie können gerne unsere Artikel teilen, zitieren oder weiterempfehlen. Bei Fragen können Sie uns gerne kontaktieren oder ein kleines Feedback hinterlassen. Wir freuen uns auf Sie!

An article from written on .

Address

Studio Merkas
Game Development and Entertainment Software e.U

Pischekstraße 19
D-70184 Stuttgart
Germany


Opening hours
Monday - Friday, 9 am to 5 pm