- Open the Unreal project;
- Add a CineCameraActor to the scene (Place Actors -> Cinematic -> Cine Camera Actor);
- Connect the Composure plugin (Edit -> Plugins -> Composure);
- Window ->Virtual Production-> Composure Compositing -> Click RMB-> Create New Comp -> Empty Comp Shot.
Important: In this and the following paragraphs, do not forget to save the changes so that they are displayed in the project.
Attention! The following sequence of steps is relevant for Blackmagic video capture cards. For other manufacturers, the steps may differ.
- Right-click on the Compositing Element (created in the previous step) -> Add Layer Element -> Media Plate;
- In the Content Browser RMB -> Media -> BlackmagicMediaSource;
- Go to the created BlackmagicMediaSource -> Blackmagic -> Configuration -> select the configuration that corresponds to the camera settings -> Apply;
- In the Content Browser RMB -> Media -> Media Player -> check the box "Video output MediaTexture asset" -> OK;
- Go into the Media Player and in the MediaSources tab (below) double-click on the BlackmagicMediaSource created in step 2.3 - a video stream from the camera should appear in the player window.
Important: The Media Player must be open in a separate window during operation - when it is closed, the video stream will stop. Also each time you start Play it is required to repeat steps from step 3.5 to get the video stream again.
- Go to the Details tab of the MediaPlate component (see section 2.1) -> Composure -> Input -> Inputs ->Disclose Media Source -> in Media Source we transfer the Media Texture that was automatically created together with MediaPlayer in step 2.4. Check that the Media Plate now receives video from the camera.
- Adjust the chromakey: MediaPlate -> Composure -> Transform/Compositing passes -> Transform passes -> Expand Chroma Keying -> Key Colors -> Add Element (+) -> select the desired chromakey color using Color Picker or a dropper () on the camera video.
right-click on Composing Element -> Add Layer Element -> CG Layer. The image from the CineCameraActor camera you added in step 1.2 should automatically appear in its window.
- Go to Compositing Element (see point 1.4) -> Details -> Composure -> Transform/Compositing passes -> Transform passes -> Add Element (+);
- Go inside TransformPass and see the missing Material you want to create: click on None -> Create New Asset -> Material;
- Go to the created Material -> tab Details -> Material -> Material Domain -> Post Process;
- RMB in Material Graph -> TextureSampleParameter2D -> give it a name exactly like MediaPlate; 5.Duplicate the previous node and give it exactly the same name as the CG Layer;
- RMB in Material Graph -> Over -> connect MediaPlate RGBA texture output to input A of the Over node, and CG Layer RGBA texture output to input B;
- Connect the RGBA output of the Over node to the Emissive Color of the Material Graph node:
- Check Compositing: RMB on Compositing Element (see point 1.4) -> Preview.
- Install the Antilatency SDK in the project;
- Follow steps 1 and 5 of the instructions (steps 2-4 are unnecessary);
- Go to AntilatencySDK Content ⇾ Blueprints ⇾ Samples ⇾ Pawns and transfer BP_AltSimplePawn to the scene (remember to make sure Location and Rotation are in zero positions);
- Attach the child object CineCameraActor (item 1.2) to BP_AltSimplePawn;
- Check tracking: Play -> F8 -> click on CineCameraActor in Outliner -> in the window the camera should move respectively with the tracker.
- Set the Socket on the camera so that the Environment is clearly visible to the tracker when shooting;
- Measure the distance from the camera's POV (center of the matrix) to the origin of the tracker's coordinates, and the tracker's rotation relative to the camera;
- Record the measurements in the Antilatency Service: in the Placements tab create a new Placement and record the data; the origin of the coordinates (the point between the eyes of the head model) will correspond to the camera's POV.
- Save the created Placement and set it "Set as default".
Now we can see the result of compositing with camera tracking, for example, in Editor: tab Composure Compositing -> Compositing Element (point 2.4) -> Outputs -> Outputs -> Add Element (+) -> OutputPass -> Player Viewport Compositing Output. The result of compositing will be output to the Editor window; you can also output the compositing to a separate window or to the Sequencer.