# Unreal Engine

## Requirements

Windows:

Unreal does not load project files from an UNC path (\\Fileserver\Drive).
It requires a mapped drive letter (like P:).

Royal Render uses UNC paths by default.
The rrClient has to convert them back to a drive letter.
Therefore you have to add your UNC share and drive letter in rrConfig, menu Files, Paths and Drives.

## Setup as Shared Executable

You can setup Unreal Engine as Shared Executable.

Then you don't need to install it on every rrClent.

Please copy the file
[RR]\render_apps\_config_inhouse\examples\
into the parent folder

[RR]\render_apps\_config_inhouse\

Open the file in any text editor and follow the installation steps.

## Submission

1.First you have to run the rrWorkstationInstaller install the submission plugin.
Please make sure that Submission Plugins is enabled and after installation that Unreal Engine is mentioned in the log among the other render applications.
If it isn't, please add your Unreal Engine install paths to the file [RR]\render_apps\_install_paths\Unreal Engine.cfg.
rrWorkstationInstaller updates the UE_PYTHONPATH variable. That doesn't affect programs that were already running, like probably the Epic Games Launcher. To get around that, please stop the process EpicGamesLauncher.exe from the task manager or reboot the machine if you intend to open your projects with Epic Games Launcher

2.Start Unreal Engine.
From the main menu, select Edit > Project Settings.
Search for Movie Render Pipeline in the search browser.
In the Moviepipeline settings, please set the Default Remote Executor to MoviePipelineRoyalSubmit:

3.From the MovieRenderQueue window, press Render Remote to launch rrSubmitter.
Only jobs with a PipelineConfig setting are sent to RR.
For Example the third job in the screenshot below will not be sent:

4.rrSubmitter should list the jobs from the MovieRenderQueue.
We use the Unreal Map as the Render Scene, and the Sequence as the job Layer.
For now we are only converting the following tokens:
{level_name}
{project_dir}
{sequence_name}
A master sequence is split into multiple RR jobs, one for each shot.
The master shot can still be enabled in rrSubmitter.

## Customization

•To submit the render queue without displaying rrSubmitter, please set MoviePipelineRoyalNoUI as Remote Executor.

•To execute python operations at startup, please create the file init_unreal__inhouse.py in [RR]\render_apps\_submitplugins\UnrealEngine_5\Python, alongside our init_unreal.py.

•To create your own submission script, please create your file MyCustomNameSubmit.py in [RR]\render_apps\_submitplugins\UnrealEngine_5\Python, alongside our MoviePipelineRoyal*.py files. Please check our MoviePipelineRoyalNoUI.py as an example: you need to import our functions and create a MoviePipelinePythonHostExecutor class. The skeleton code for an executor is

import unreal
from MoviePipelineRoyalSubmit import create_base_job, collect_rr_jobs, submit_rr_jobs
@unreal.uclass()
class MyCustomNameSubmit(unreal.MoviePipelinePythonHostExecutor):
@unreal.ufunction(override=True)
def execute_delayed(self, inPipelineQueue):
base_job_rr = create_base_job()
rr_jobs = collect_rr_jobs(base_job_rr, inPipelineQueue)
# insert your code here
submit_rr_jobs(base_job_rr, rr_jobs, show_ui=True)
@unreal.ufunction(override=True)
def is_rendering(self):
return False

Then, in your init_unreal__inhouse.py, add the statement

from MyCustomNameSubmit import *

Restart the project and set MyCustomNameSubmit as remote executor.

## Change default project path

By default, UE uses the users home/appdata folder to find projects. (e.g. C:\Users\%USER%\Documents\Unreal Projects)
Even if you open a project from an other location and restart UE, it is not shown in "Recent projects".
To change the project root folder, please edit the file
C:\Users\rrdev\AppData\Local\UnrealEngine\5.3\Saved\Config\WindowsEditor\EditorSettings.ini
and change the line
CreatedProjectPaths=

## Load .dll errors

We got reports about these error messages
So far it does not affect the render.

There are many forum entries about this error message.
But it does not seem there is one with a specific solution.
(If you know how to fix the issue, please let us know ;-) )

R 7| LogWindows: Failed to load 'aqProf.dll' (GetLastError=126) R 8| LogWindows: File 'aqProf.dll' does not exist R 9| LogProfilingDebugging: Loading WinPixEventRuntime.dll for PIX profiling (from ../../../Engine/Binaries/ThirdParty/Windows/WinPixEventRuntime/x64). R 10| LogWindows: Failed to load 'VtuneApi.dll' (GetLastError=126) R 11| LogWindows: File 'VtuneApi.dll' does not exist R 12| LogWindows: Failed to load 'VtuneApi32e.dll' (GetLastError=126) R 13| LogWindows: File 'VtuneApi32e.dll' does not exist

## Known issues (with RR v9.1.00, might have been fixed in a later version)

•If you select a .mov output or if you are using different channels and forget to set the channels variable in your output settings, then RR is not able to find the output.
Please enable the job option "Do not check for frames" in the rrSubmitter in this case.

•Unreal Engine crashes with "Fatal error... Attempted to create a package with name containing double slashes...". That happens when an UI element related to MoviePipeline is displayed (Movie Render Queue window, or the Moviepipeline settings) before the python plugins are loaded. To fix that, please open the file PROJECT_DIR\Config\DefaultEditor.ini in a text editor and remove the section [/Script/MovieRenderPipelineEditor.MovieRenderPipelineProjectSettings] entirely.