Write to Unreal Engine with FME

Evie Lapalme
Evie Lapalme
  • Updated

Introduction

In today's evolving digital landscape, visualizing complex data in real-time environments has become a critical need for industries ranging from urban planning to video game development. Unreal Engine, which is known for its powerful rendering capabilities, offers a dynamic platform for such visualizations. However, integrating detailed 3D models and Building Information Modeling (BIM) data into Unreal Engine can be a complex task. We can use FME to simplify the transformation and integration of this complex data into Unreal Engine. In this tutorial, you will learn how to use FME to seamlessly integrate your data into Unreal Engine and build immersive and interactive visual experiences. We will draw on previous resources, such as our webinars, including insights from Epic Games' Craig Barr. Whether you're working with BIM, SketchUp, or Collada files, this tutorial will walk you through the process using FME's powerful data integration tools.

 

Requirements

  • Workspaces use FME 2024.x+
  • Unreal Engine is free to download and use. More details here.

 

Video

This video was recorded using FME 2019, the interface may be different but the concepts are the same. 

 

Step-by-Step Instructions

Before you begin, ensure you download the relevant template workspaces attached to this article, designed specifically for each part of this guide.

 

Part 1: Revit to Unreal Engine

In this first part, we focus on converting BIM data from Autodesk Revit to Unreal Engine. There are two workspaces attached, one that is completed and the other partially completed. The completed workspace includes all necessary settings pre-configured for handling and transforming the given Revit file. In this section of the tutorial, we will start with the first workspace called Revit2Unreal.fmwt.

 

1. Open FME Workbench and Load Workspace

Open FME Workbench and load the Revit2Unreal.fmwt workspace. Below is an image of the completed workspace. We will be building out the section highlighted on the Furniture feature class. 

 

2. Read in the Revit file

This setup involves reading a Revit file, separating the furniture layer from other layers, and processing each group separately. If reading the Revit file in a blank workspace, you may drop the Revit file onto the canvas and leave all parameters as default. Make sure to select Individual Feature Types as we will be treating the Architectural.Furniture Feature Type separately. 

 

3. Triangulate All Data

Add the Triangulator transformer to the canvas. This will create a TIN Surface for each group of Feature Types, in this case connect the Architectural.Furniture reader feature type to the Triangulator. All default parameters can be used. After running the workspace, the output should have all faces of the geometry as separate features.

Now add the MeshMerger transformer and connect it to the TINSurface output port of the Triangulator. In the MeshMerger, under Group Processing, set the Group By parameter to the BaseCategory attribute or ObjectID for the furniture layer, to merge meshes effectively. This will ensure that each furniture object is individual in the output model. After running the workspace, the output should have all of the individual furniture pieces merged.

 

4. Scale

Now we will scale the models using the Scaler transformer to match Unreal Engine’s scale in centimeters. Connect the mesh output from the MeshMerger to the Scaler. Note: This step can be skipped in the writer's parameters if  "Move to LocalCoordinate System" is set to "Transform Coordinates Only". If this parameter is set to "No", scaling needs to be done with the Scaler (feet to centimeters). Set the scale factor to 30.48 for X, Y, and Z. Set the Scale Origin to 0,0.

 

5. Write to Unreal Engine

Configure the Unreal Engine writer to use the attribute grouped by in the MeshMerger as the Actor Naming and Mesh Naming Method in the writer parameters. Ensure the layer name is set correctly for easy identification in Unreal Engine. For example, the Layer Name can be set to ‘Furniture’ for the furniture layer. 

 

6. Import and Configure in Unreal Engine

Import the output model into an Unreal Engine template. Configure the model and objects to include collision physics, which is essential for interactive environments. Finally, export your configured scene to enjoy within a game setting. For tutorials on how to do this in Unreal Engine, check out these tutorials from the Unreal Engine site:

 

Part 2: Collada & SketchUp to Unreal Engine Demo

In this second part of this tutorial, we will explore the process of bringing Collada and SketchUp data into Unreal Engine. Load the Collada2Unreal.fmwt workspace to begin. This workspace is tailored for handling either SketchUp or Collada files based on your project needs.

If you do not need to have separate elements from your original Collada or SketchUp data, you can write directly to Unreal Engine without transformation. Additionally, you might be able to import your file directly into Unreal Engine without FME as well. 

 

Using Separate Elements

Separate the elements of the file by using a Deaggregator transformer, followed by a Triangulator transformer, to create a TIN Surface. 

 

MeshMerger Transformer

Connect a MeshMerger from the TINSurface output port. In the MeshMerger parameters, set the Group by to the Geometry Name (_geometry_name) attribute in the MeshMerger. This will  keep all features that belong to the same element together when writing later.

 

Finalize and Write to Unreal Engine

Set up the Unreal Engine writer with the correct naming conventions as configured in the MeshMerger Group By parameter.

 

Unreal Engine Import and Configuration

As we did in Part 1, import the model into Unreal Engine, configure physics settings, and prepare your scene for final export. For tutorials on how to do this in Unreal Engine, check out these tutorials from the Unreal Engine site:

 

Conclusion

This tutorial provided a straightforward path to integrating your data into Unreal Engine and covered general tips. We want to ensure you know that while FME can integrate with Unreal Engine, direct support for the engine itself is not provided by Safe Software. Please reach out to Epic Games with further inquiries. 

 

Additional Resources

 

Data Attribution

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.