The UMG3dRenderWidget plugin provides the bridge between the PocketWorlds plugin from Epic (available in Lyra) and UE projects. This allows for adding 3d views of whole levels in a normal UMG widget.
Discord support: https://discord.gg/4Wss8s288t
- Create a blueprint of the
PocketCaptureclass. It will holdPocketWorlds-specific configuration for rendering. In a typical setting, all properties can be kept at their default values. For more information, please take a look atPocketWorldsplugin documentation. - Create a subclass of the
PocketLevelStageManageractor.PocketLevelStageManageris an actor that holds view capture configuration, like camera settings or capture masks. Most of these settings can be set directly in the level, but two should be set as default values in the subclass:- PocketCaptureClass: The class of the
PocketCaptureblueprint created in the previous step. - ActorAlphaMask: Material used by actors when rendering the alpha mask. Typically, some parts of the captured image should be masked out, e.g. a character in an inventory view should not have a background. Alpha mask is captured by rendering the stage with the ActorAlphaMask overriding actor materials, thus giving the ability to render actors with custom opacity, while having the background transparent. Creating a simple material with white output will result in actors not being masked out.
- PocketCaptureClass: The class of the
- Create a level which should be displayed in a widget.
- Add the stage manager created previously to the level and modify its settings to your liking for given level. The most important ones are camera settings, which should be positioned where desired.
- Add actors, which should be captured, as children of the stage manager. For reasons explained later, it's recommended to add an actor encompassing the whole scene acting as a background (e.g. a black sphere) along with lights using a different channel than the main game one. The background actor should be added to the
ExcludedFromAlphaMaskarray in the stage manager if the background should not be visible in the resulting capture.
- Create a Data Asset of type
TaggedPocketLevel. Set a tag which will be associated with the level when choosing what to render, the level reference itself and its roughly approximated bounds. - Create a material, which will contain the captured level and can be used as an input for e.g. image widgets. Set its domain to User Interface and blend mode to AlphaComposite (Premultiplied Alpha). Add two texture sample parameters for color (named Diffuse) and alpha (named AlphaMask), as shown below:

- In UMG editor create a subclass of the
PocketLevelWidgetand add an image widget inside. Set the brush of the image to the material created previously. Ideally, set its size to the capture size configured in the stage manager. - Set its
PocketLevelto theTaggedPocketLevelData Asset created previously,CameraRenderMaterialto the material created previously andDesiredSpawnPointto a point very far from the normal play area. The levels to be captured (there can be many for different captures) will be spawned at that point and use the configured bounds to avoid intersecting each other. In order to not interfere with normal game lighting, captured levels should use their own lighting channels. - The created widget will contain the rendered level and can be added to the UI.
