RoadRunner can export scenes to Unreal®. The Unreal export option exports a Filmbox (.fbx) file and generates an additional XML file to hold extra data. The XML file holds data for materials and traffic signals in the scene.
On the Unreal side, a plugin is provided to help import the FBX® file by using the information stored in the XML file. The plugin handles the following:
Setting up materials
Material data is read in from the XML file and maps the data into new instance of one of the base materials included with the plugin.
Transparent materials will choose between the translucent and masked blend modes based on the transparency of the diffuse color.
Adjusting the colliders in the imported static meshes
During import, newly created static mesh assets have their "Collision Complexity" property set to "Use Complex Collision As Simple".
Setting up the traffic signal components:
Signal data is read in from the XML file and creates a component in the blueprint with the light bulb names set up during import.
The traffic signals will cycle through their phases during play mode.
The UUIDs prefixed in the scene components for prop instances are needed to reference the static mesh component in the traffic signal script during play mode, so signals will not work if their names are changed.
Unreal software requirements: Unreal Version 4.17+
Follow the instructions in this section to install the Unreal plugin.
See Downloading Plugins for instructions for downloading the latest version of the plugin.
Extract the RoadRunner Plugins zip file and locate the "RoadRunnerImporter" folder and "RoadRunnerMaterials" folders under "Unreal/Plugins".
The Unreal plugin folder now also contains a RoadRunnerCarla integration plugin. Do not copy this folder if you are not using CARLA.
Copy the "RoadRunnerImporter" folder and "RoadRunnerMaterials" folder into the "Plugins" folder under the project directory. If a "Plugins" folder does not exist, create one.
Rebuild the plugin.
Generate the project files.
Windows® - Right-click the .uproject file and select "Generate Visual Studio project files."
Linux® - Run this code at the command line:
$UE4_ROOT/GenerateProjectFiles.sh -project="<Path to .uproject file>" -game -engine
Set UE4_ROOT to your Unreal Engine® install directory.
Open the project and build the plugins by clicking Yes.
The plugin shows up under Edit > Plugins. If it does not appear in that menu, check that the Enabled parameter is selected.
Overrides the default FBX importer when the metadata file is present
Option to overwrite default materials with new materials using the metadata file
Import signal data and timing
Contains component to control traffic signal visuals
Base materials to create instances from
Follow these steps to export a scene from RoadRunner to Unreal:
Open your scene in RoadRunner.
Export the scene using the Unreal option. Select File > Export > Unreal (.fbx + .xml) from the Main Menu.
In the Export Unreal dialog box, set the mesh merging and tiling options, and then click Export.
Browse to open the file dialog box to set the exported file's name and path. The FBX, textures, and XML files are exported to the same folder.
The mesh can be split by segmentation type. Meshes have "<segmentation type>Node" appended to their names.
If the Export To Tiles option is selected, meshes are split per tile. Props are grouped by the tile they are in.
By default, only one file will be exported. Tiles will be stored in separate nodes.
If Export Individual Tiles is enabled, each tile will be stored in its own FBX file.
There are multiple ways to import the scene into Unreal:
Drag the file into the Content Browser.
Use the "Import" button and select the FBX file.
The plugin checks if there is a RoadRunner XML file associated with the imported file and imports as normal if a corresponding XML file is not found.
Selecting File > Import Into Level does not use the exported RoadRunner XML and uses the Unreal importer instead.
Prop Instances are prefixed by their UUID so that the traffic signal controller has a way to identify which signals it controls.
Overrides the default material importing
Needs to be unchecked if you want to set the materials to "Use Existing" in the next dialog box
Import Signal Visuals
Functional only when "Create one Blueprint asset" is selected in the next dialog box
Set Scene > Hierarchy Type to "Create one blueprint asset" (selected by default).
Only the "Create one Blueprint asset" import option works with materials, signals, and transparency sorting. The "Create one Actor with Components" and "Create Level Actors" options import only materials.
Select Invert Normal Maps if needed.
Set Static Meshes > Normal Import Method to "Import Normals".
(Optional) Clear the Remove Degenerates parameter, which can help for some props created in a larger scale.
If traffic signals were set up in RoadRunner, they are imported into Unreal as RoadRunnerTrafficJunction components. These controllers are automatically created during import and included in the created blueprint.
The RoadRunnerTrafficJunction component handles the logic for switching between signal states. UUIDs are used to match to specific game objects in the scene.
The FBX file automatically splits the mesh by transparency sorting layer. This is due to Unreal storing "Translucency Sort Priority" on the static mesh component.
Unreal Engine does not support 16-bit sRGB textures. Therefore, textures appear to be washed out, unless the texture files are converted to 8-bit sRGB textures.
Using the "Create one Actor with Components" option can be more efficient. However, signals will not be set up.
This section covers fixes handled automatically by the RoadRunner plugin.
Meshes with UV coordinates far away from the 0 to 1 range can cause issues in Unreal. On Static Mesh assets with this issue, the "Use Full Precision UVs" option can be set to fix it.
Static Mesh assets need to have their Collision Complexity property set to "Use Complex Collision As Simple". Otherwise, collision boxes need to be manually added.