Search
Start typing to search...

Passing data from Aximmetry DE to Unreal Engine

Author:
Please note that this is a BETA version of the document. All information presented is correct but we are working on improving the details.

Introduction

In this document, we will describe how to send data from Aximmetry DE to Unreal Engine.

We can pass an arbitrary type of data from Aximmetry DE to the Unreal Engine using the Get Aximmetry TYPE nodes, which can be added to the project's Level Blueprint.
This is useful, for example, if you want to move objects, set light intensity, etc.

Get Aximmetry TYPE

Place a Get Aximmetry TYPE node in your project blueprint.

TYPE can be any of the supported types:

  • Color
  • Integer
  • Logical
  • Scalar
  • Text
  • Transformation
  • Trigger
  • Vector
  • Video

The node will show up in Aximmetry as a pin on the Unreal Project module.

In the example below we have added a Get Aximmetry Color node to the UE project blueprint and named it 'Color from Aximmetry'.

The pin name and the default value are determined by the Name and Default Value parameters of the Get Aximmetry node.
The node also has an Order Index parameter which determines the pin order in Aximmetry. The pins are ordered in increasing Order Index order, but the value 0 is an exception. Pins with this index will go to the end of the list.
Both Name, Default Value, and Order Index must be static (i.e. you cannot use the outputs of other nodes as their input).

The output of these nodes is updated per frame.

Useful Examples

Get Aximmetry Trigger

  • Create the following nodes: Get Aximmetry Trigger, Event BeginPlay, Bind Event to Trigger, Custom Event (this is named "Trigger_Event_0" in our example). (If you can't find the Bind Event to Trigger node, turn off Context Sensitive search in the right-click menu.)
  • Make the following connections (see screenshot below):
    • Event BeginPlay: Exec (white triangle) → Bind Event to Trigger: Exec
    • Get Aximmetry Trigger: Return Value → Bind Event to Trigger: Target
    • Custom Event (red square) → Bind Event to Trigger: Event

howtode image2.jpg

  • Use the Exec output of the Custom Event node to execute the desired action.

Get Aximmetry Video

The following example applies a video received from Aximmetry DE onto a plane in the Unreal Scene.

  1. Create a base material (This material will serve as a base for the dynamic material we will apply to the plane. For more information on dynamic materials refer to the Unreal Engine documentation.
    • Create a new material (Content Browser / Create Basic Asset / Material)

      (We named ours 'VirtualDisplay')
    • Open this material in the material editor by double-clicking it in the content browser.

    • On the left, in the Details panel, change the Shading Model of the material from Default Lit to Unlit
    • Add a Texture / TextureSampleParameter2D node from the right-click menu. The name of this parameter can be anything you want, but it must exactly match the “Texture Parameter Name” input of the “Get Aximmetry Video” blueprint node we will add later.
    • Connect the “RGB” output of the texture parameter to the “Emissive Color” input of the material

    • You can customize this material further to achieve the effect you want but this topic is outside the scope of this document
    • Save the material
  • Create a reference to your target object (e.g. a Billboard by dragging it into the Level Blueprint from the World Outliner (Actor Reference)
  • Add the following nodes to a blueprint:
    • Event BeginPlay
    • Create Dynamic Material Instance
    • Set Material (make sure that you add the one with the Primitive component target and not the Volumetric one)

    • Event Tick
    • Get Aximmetry Video
    • Set Texture Parameter Value
  • Connect the following pins (see screenshot below):
    • Event BeginPlay: Exec (out) → Create Dynamic Material Instance: Exec (in)
    • Create Dynamic Material Instance: Exec (out) → Set Material: Exec (in)
    • Create Dynamic Material Instance: Return Value → Set Material: Material
    • Actor Reference (out) → Set Material: Target (This will automatically add a Get Static Mesh Component node.)
    • Event Tick: Exec (out) → Get Aximmetry Video: Exec (in)
    • Get Aximmetry Video: Exec (out) → Set Texture Parameter Value: Exec (in)
    • Get Aximmetry Video: Return Value → Set Texture Parameter Value: Value
    • Create Dynamic Material Instance: Return Value → Set Texture Parameter Value: Targe
  • Set up the node inputs:
    • Create Dynamic Material Instance
      • Parent: Select the parent material you created in the first step
    • Get Aximmetry Video
      • Name: This will be the name of the video input pin in Aximmetry
    • Set Texture Parameter Value:
      • Parameter Name: This must exactly match the name of the TextureSampleParameter2D parameter of the parent material you created in the first step.

The Get Aximmetry Video blueprint node has a pin called S RGB that controls whether the received video is treated as sRGB or linear.

sRGB should be enabled for textures that contain color information (camera footage etc. that will be rendered into the scene) and it should be disabled for textures used for numerical calculations in shaders (normal maps, masks, etc.) NOTE: This option only affects 8-bit textures. Unreal treats all non-8-bit and floating-point textures as linear.

The Get Aximmetry Video itself doesn’t do any gamma correction. Its output depends on the settings and pixel format of the texture or render target you connect to it. For more information on this, please refer to the Unreal Engine documentation.

The default output is always treated as sRGB regardless of pixel format.

Get Aximmetry Transformation

During your work with Unreal Editor for Aximmetry and Aximmetry DE you might want to move objects in the scene, but you find it complicated going back to UE, moving objects, re-cooking the scene then switching to Aximmetry DE etc… In this section, you will learn how to set up an existing object/actor in an Unreal Scene in Unreal Editor for Aximmetry to be able to move it in Aximmetry without going back and forth, and without re-cooking the scene.

Select the desired object you want to work with later in Aximmmetry, Make sure it’s a moveable object. You can find this option in Transform in the object’s details.

Open the Blueprints menu, then select Open Level Blueprint.

First, you must find Event Tick. To do this, simply right-click on the Blueprint then start typing the Event Tick name in the search bar of the pop-up menu.

Click on the Even Tick to place it in the Blueprint. The Event Tick is a simple event that is called on every frame of the scene.

Now drag the object selected from the World Outliner and drop it into the Blueprint. You might need to resize the level blueprint window for this.

You will get a node in the Blueprint.

Now start pulling a binding from the output of this node. When you see the message “Place a new node” release the left mouse button.

You will get a search window. Type SetWorldTransform, then click on it.

2 new nodes will appear on the Blueprint already connected. The Static Mesh Component is a converter between the object (the Statue) and the SetWorldTransform node.

Find the GetAximmetryTransformation module. To do this simply right-click on the Blueprint and in the popup window type GetAximmetryTransformation. Then click on it.

Connect the GetAximmetryTransformation’s Return Value to SetWorldTransformation’s New Transform Pin.

Give a proper name to the Name pin of GetAximmetryTransformation. This name will appear by the scene’s new input PIN in Aximmetry when you place this scene. To do this click in the empty square next to the Name pin and simply type the name you want.

Connect Event Tick’s output pin to SetWorldTransform node’s input pin. The result looks like this.

Save the Blueprint and close it. Cook the scene then save it. To do this click on the File menu then click on Cook Content for Windows. When it’s ready click on Save All or press Ctrl+Shift+S.


You can close UE for now.

This node will show up as a transformation input pin on the Unreal Project module in Aximmetry. You can connect any transformation you want. However, if you want to can control this transformation from Aximmetry in Edit mode, you can use a Scene Node:

  • Insert a Scene Node in your Aximmetry compound
  • Connect its World Transf output to the Unreal Project module (it is hidden by default - click the button in the upper right corner of the node to reveal it)
  • Enable Edit mode by choosing an output in the Edit / Edit Scene On menu (make sure the Preview output of the virtual cam module is connected to this output)
  • Select the Scene Node in the compound
  • You can move / rotate / scale the transform by using the handles in the output viewport
Article content

Loading
Close
1/10