text
stringlengths
0
17.2k
At the top of the window, click the Capture button.
You'll see a new frame at the bottom of the window that shows a preview of the output being sent to the AJA card. If you have this port hooked up to another downstream device, you should start to see the output coming through.
Each camera that you added to the Locked Camera Actors list for this viewport capture is represented by a corresponding button above the video preview. Click the buttons to switch the capture back and forth between the two views.
Click image to expand.
Now you've set up the Unreal Editor to stream output from cameras in your Level to a port on your AJA card. Next, we'll see how to use Blueprint scripting to do the same thing in a running Unreal Engine Project.
The Media Capture window that you used in the last section is a practical and easy way to send captures to the AJA card. However, it only works inside the Unreal Editor. To do the same thing when you're running your Project as a standalone application, you'll need to use the Blueprint API provided by the Media Output. In this procedure, we'll set up a simple toggle switch in the Level Blueprint that starts and stops capturing when the player presses a key on the keyboard.
The Virtual Studio showcase, available on the Samples tab of the Epic Games Launcher, contains a UMG interface widget that demonstrates how you could control capturing from an on-screen user interface.
From the main toolbar in the Unreal Editor, choose Blueprints > Open Level Blueprint.
We'll need to start from the AJA Media Output Asset that you've created, where you identify the port you want to output to. In the Variables list in the My Blueprint panel, click the Add (+) button to add a new variable.
In the Details panel, set the Variable Name to AjaMediaOutput, and use the Variable Type drop-down list to make it an Aja Media Output Object Reference.
Enable the Instance Editable setting (1), and compile the Blueprint. Then, in the Default Value section, set the variable to point to the AJA Media Output Asset that you created in your Content Browser (2).
Press Ctrl, and drag the AjaMediaOutput from the Variables list in the My Blueprint panel into the Event Graph.
Click and drag from the output port of the AjaMediaOutput variable node, and choose Media > Output > Create Media Capture.
Hook up your nodes to the Event BeginPlay node as shown below:
This creates a new Media Capture object from your Aja Media Output. The Media Capture offers two main Blueprint functions that we'll use to control the capturing: Capture Active Scene Viewport and Stop Capture.
First, we'll save the new Media Capture object into its own variable, so we can get access to it again elsewhere. Click and drag from the output port of the Create Media Capture node, and choose Promote to Variable.
Rename the new variable MediaCapture in the Variables list in the My Blueprint panel.
It's important to save the Media Capture to a variable here. If you don't, the Unreal Engine's garbage collector may destroy it automatically before you're done with it.
Press Ctrl and drag the MediaCapture variable into the Event Graph.
Click and drag from the output port of the MediaCapture variable node, and choose Media > Output > Capture Active Scene Viewport. Do it again, and choose Media > Output > Stop Capture.
Right-click in the Event Graph and choose Input > Keyboard Events > P. Click and drag from the Pressed output of the P node and choose Flow Control > FlipFlop.
Video capture from the Editor will only work when you play your Project in a New Editor Window (PIE) or a Standalone Game. It won't work in the default Selected Viewport mode, or in Simulate mode. In addition, the viewport resolution of your Project (that is, the size of the rendered image the Unreal Engine generates each frame) must match the output resolution set in the active Media Profile, so that it will be the right size for the output video feed.
After your project starts up, you should be able to press the P button on your keyboard to toggle sending the output from the Engine to the AJA card.
At this point, you should have a basic idea of how to work with Aja Media Sources, Media Bundles, and the Media Capture system, and you should understand how all of these elements work together to get professional video in and out of the Unreal Engine.
1 - Set Up the Project
2 - Rendering Video Input in the Unreal Engine
3 - Output Captures from the Unreal Editor
4 - Output Captures at Runtime
On Your Own
Steps
End Result
Steps
End Result
Steps
End Result
Steps
End Result
Remarks
Now that you've seen the basics of how to get a new Project exchanging video input and output with an AJA card, you can continue learning on your own:
Material Tracks
In Sequencer, you can change and animate Materials on your Actors in a variety of ways. Change which Material is currently applied to an Actor using the Material Switcher Track, animate Material Parameters using the Material Parameter Track, or animate several Materials at once using the Material Parameter Collection Track.
This page provides information about the variety of ways you can animate Materials on your Actors in Sequencer.
To switch an Actor's Material with a different one during playback of your sequence, use the Material Switch Track. This track can be useful if you have already created preset Material Instances and want to immediately switch between them.
To switch Materials on your Actor, first add the Mesh Component Track of the Actor in Sequencer. Click Add Track (+) and select the Mesh Component.
Next, add the Material Switcher Track for this Component by clicking Add Track (+) on the Component Track and adding a Material Element Switcher. The element numbers correspond to the Material Elements currently assigned to the mesh. To change more than one material, add switchers for all necessary elements.
Once the tracks are added, you can keyframe them to set materials you want to apply at a specific time. To change the assigned material, click the dropdown menu on the Material Switcher Track and select a different material.
You can now scrub or play your sequence and observe the material switching.
To animate specific Material Parameters over time within a material, use the Material Parameter Track.
Similar to switching Materials, you must first add the Mesh Component Track of the Actor in Sequencer. Click Add Track (+) on the Actor Track and select the Mesh Component.
Next, add the Material Parameter Track for this Component by clicking Add Track (+) on the Component Track and adding a Material Parameter Element. The element numbers correspond to the Material Elements currently assigned to the mesh. To animate parameters on more than one material, add Material Parameter Tracks for all necessary elements.