/content/guides/simstad/simstad.png

Layer

Contributors

mange61
guser40

Funding

formas
smartbuilt

Layer

The Layer method controls which data layers Unreal displays and in what order they are composited. Each layer provides a visual element such as an image, color, movie, or live stream. Layers are drawn from bottom to top in the order they appear in the request.

A layer request consists of a list of layers, each of which must be one of the supported layer types:

All layer types support optional opacity, lighting control, and cropping (see Cropping).

Layer sets are sent using a LayerRequest. Unreal replies per layer with a LayerResponse.

LayerRequest

Defines the list of layers to display, or updates properties of layers already shown.

nametyperequireddescription
typestring"LayerRequest"
flushbooleanIf true, the current layer stack is cleared and fully replaced. If false, only provided parameters are updated—useful for smooth cropping or opacity animation.
layersarrayOrdered list of layers. Must be of type: Image, Flow, Movie, Color, Base64, NDI.

Example request:

{
  "type": "LayerRequest",
  "flush": true,
  "layers": [
    {
      "type": "image",
      "id": "1_parks",
      "raster": "Parks",
    },
    {
      "type": "flow",
      "id": "2_river",
      "raster": "River",
      "flow": {
        "texture": "Water",
        "scale": 200,
        "speed": 0.05,
      },
    },
    {
      "type": "image",
      "id": "3_citylights",
      "raster": "Citylights",
      "opacity": 0.5,
      "emission": 10,
    },
  ],
}

LayerResponse

Unreal sends a response for each processed layer.

nametypedescription
typestring"LayerResponse"
idstringThe layer's identifier.
errorstringOptional error message (e.g., missing file).

Example response:

{
  "type": "LayerResponse",
  "id": "Basemap/City",
  "error": ""
}

Image Layer

The Image layer displays a standard raster image (typically PNG or similar). It is the most common layer type and serves as the foundation for basemaps, overlays, and static visual information.

Image layers support opacity, lighting interaction, and optional cropping.

Properties

An Image layer includes all base layer properties plus its own required fields.

nametyperequireddefaultdescription
typestring-"image"
idstring-Unique identifier used to update this layer
rasterstring-Path to the image file, e.g. "Folder/LayerName"
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example (simple image):

{
  "type": "image",
  "id": "my_image"
  "raster": "Folder/Image"
}

Example (with extra parameters):

{
  "type": "image",
  "id": "1_heatmap",
  "raster": "Layers/Heatmap",
  "opacity": 0.6,
  "emission": 2,
  "crop": {
    "type": "slice",
    "slice": {
      "min_u": 0.1,
      "max_u": 0.6,
      "min_v": 0.2,
      "max_v": 0.8
    }
  }
}

Flow Layer

The Flow layer represents a static image where RGB channels encode movement, used to animate a texture across the layer (e.g., water currents or vector fields). Flow layers are typically paired with a texture to create motion effects and support opacity, lighting interaction, and optional cropping.

Properties

A Flow layer includes all base layer properties plus its own specific fields.

nametyperequireddefaultdescription
typestring-"flow"
idstring-Unique identifier used to update this layer
rasterstring-Path to the flow field image, e.g., "Folder/FlowName"
flow.texturestring-Filename of the texture to animate over the flow field (e.g., "Flow/Noise")
flow.scalenumber200Scale of the animated texture
flow.speednumber0.05Speed at which the texture animates across the flow
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example:

{
  "type": "flow",
  "id": "my_river",
  "raster": "Flow/River",
  "flow": {
    "texture": "Flow/Noise",
    "scale": 300,
    "speed": 0.08
  }
}

Movie Layer

The Movie layer displays a video file, typically MP4, as a visual element on the map.

Properties

A Movie layer includes all base layer properties plus its own specific fields.

nametyperequireddefaultdescription
typestring-"movie"
idstring-Unique identifier used to update this layer
rasterstring-Path to the movie file, e.g., "Folder/MovieName"
movie.speednumber1Playback speed
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example:

{
  "type": "movie",
  "id": "my_movie",
  "raster": "Movies/IdleMovie",
  "movie": {
    "speed": 1.0
  }
}

Color Layer

The Color layer displays a solid color overlay on the map. Color layers are useful for tinting, highlighting areas, or providing a visual background.

Properties

A Color layer includes all base layer properties plus its own specific fields.

nametyperequireddefaultdescription
typestring-"color"
idstring-Unique identifier used to update this layer
colorstring-Hex color code, e.g., "#FF0000"
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example:

{
  "type": "color",
  "id": "green",
  "color": "#00FF00",
  "opacity": 0.5
}

Base64 Layer

The Base64 layer displays an image encoded as a Base64 string. This is useful for dynamically generated content, drawings, or overlays that are created at runtime.

Properties

A Base64 layer includes all base layer properties plus its own specific fields.

nametyperequireddefaultdescription
typestring-"base64"
idstring-Unique identifier used to update this layer
base64string-Base64-encoded image data
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example:

{
  "type": "base64",
  "id": "my_image",
  "base64": "iVBORw0KGgoAAAANSUhEUgAA..."
}

NDI Layer

The NDI layer displays a live rasterized video stream from an NDI source. NDI streams act as plugins for this exhibition: a separate application running on the computer can generate live visualizations (e.g., public transportation data), which are rasterized via NDI so Unreal can display them in real-time.

For examples of setting up NDI streams with TrafikLab, see the TrafikLab setup guide.

Properties

An NDI layer includes all base layer properties plus its own specific fields.

nametyperequireddefaultdescription
typestring-"ndi"
idstring-Unique identifier used to update this layer
ndi.machinestring-Name of the host machine. Defaults to the local machine
ndi.streamstring-NDI stream key, e.g., "TrafficOverlayNDI"
opacitynumber1Opacity (0–1)
emissionnumber0If 0, affected by lighting; if 1–, emit light
cropSliceCrop | CircleCrop-Optional cropping method

Example:

{
  "type": "ndi",
  "id": "TrafficData",
  "ndi": {
    "stream": "TrafficOverlayNDI"
  }
}

Cropping

Cropping allows a layer to be restricted to a specific region of the map. Two types of cropping are supported:

  • SliceCrop — crops the layer to a rectangular area
  • CircleCrop — crops the layer to a circular region

Both cropping methods can be applied to any layer type via the crop property.

SliceCrop

SliceCrop crops the layer into a rectangular region using normalized UV coordinates.

nametyperequireddefaultdescription
typestring-"slice"
slice.min_unumber0Minimum U coordinate (0–1)
slice.max_unumber1Maximum U coordinate (0–1)
slice.min_vnumber0Minimum V coordinate (0–1)
slice.max_vnumber1Maximum V coordinate (0–1)

Example:

{
  "type": "slice",
  "slice": {
    "min_u": 0.1,
    "max_u": 0.8,
    "min_v": 0.2,
    "max_v": 0.7
  }
}

CircleCrop

CircleCrop crops the layer into a circular region.

nametyperequireddefaultdescription
typestring-"circle"
circle.unumber0.5Center U coordinate (0–1)
circle.vnumber0.5Center V coordinate (0–1)
circle.radiusnumber0.5Radius of the circle (0–1, where 1 = full map size)

Example:

{
  "type": "circle",
  "circle": {
    "u": 0.5,
    "v": 0.5,
    "radius": 0.25
  }
}