Coherent GT vs Unreal Motion Graphics – a performance comparison
Recently, Epic Games released the new UI system for the renown Unreal Engine – Unreal Motion Graphics (UMG). We made a comparison in a heavy-UI situation between UMG and Coherent GT to see how they fare performance-wise against each other.
We performed tests of how well do both of these systems do when used to render an UI that resembles the one often found in MMOs – a chat, group party, an inventory and several nameplates (nameplates are the floating bars of health/mana with names above that hover over the characters in many games). This was an UI-intensive situation that pretty often arises in games.
A very important performance optimization of Coherent GT, that we had to take into consideration during the test, was that it only repaints DOM elements that change. The test we performed moved almost all the UI elements all the time and thus it was a “worst-case” performance wise scenario for GT. In such a way the comparison was objective.
In interfaces that don’t change a lot frame-by-frame (like FPS HUDs or menus), GT’s frame-time becomes essentially 0.
Building the samples
We created two UE4 projects that render the default empty scene with a common interface – one using Unreal Motion Graphics and one using Coherent GT.
When we were building the samples we have chosen to use JavaScript and Blueprints to write the movement logic as this is the most straightforward choice for anyone using the technologies in question.
Here’s a screenshot of both interfaces:
If you are interested in the implementation, here’s a high-level view of the blueprint code:
And a gist with our JavaScript code.
(All the art inside is taken from here)
Testing information
The machine we used for the test was:
- Asus Z87M-PLUS
- Intel Core i7-4770 @ 3.4 GHz, 8M cache
- NVIDIA GeForce GTX 760 (2GB DDR5 VRAM, 1152 cores, 1033 MHz)
- GeIL DDR3 16 GB RAM, 800 MHz
As far as engine settings go, we removed the fps cap (by turning both VSync and smooth framerate off).
Finally, we recorded the numbers below using: a packaged development build (x64) in fullscreen at 1920×1080 with no other applications running, taking notes of the data that stat fps
, stat unit
and stat startfile/stopfile
reported
The tests
We started off with a baseline check – an empty scene with no UI. This resulted in:
MS per Frame | FPS | Game Thread | GPU |
7.3 | 135 | 0.8 – 0.9ms | 7.3 |
(all the numbers above are in milliseconds)
Next, we ran the samples with only static UI:
Tech | MS per Frame | UI overhead | FPS | Game Thread | GPU |
GT | 7.5 | 0.2 | 133 | 0.8 – 0.9 | 7.5 |
UMG | 7.55 – 7.6 | 0.25 – 0.3 | 128 | ~3.5 | 7.55 – 7.66 |
In this case both Unreal Motion Graphics and Coherent GT did a fairly good job and there was almost no difference in rendering time compared to the baseline. However, UMG’s Game Thread took more than 2ms more than GT.
The next step was to test both samples with 50 constantly moving nameplates:
Tech | MS per Frame | UI overhead | FPS | Game Thread | GPU |
GT | ~8.05 | 0.75 | 125 | 3.1 – 3.3 | ~8.05 |
UMG | 8.3 – 8.6 | 1 – 1.3 | 110 – 120 | 8.2 | 8.3 – 8.6 |
Here we began to see some significant difference with UMG falling behind and GT being 20 – 43% faster.
We decided to move on to hundred nameplates:
Tech | MS per Frame | UI overhead | FPS | Game Thread | GPU |
GT | ~8.06 | 0.76 | 124 | 4.8 | ~8.06 |
UMG | 17.0 – 17.5 | 9.3 – 10.2 | 55 – 60 | ~17 | 17.0 – 17.5 |
Nope, no error there, Coherent GT really took almost no hit when doubling the number of nameplates while UMG plummeted.
Our conclusion is that: In heavily dynamic UIs Coherent GT outperforms Unreal Motion Graphics by a large margin.
We did some further investigation in order to see where the most significant differences are. We discovered that:
- Coherent GT rendering is faster in almost all cases by about a millisecond.
- Blueprints are slow. So slow that running an empty loop takes almost 2 milliseconds (see the game thread in the static UI). Coherent GT’s JavaScript runtime is faster in this sample and scales a lot better.
We decided to put up a final test using a huge amount of nameplates: 500 (unrealistic, but cool to look upon). Just to see how far we can take it:
Tech | MS per Frame | UI overhead | FPS | Game Thread | GPU |
GT | ~17.2 | 9.9 | ~57 | ~17.2 | ~17.0 |
UMG | 215 | 207.7 | 4.6 | ~215 | 130 – 200 |
We decided to remove Blueprints as a factor, by moving all the computation-heavy code to C++ and exposed it through bindings to both JavaScript and Blueprints. The result was a heavy improvement on UMG’s performance – it came as close as a few milliseconds away on most tests (albeit still slower).
Summary
It may be the case that we are not using Unreal Motion Graphics in the best possible way but we believe that our experience mimics what every UI developer would do when using UMG.
While UMG’s rendering system is highly performant, it is bounded by the slow Blueprint execution system and the fact that it re-draws everything at every frame. This is a huge limitation for its applicability in complex situations such as puzzles, mini-games, multi-window systems. Whereas, Coherent GT is capable of providing both amazing visuals and quick script execution.
In the end, we just want to give you a hint on what to expect: we are working on a new, even faster rendering backend for GT on UE4. Our next release will include a beta and soon we will be able to share new data. Stay tuned!
If you would like to learn more about how you could test Coherent GT please send us an inquiry at sales@coherent-labs.com
Have any suggestions on improving this comparison? Share them as a comment below, on the forum or twitter!