The Unreal Engine Benchmark BeginsWritten on August 21, 2020 by Kelly Shipman
The past couple weeks I’ve been diving into Unreal Engine, and let me tell you, this program is so much fun. It is pretty evident why so many people, in so many industries, are looking into adding Unreal into their pipelines.
To get familiar with Unreal, I chose to start off with measuring viewport FPS and rendering out videos. Unreal is known for their real time rendering, but people often forget that you can render a video at a higher quality or resolution than your PC is capable of doing in real time. This is often used in film and architecture visualization. They can have a high quality real time version that their client can move around in and change materials and lighting in real time, then be able to render out a 4k video with greater ray tracing samples to post online, or a super high resolution still image for print.
Luckily, Epic published “ArchViz Interior” to their marketplace, so I’m going to use that to get familiar with scripting. Eventually we’d like to have our own scenes so we don't have to worry about distribution rights, but that will come in time. For now, this scene has pretty much everything we need.
Scripting in Unreal has two different methods, Blueprints and C++. Well, they aren’t different as much as complementary. Blueprints are Epic’s visual scripting language, and man do I love it. It's all node based, so no typing lines of code. You can use C++ to create additional custom nodes and other advanced things my brain can hardly comprehend. After going through a few tutorials and some experimentation, this is the blueprint I came up with:
Basically, once I hit the play button it will start counting the number of frames displayed over the course of 5 minutes, calculate the average FPS over that time, and write the result to the log file. Eventually it will also have a countdown timer on screen so I can know how much time is left. I have a similar blueprint that will record how long it takes to render a video. I’ve begun porting these scripts over to scenes that more reflect a game environment as well as a virtual production environment.
Honestly, this probably wouldn’t have been that hard to script the traditional way of typing out code. There is just something about the node interface that my brain loves. I’m really excited to see what other ways I can use this for our benchmark.
The biggest downside to blueprints is that they only run during “game play”, so things like mass importing assets, or compiling shaders will need a different solution.