Search
Start typing to search...

Virtual Screens in Unreal from Aximmetry

Author:

Introduction

To display videos from Aximmetry in Unreal, we can use the Get Aximmetry Video node in a Blueprint and apply the video to the material of an object. 
This allows us to render displays such as screens, monitors, televisions, digital banners, or any other surfaces that would display a video in the real world.

We will discuss three methods to achieve this:

  • Aximmetry Virtual Screen Asset: An asset built into Unreal by Aximmetry that displays videos without anti-aliasing (AA) effects, resulting in a clear video display.
  • General Method: This method can be applied to any existing material of an object. While it is easy to set up for existing assets, it may produce blurred images for moving videos due to anti-aliasing (AA) effects.
  • Media Plate MethodUnreal includes a special Actor for playing back videos called a Media Plate. Media Plates can be excluded from anti-aliasing (AA).

Then we discuss how to Playback from Aximmetry into these virtual screens.

Aximmetry Virtual Screen Asset

Starting from Aximmetry version 2025.1.0, Unreal Editor for Aximmetry includes an Actor asset that simplifies the creation of virtual screens.

You can add Aximmetry's Virtual Screen asset from the Place Actors menu or panel:

Place Actors menu

Place Actors panel


Once the Virtual Screen asset is added to your scene, open the Level Blueprint:

Drag and drop the Virtual Screen asset from the Outliner panel into the Level Blueprint.
Then, set the video using the Set Texture node and the Get Aximmetry Video node:

The Virtual Screen asset uses the same anti-aliasing (AA) removal method as billboards. If you have objects in front of the Virtual Screen, you need to enable custom depth write for those objects. For more details, refer to Objects in Front of the Billboard documentation.

After this, and once you've cooked your project, the Unreal module in Aximmetry will have a video pin for your Virtual Screen. Then, in Aximmetry, you can play the video as described in the Playback from Aximmetry paragraph below.

Aspect Ratio

Set the Screen Aspect parameter to match the aspect ratio of the videos you intend to use. For example, for a video with a resolution of 1920 x 1080, the aspect ratio would be 1920/1080 = 1.777778:

If Fit Mode is set to Stretch in the Blueprint, the Screen Aspect will be disregarded, and the video will stretch to fill the texture's space:

Screen Mesh

In the Virtual Screen Actor, you can change the mesh from a Plane to any other mesh at the Screen Mesh parameter:

General Method

In this example, we will create a material to use for the display. However, existing materials can also use this method.

This method is also demonstrated in the [Tutorials]:Unreal\Basic_Virtual_Screen.xcomp compound.

Creating the Material

This material will serve as a base for the dynamic material on the plane.
For more detailed information on materials, refer to the Unreal Engine Materials documentation.

To create a new material, right-click in the Content Browser, and select Create Basic Asset / Material:

We have labeled ours 'VirtualDisplay'.

Open this material by double-clicking on it in the Content Browser.

In the Details panel on the left of the new window, change the Shading Model of the material to Unlit:

NOTE: This adjustment is done to mimic a real-world light-emitting screen.

Add a Texture / TextureSampleParameter2D node from the right-click menu of the Material Graph. You may name this parameter as you wish, but it is crucial to use the exact name in the Blueprint we will create later. We have named ours DisplayTexture:

Connect the RGB output of the texture parameter to the Emissive Color input of the material:

Save the material.

NOTE: While this material can be further customized to achieve various effects, such discussions are beyond the scope of this document.

Applying the Material to an Object

Next, apply the material to an object intended for displaying the video. This can be done, for example, by dragging and dropping the material from the Content Browser onto the actor's Materials field. In our case, we utilized a simple plane actor object.

The video will not automatically rescale the object. You must ensure that the object has the same dimensions as the video.
For example, in the case of a 1:1 plane and a video with a 1920x1080 resolution, you could resize the transform's scale to 1.92 by 1.08:

Set Up a Blueprint

We now proceed to integrate the object and video from Aximmetry into the Level Blueprint.

Create a reference to your target object by dragging it into the Level Blueprint from the Outliner, like here.

Add and connect the Event BeginPlay, Create Dynamic Material Instance, Set Material, Event Tick, Get Aximmetry Video, and Set Texture Parameter Value nodes.
The Set Texture Parameter Value node is only searchable if the Context Sensitive search is turned off.
There are two Create Dynamic Material Instance nodes with the same name. Choose the second one, where the Target is Kismet Material Library.
Ensure you select the Set Material node that targets the Primitive Component, not the Volumetric one. It is distinguished by its indentation, found under Rendering / Material.

Set the following node pins:

  • Create Dynamic Material Instance - Parent pin: Select the material created in the first step.
  • Get Aximmetry Video - Name pin: This will be the video input pin's name in Aximmetry.
  • Set Texture Parameter Value - Parameter Name pin: This must exactly match the name of the TextureSampleParameter2D parameter of the material you created in the first step.

NOTE: The Set Material node requires a static mesh component for the Target pin. When connecting an actor directly, Unreal automatically generates the necessary static mesh component conversion node:

To copy and paste the above nodes into Unreal's Blueprint editor, click on this box: , press CTRL + A to select all text and CTRL + C to copy it, then in the Unreal blueprint press CTRL + V to paste it.

NOTE: When using the Get Aximmetry Video for shader numerical calculations, you likely want to disable the S RGB option, more on that here.

After this, we can play the video from Aximmetry as described below in the Playback from Aximmetry paragraph.

Media Plate Method

The Media Plate method can be used to provide a clearer image in moving videos by excluding Media Plates from anti-aliasing (AA).
This is done by using an Overlay Materials technique. The downside is that transparent objects will appear behind the media plate.

Media Plate Actor

First, we need a Media Plate actor. We can drag and drop the Media Plate from the Place Actors panel, which can be opened from Window > Place Actors:

To use the Overlay Materials technique, we need to apply different materials by selecting Apply Overlay Composite Materials when right-clicking on the Media Plate actor in the Outliner panel:

For more information about Media Plates, refer to Unreal's documentation here: The Media Plate Actor

Set Up a Blueprint

We now proceed to integrate the media plate object and video from Aximmetry into the Level Blueprint.

We need to use the materials of the Media Plate. To locate these materials in Unreal Engine's folders, select the Media Plate actor in the Outliner panel and click on the Browse To Material button in the Details panel:

This action will move the Content Browser to the folder containing the Media Plate materials. From here, drop the M_MediaPlate_Masked and M_MediaPlate_OverlayComp materials into the Create Dynamic Material Instance node's Parent pin in the blueprint. Additionally, create a reference to the Media Plate actor by dragging it into the blueprint from the Outliner panel.

To copy and paste the above nodes into Unreal's Blueprint editor, click on this box: , press CTRL + A to select all text and CTRL + C to copy it, then in the Unreal blueprint press CTRL + V to paste it.

When creating the blueprint nodes, note that there are two Create Dynamic Material Instance nodes with the same name. Choose the second one, where the Target is Kismet Material Library.
Ensure you select the Set Material node that targets the Primitive Component, not the Volumetric one. Similarly, choose the Set Overlay Material that targets the Mesh Component.
The Set Texture Parameter Value and Set Overlay Material node is only searchable if the Context Sensitive search is turned off. 
Also, the following node pins must be set as in the above screenshot:

  • Get Aximmetry Video - Name pin: This will be the video input pin's name in Aximmetry.
  • Set Texture Parameter Value - Parameter Name pins: MediaTexture

Aspect Ratio

You can define the aspect ratio of the Media Plate by either adding the video in Unreal by defining the Media Path or setting the Aspect Ratio parameter:

Playback from Aximmetry

Utilizing the Video pin in Aximmetry can be achieved through various methods, including creating a Video Button on a Control Board.
A relevant compound with such buttons implemented is found at: [Common_Studio]:Compounds\Overlays\Overlays_Vid_Ins_Logo_Crawl_Green.xcomp

Using the Video Buttons enables easy management and switching between different videos:

Article content

Loading
Close
Loading spinner icon
1/10