Alain Galvan ·2/14/2017 7:36 PM · Updated 1 year ago
A high level overview of Unreal Engine 4's Engine Architecture, reviewing the RHI and underlying design.
Tags: blogunrealenginetutorialRHIrenderinghardwareinterface
Unreal Engine is an open source game engine developed by Epic Games.
Rendering is done with the Render Hardware Interface (RHI) by queuing up command buffers, basically functions that are executed by the render thread that perform graphic logic. Every single Unreal engine draw call boils down to enquing rendering tasks to Unreal's render scheduler:
//https://github.com/EpicGames/UnrealEngine/blob/16dc333db3d6439c7f2886cf89db8907846c0e8a/Engine/Source/Runtime/RenderCore/Public/RenderingThread.h#L602
ENQUEUE_UNIQUE_RENDER_COMMAND(...);
Unreal performs a lot of batched draw calls in the UI for efficiency.

Right Click Menus and Tooltips are actually just render targets that are placed on top of the main window, rather than their own unique windows.
Unreal Engine 4's rendering pipeline is pretty complex, so let's break it down into steps:
├─ 🚩 Frame 1
│ ├─ ⚪ InitViews # Initialize/Update data structures
│ ├─ ⏰ TemporalSamplingSetup # Temporal Anti-alias calculations
│ ├─ 🔲 BasePass(es) # Albedo, Normal, Roughness/Metallic, Depth
│ ├─ 🌓 ShadowDepths # Shadow Maps
│ ├─ 💨 MotionBlurVelocities # Motion blur calculations
│ ├─ 💡 Lights # Direct/Indirect Lighting
│ ├─ 🔎 ScreenSpaceReflections # Reflections
│ ├─ 🌎 Atmosphere # Atmospheric scattering
│ ├─ 📹 PostProcessing # Temporal Anti-Aliasing, Motion Blur, Bloom, etc.
│ └─ 🎦 SlateUI(s) # Unreal UIs
└─ 🚩 Frame 2...
There's a lot more to it than just those things, but the key to it all is the Base Pass step (pictured above) where your materials get rendered, and the Post-Processing step where your scene goes through color toning and cool effects like motion blur.
Kostas Anagnostou (@KostasAAA) released a series of blog posts on how Unreal Engine renders a frame.