Unreal Engine does not provide a native method to acquire a clean game viewport capture (excluding UI) at runtime with a resolution completely independent of the physical window size.
This plugin modifies the engine's default rendering behavior to provide an excellent solution, offering the following key benefits:
- Independent Resolution: Output high-resolution game frames even if you lack a high-resolution physical monitor.
- Clean Capture: Obtain pure 3D scene footage without any UI overlays.
- Ideal Use Cases: Perfect for game streaming, live broadcasting, or custom in-game photography and camera systems.
Please note that this plugin has only been tested in Unreal Engine 5.7.1. Compatibility with other engine versions is not guaranteed. If you are using a different version of Unreal Engine, you will need to test and verify its functionality yourself.
- Enable the ViewportCapture plugin in your Unreal Engine project.
- Go to Project Settings -> Engine - General Settings -> Default Classes -> Game Viewport Client Class.
- Select
FixedResolutionViewportClientfrom the dropdown menu.
All exposed functionalities are available in Blueprints under the Viewport Capture category (via ViewportCaptureBlueprintLibrary).
Sets the internal fixed resolution for the 3D scene rendering. Please note that the game's actual rendering resolution is strictly locked to this setting and will not change or scale according to the physical viewport window size.
- Parameters:
Width(Integer): The desired render width.Height(Integer): The desired render height.
- Note: Your project must use
FixedResolutionViewportClientas its Game Viewport Client class for this to take effect.
Sets the render target that will receive the real-time captured output of the viewport. The captured image will be automatically scaled from the internal render resolution (configured via Set Game Render Resolution) to match the resolution of the provided TargetRT.
- Parameters:
TargetRT(Texture Render Target 2D Object Reference): The Render Target where the viewport output will be captured.
Sets the color space mode to use when drawing the 3D scene.
- Parameters:
Mode(EColorSpaceMode Enum): The desired color space. Options include:Engine DefaultLinearACES
This project is licensed under the BSD 2-Clause License. See the LICENSE file for details.