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 two methods to achieve this:

  • General Method: This can be implemented in any existing material of an object. While it is simpler to set up than the other method, it can result in blurred images for moving videos due to anti-aliasing (AA) effects.
  • Media Plate Method: Unreal has a special Actor called a Media Plate. Media Plates can be excluded from anti-aliasing (AA), resulting in a clearer displayed video.

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

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