Image courtesy of Buildmedia

Getting started with digital twins

David Weir-McCall |
September 10, 2021
If you’ve been keeping up on visualization technology, you’ve probably heard about digital twins. A digital twin is a combination of a 3D model of a physical entity and a live data stream, with the live data from the real-life entity driving the model’s animation and onscreen displays.

Many Unreal Engine users (covering a range of industries) are developing digital twins to address operational, infrastructure, and planning challenges. "Real-time technology allows everyone to see the same thing and make decisions faster,” says Dorian Vee, Co-Founder and CTO at IMERZA, a company that focuses on experiential technology for real estate. “This translates to reduced costs, fewer change orders, and overall better design.”
Image courtesy of chen3d.com
While the concept of digital twins has been around for a while, creating such systems required a team of programmers and developers, putting digital twins out of reach for many. But now, the real-time technology in Unreal Engine makes it possible for a small team of visualization specialists to create and maintain this system, without specialized knowledge or tools.
Image courtesy of SPP and Imerza
Here at Epic Games, we aim to support the growing digital twins community with resources like our Digital Twins hub, our What are digital twins? article, and a recent discussion with industry leaders on our video series, The Pulse.

The discussion on The Pulse included a live Q&A session, where one of the most common questions was, “How do I get started?” While a fully functioning digital twin project ordinarily requires input from many stakeholders, there are steps you can take as a small team, or even by yourself, to get moving in that direction.

Here, we start with an overview of all the steps you’ll need to take to develop your own digital twin. Afterwards, we’ll talk about specific steps you can take right now to create your prototype.

Determine the purpose

Your first step is to set the purpose of your digital twin project. What are you trying to achieve with it? The purpose might be to analyze traffic or movement patterns, or see how weather patterns affect a resource, or study the efficiency of machinery or human processes. Even if you’re not sure of the ultimate goal, you should choose a general direction for your initial efforts.

Your purpose will lead naturally to the scope of the project. When you’re just starting out, choose a small piece or section of the entire project as your initial focus. Then, as you gain skills, you can expand to a larger scope.

Some uses for digital twins are:
  • Facilities management
  • City planning
  • Autonomous vehicle testing
  • Analysis of usage, traffic, workflows

Create or obtain a 3D model

Every digital twin needs a 3D model, sometimes called a replica in digital twin parlance. If you’re already doing architectural visualization, then you already have a 3D model of the real-world structure in question一or you have the means to create or obtain one一so this is an area you can get moving on right away.

If you already have a model, you can get busy removing unnecessary geometry to improve efficiency in the digital twin. For example, if you plan to evaluate traffic patterns in your building’s exterior parking lot, you don’t need to see the building’s interior. Depending on your visual needs, you might also be able to substitute “expensive” texturing with faster solutions—you could replace normal maps with bump maps, for example, or remove them altogether.

Your first time through the process, don’t be too concerned about visual perfection, as you will find shortcuts for some solutions later down the pipeline. For example, Unreal Engine has a robust foliage system designed specifically for real-time playback.

Your first digital twin model can be just a few textured boxes and some low-poly cars, with any people represented by simple textured cards. Once you learn the mechanisms for moving the pieces around and displaying data, you can always replace each piece with a more detailed version. Working in this way will also give you the means to test each new type of replacement geometry to see how it affects real-time playback.
Image courtesy of Lunas Inc.

Identify data sets

On our video series The Pulse, digital twins expert Salla Eckhardt of Microsoft observed that locating the live-feed data for your digital twin can often be challenging. Maybe your city already has sensors feeding live data to a database somewhere, but it is unlikely that all the data you want is neatly flowing through a single, easy-to-access conduit.
The earlier in the process that you start looking for live data, the better. Since data can come in many different forms, start familiarizing yourself with the available data and the methods by which you could retrieve it. The most common method is via a RESTful API, with data in JSON or XML format.

If you can’t find any live data to start with, try searching for data your city collects and publicly posts online—crime statistics, for example, or sanitation pickup routes. This type of data is usually available in CSV or XLS format for easy ingestion by your test project.

Features for creating digital twins in Unreal Engine

Creating a digital twin requires the use of a few key Unreal Engine features:
  • 3D model import: Our Datasmith feature suite includes tools for streamlining the import process from all major CAD packages. You can learn how to use Datasmith in the Getting Started with Datasmith course, offered for free at our Unreal Online Learning portal.
  • Blueprint Visual Scripting: Unreal Engine’s node-based scripting language makes it easy to pull together functionality that you could ordinarily get only through programming. You’ll need to know how to pull data into a Blueprint script and use it to drive your 3D model. First, try it out with a simple data set from a small spreadsheet. Move a few scene objects around by setting new transform values based on the spreadsheet, then move on to more advanced actions like turning lights on and off, or starting and stopping animation. To learn how to use the Blueprint system, check out the Blueprints - Essential Concepts course.
  • UI creation: You will need a user interface to enable all stakeholders to interact with the digital twin, regardless of whether they know how to use Unreal Engine. The user interface could have various controls to zoom into specific portions of the scene, or to display the live data as text or numbers in an upper corner. You can learn how to create a user interface with Your First Hour with UMG, which will take you through the steps for creating a UI with Unreal Motion Graphics (UMG) UI Designer.
  • API plugin: You’ll need an Unreal Engine plugin to enable the API connection to your live data. To find an appropriate plugin to get started, search the Unreal Engine Marketplace for some great data connection tools. The MongoDB, Firebase, and SQL plugins were created with digital twin solutions in mind.

Start building

Now you’re ready to start building your prototype. Import your model into Unreal Engine using Datasmith, and set up a Blueprint script to make it react to data. Create a simple user interface with two or three options. Show it to a few colleagues for feedback, and keep working on it to get it ready for review.

To get a fuller understanding of how to build a digital twin, check out the Autodesk University presentation My First Digital Twin, with a video that gives more background and provides the exact steps to create a basic digital twin that duplicates the weather conditions for any city, using the Marketplace plugin VaRest to connect UE to external APIs. The digital twin in the video reads live weather data and sets the sun’s position as well as cloud cover and any precipitation. All the tools you need to make a test project are available from that page. Be sure to check out the Downloads tab, which gives instructions for obtaining these resources.

Digital twin creators

There are a number of organizations that create interactive digital twins for clients, using Unreal Engine to combine real-time data with real-time rendering.
Creating your first digital twin can be an exciting process, and we are always interested to know what you’re doing in this growing field. Contact us below and tell us about your own digital twins journey.

    Learn more

    Want to learn more about digital twins, or discuss your own implementation? Contact us to start the conversation.