---
title: "Export and use an ST map"
canonical: "https://help.vicon.com/space/ShogunLive121/1253212205/Export%20and%20use%20an%20ST%20map"
format: markdown
---
You can export lens maps (ST map as a 32-bit EXR file) for calibrated video cameras from Shogun Live as distortion maps. You can then import your calibrated video camera/lens into a game engine such as Unreal, or into your compositing software.

The ST map contains information about the distortion of the lens and has four channels: R, G, B, and A:

- B and A store the location of the pixels in a pinhole/undistorted image, ranging from 0 to 1 in proportion to the width and height of the image. These two channels are used to distort the CG image to match the SDI camera output.
- R and G store the location of the pixels in a raw/distorted image (currently unused).

To use a Shogun Live ST map, the first step is to export it from Shogun Live.

> Macro (toc)

 See also the Vicon video [How do I set up a Vicon-driven cine camera in Unreal Engine with lens distortion?](https://www.youtube.com/watch?v=rKbWF-wrURc)

## Export an ST map

1. Ensure the video camera(s) have been calibrated, then from the **File** menu, select **Export Video Camera STMap**.
2. In the **Save Camera Distortion Map** dialog box, locate a folder to which to export the ST maps.
  ST maps for all video cameras are exported to this folder.
  Each filename has the format: <Camera DeviceID>_<focal length in pixels- integer part>_<focal length in pixels - decimal part>_<date time stamp>.exr.
  For example, `vi101_1064_535479_20210623165749.exr`.

The ST map contains information about the distortion of the lens and has four channels: R,G,B,A:

- B and A store the location of the pixels in a pinhole/undistorted image, ranging from 0 to 1 in proportion to the width and height of the image. These channels are used to distort the CG image to match the SDI camera output.
- R and G store the location of the pixels in a raw/distorted image (currently unused).

This is an example of an ST map:

> ![image](media://3597814b-36de-4604-a32f-ddb044a1ff68)

You can use the exported ST maps in a number of ways, including in game engines such as Unreal Engine, or in compositing software. The following example shows how to use the ST map to set up a live composure in Unreal Engine, using the Virtual Production template project.

## Set up a live composure in Unreal Engine

1. In Unreal Engine, to import the ST map into the content, right-click to create a new subfolder in the content folder.
2. Browse to the new folder, right-click and select** Import to /Game /Distortion Maps** to import the ST map that you exported from Shogun Live.
3. In the **Import** dialog box, locate and select the ST map file.
  The ST map is displayed in the Content Browser.
4. In the Content Browser, navigate to **Content** > **VprodProject** > **Maps** and double-click the **LiveComp** map.
5. In the Content Browser, navigate to **Content** > **VprodProject** > **Materials** and double-click the **M_Live_Comp** material.
  The default graph for the material looks like this:
6. Expand the note and right-click to add a new TextureSampleParameter2D node to the graph:
7. Give the node an appropriate name:
8. With the node selected, in the **Details** panel, find the **Material Expression Texture Base**.
9. Click on the default texture to browse for the ST map and start typing the name of the file.
  The ST map image is displayed in both the **Details** panel and the node in the graph.
10. Drag from the UV's pin on the FG (foreground) node:
11. Add a new **AppendVector** node:
12. To 'undistort' the foreground layer in this example, connect in this way:
13. Save the asset: