1. Introduction

Viz Engine is a real-time graphics rendering engine used in broadcast television. Every control application — whether it's Viz Trio preparing a lower third, Viz Pilot filling a template, a newsroom automation system, or your own custom tool — communicates with Viz Engine by sending text commands over a TCP socket.

This guide teaches you how to connect to Viz Engine, how commands are structured, and how to send and receive them. By the end, you'll be able to load scenes, modify text and graphics, trigger animations, and monitor the engine — all from code.

What You Can Do via Commands

  • Load and unload scenes on the renderer

  • Modify text, images, materials, and transformations in a live scene

  • Start, stop, and control animations (directors)

  • Read and write shared memory for real-time data injection

  • Take snapshots of the rendered output

  • Monitor engine performance (FPS, GPU memory, render time)

  • Manage the engine lifecycle (restart, shutdown, configuration)

2. Connecting to Viz Engine

The TCP Socket

Viz Engine listens for commands on a TCP socket. The connection parameters are:

Parameter

Value

Protocol

Raw TCP (no TLS, no HTTP framing)

Default Port

6100

Encoding

Plain ASCII text

Message Separator / Terminator

Null character (\0)

Max Connections

255 simultaneous (configurable)

How to Connect

Open a TCP socket to the engine's hostname or IP address on port 6100. Once connected, you can immediately start sending commands.

Command Syntax

CMD_ID BLANK_CHARACTER CMD NULL_BYTE[…]

The CMD_ID is used to identify the command and uses the same ID for the answer, except when the CMD_ID is -1, where no answer is sent back. It is a string and may be composed of a short text and some number, or -1 to instruct the engine not to send an answer.

General Example

MYID123 MAIN VERSION\0

will send back this answer

MYID123 Version: 5.5.2.40039

Python example:

import socket
# Connect to Viz Engine
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("viz-engine-host", 6100))
# Send a command (must end with \0)
sock.sendall(b"MYID123 MAIN VERSION\0")
 
# Read the response (also newline-terminated)
response = sock.recv(4096).decode("ascii").strip()
print(f"Engine version: {response}")
sock.close()

PowerShell example:

first, we create a small helper function to read until we receive the null byte:

function Read-UntilNul {
param(
[Parameter(Mandatory)]
[System.IO.Stream]$Stream,
 
[System.Text.Encoding]$Encoding = [System.Text.Encoding]::UTF8,
 
[int]$MaxBytes = 1048576
)
 
$bytes = New-Object System.Collections.Generic.List[byte]
 
while ($true) {
$b = $Stream.ReadByte()
 
if ($b -lt 0) {
throw "Connection closed before NUL terminator was received."
}
 
if ($b -eq 0) {
break
}
 
$bytes.Add([byte]$b)
 
if ($bytes.Count -ge $MaxBytes) {
throw "Message exceeded MaxBytes ($MaxBytes) without NUL terminator."
}
}
 
return $Encoding.GetString($bytes.ToArray())
}

Then we can use the following snippet

$client = New-Object System.Net.Sockets.TcpClient("localhost", 6100)
$stream = $client.GetStream()
$utf8NoBom = [System.Text.UTF8Encoding]::new($false)
$writer = New-Object System.IO.StreamWriter($stream, $utf8NoBom, 1024, $true)
$reader = New-Object System.IO.StreamReader($stream, [System.Text.Encoding]::UTF8, $false, 1024, $true )
 
# Send command
$writer.Write("MYID789 MAIN VERSION" + [char]0)
$writer.Flush()
 
$response = Read-UntilNul -Stream $stream -Encoding ([System.Text.Encoding]::UTF8)
Write-Host "Engine version: $response"
 
$writer.Dispose()
$stream.Dispose()
$client.Close()
$client.Dispose()

This would produce e.g

Engine version: MYID789 Version: 5.5.2.40039

C# example:

using System;
using System.Net.Sockets;
using System.Text;
 
class Program
{
static void Main(string[] args)
{
string host = args.Length > 0 ? args[0] : "viz-engine-host";
int port = 6100;
Console.WriteLine($"Connecting to {host}:{port}...");
try
{
using var client = new TcpClient(host, port);
client.ReceiveTimeout = 5000;
var stream = client.GetStream();
Console.WriteLine("Connected. Sending command...");
// Send command immediately — VizEngine expects null-terminated commands
byte[] cmd = Encoding.ASCII.GetBytes("MYID456 MAIN VERSION\0");
stream.Write(cmd, 0, cmd.Length);
// Read all responses until nothing more arrives
while (true)
{
string response = ReadNullTerminated(stream);
if (response.Length == 0) break;
Console.WriteLine($"Response: {response}");
// Stop after our tagged response
if (response.StartsWith("MYID456")) break;
}
}
catch (SocketException ex)
{
Console.WriteLine($"Connection failed: {ex.Message}");
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
 
static string ReadNullTerminated(NetworkStream stream)
{
var buffer = new System.Collections.Generic.List<byte>(256);
int b;
while ((b = stream.ReadByte()) > 0) // 0 = null terminator, -1 = closed
buffer.Add((byte)b);
return Encoding.ASCII.GetString(buffer.ToArray());
}
}

Important Connection Rules

  • Always terminate commands with a null byte (\0). Without it, the engine buffers the input and never processes the command.

  • Keep connections open for the duration of your session. Opening and closing connections for every command adds latency and wastes connection slots.

  • Close connections when done. The engine has a maximum of 255 simultaneous connections. Leaked connections eventually block all clients.

  • One response per command. Every command you send produces exactly one response line. Read one line after each send.

3. How Commands Are Structured

The Command Format

Every command follows this pattern: OBJECT*PATH*PROPERTY VERB [arguments]

There are three parts separated by spaces:

Part

What it does

Example

Object Path

Identifies what you're targeting

MAIN_SCENE*TREE*$Title*GEOM*TEXT

Verb

Identifies what operation to perform

SET, GET, INVOKE

Arguments

The data for the operation (optional)

"Hello World"

The Asterisk Delimiter

The object path uses asterisks (*) as delimiters to navigate through a hierarchy of objects. Think of it like a file path, but with * instead of /.

MAIN_SCENE * TREE * $Title * TRANSFORMATION * POSITION * X
│ │ │ │ │ │
│ │ │ │ │ └─ The X coordinate
│ │ │ │ └─ Position property
│ │ │ └─ Transformation of the container
│ │ └─ Container named "Title" ($ = by name)
│ └─ The scene tree (hierarchy of containers)
└─ The currently loaded main scene

Always Use Asterisks: The path delimiter is always *. Do not use dots (.) or slashes (/) — these will not work and will return an error

Common Verbs

Verb

Purpose

Example

GET

Read the current value of a property

*POSITION*X GET

SET

Write a new value to a property

*POSITION*X SET 200.0

INVOKE

Execute an action or trigger a function

*FUNCTION*Toggle*switch INVOKE

SET_OBJECT

Load or assign a scene/object

RENDERER SET_OBJECT SCENE*path

START

Start an animation

RENDERER*STAGE START DEFAULT

CONTINUE

Continue a paused animation

*DIRECTOR*name CONTINUE

SHOW

Run a director to its end

*DIRECTOR*name SHOW

ADD

Add a child element

MAIN_SCENE*TREE ADD TOP

DELETE

Remove an element

MAIN_SCENE*TREE*$old DELETE

Top-Level Objects

Commands always start with one of these top-level objects:

Object

What it represents

RENDERER

The active renderer — load scenes, take snapshots, control layers

MAIN_SCENE

The currently loaded scene — its tree, stage, shared memory

SCENE

The scene pool — load, check, save, close scenes in memory

MAIN

Engine-level controls — version, restart, shutdown

VIZ_COMMUNICATION

Distributed shared memory (cross-engine data)

GLOBAL

System-wide shared memory (local to this engine)

CONFIGURATION

Runtime configuration read/write

DATABASE

Graphic Hub connection management

4. Sending Commands and Reading Responses

The Request-Response Cycle

Communication is synchronous — you send one command, and the engine sends back one response. The response is always a single line of text terminated by a newline.


You send: VERSION\n
Engine replies: 5.5.0.12345\n

You send: MAIN_SCENE*TREE*$Title*GEOM*TEXT GET\n
Engine replies: Breaking News\n

You send: MAIN_SCENE*TREE*$Title*GEOM*TEXT SET "Hello World"\n
Engine replies: \n (empty = success, no value to return)

Response Types

Situation

What the response looks like

GET with a value

The value as a text string, e.g. "150.0"

SET success

Empty response (just a newline)

Error

A string containing the word ERROR, e.g. "ERROR: Unknown container"

Error Detection

Viz Engine does not return numeric error codes or JSON. To detect an error, check whether the response contains the substring `ERROR`:

def send_command(sock, command):
sock.sendall((command + "\n").encode("ascii"))
response = sock.recv(4096).decode("ascii").strip()
if "ERROR" in response:
raise RuntimeError(f"Viz Engine error: {response}")
return response

Liveness Check

To verify the engine is alive and accepting commands, send: IS_RENDERER_READY

If you receive a 1, the engine is responsive. If the call times out, the engine is unresponsive or unreachable.

5. Addressing Containers in the Scene Tree

A Viz Engine scene is a tree of containers. Each container can hold geometry, text, images, plugins, and transformations. To target a container in a command, you navigate the tree using the MAIN_SCENE*TREE prefix.

Three Ways to Address a Container

Prefix

Method

Example

When to use

$

By name

MAIN_SCENE*TREE*$Title

Most common — uses the container's name

#

By object ID

MAIN_SCENE*TREE*#1234

When you know the numeric ID

/

By index (1-based)

MAIN_SCENE*TREE*/1/2/3

When addressing by tree position

Navigating Nested Containers

Containers can be nested. Chain the names to reach deep into the tree:
MAIN_SCENE*TREE*$root*$child*$grandchild

This addresses the container named "grandchild" which is a child of "child", which is a child of "root".

Accessing Properties on a Container

Once you've addressed a container, append the property you want to access:

MAIN_SCENE*TREE*$Title*TRANSFORMATION*POSITION*X GET
MAIN_SCENE*TREE*$Title*GEOM*TEXT SET "Breaking News"
MAIN_SCENE*TREE*$Title*MATERIAL*DIFFUSE_COLOR SET 1.0 0.0 0.0 1.0
MAIN_SCENE*TREE*$Logo*ACTIVE SET 1

Key Container Properties

Property Path

What it controls

*TRANSFORMATION*POSITION*X/Y/Z

3D position

*TRANSFORMATION*ROTATION*X/Y/Z

3D rotation (degrees)

*TRANSFORMATION*SCALING

Scale (can set X Y Z as a triple)

*GEOM*TEXT

Text content (on text geometry)

*MATERIAL*DIFFUSE_COLOR

Material color (R G B A, each 0.0–1.0) (Classic Pipeline)

*MATERIAL*ALPHA

Material transparency (0.0–1.0) (Classic Pipeline)

*ACTIVE

Visibility (1 = visible, 0 = hidden)

*TEXTURE*IMAGE

Assigned texture/image (Classic Pipeline)

*FUNCTION*PluginName*param

Plugin parameter

*SCRIPT*INSTANCE*VarName

VizScript variable

6. Getting Started — Your First Commands

Here is a step-by-step sequence to get you started. Each command is shown with what it does and what response to expect.

Step 1: Check That the Engine Is Ready

VERSION
→ "5.5.0.12345"
IS_RENDERER_READY
→ "1" (1 = ready, 0 = not ready)

Always Check Readiness: IS_RENDERER_READY should return "1" before you send any scene or rendering commands. After engine startup or a scene load, the renderer may need a moment to initialize.

Step 2: Load a Scene

RENDERER SET_OBJECT SCENE*Scenes/MyLowerThird
→ "" (empty = success)

This loads the scene located at Scenes/MyLowerThird in the Graphic Hub database and puts it "on air" on the main renderer layer.

Step 3: Modify Scene Content

MAIN_SCENE*TREE*$Headline*GEOM*TEXT SET "Breaking News"
→ ""
MAIN_SCENE*TREE*$Subline*GEOM*TEXT SET "Live from the studio"
→ ""

Step 4: Trigger an Animation

RENDERER*STAGE*DIRECTOR*Main START
→ ""

This starts the director named "Main" in the scene's stage, which typically animates the lower third in.

Step 5: Read Back Values

MAIN_SCENE*TREE*$Headline*GEOM*TEXT GET
→ "Breaking News"
MAIN_SCENE*TREE*$Headline*TRANSFORMATION*POSITION*X GET
→ "0.0"
RENDERER*STAGE*DIRECTOR*Main*STATE GET
→ "STOPPED" (animation finished)

Step 6: Animate Out and Unload

RENDERER*STAGE*DIRECTOR*Main CONTINUE REVERSE
→ ""
RENDERER SET_OBJECT
→ "" (empty argument = unload current scene)

7. Practical Examples

Example 1: Complete Lower Third Workflow

This is the most common broadcast workflow — load a template, fill it with data, animate it in, update it, then animate it out.

-- 1. Load the template
RENDERER SET_OBJECT SCENE*Templates/LowerThird
-- 2. Fill text fields
MAIN_SCENE*TREE*$Name*FUNCTION*ControlText*input SET "John Smith"
MAIN_SCENE*TREE*$Title*FUNCTION*ControlText*input SET "Senior Correspondent"
-- 3. Animate in
RENDERER*STAGE*DIRECTOR*Main START
-- 4. (Wait for on-air duration...)
-- 5. Update text while on air
MAIN_SCENE*TREE*$Title*FUNCTION*ControlText*input SET "Live from London"
-- 6. Animate out
RENDERER*STAGE*DIRECTOR*Main SHOW

Example 2: Reading and Modifying Transformations

-- Read current position
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*POSITION*X GET
→ "100.0"
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*POSITION*Y GET
→ "50.0"
-- Move the logo
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*POSITION*X SET -200.0
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*POSITION*Y SET 300.0
-- Rotate 45 degrees around Z axis
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*ROTATION*Z SET 45.0
-- Scale to double size
MAIN_SCENE*TREE*$Logo*TRANSFORMATION*SCALING SET 2.0 2.0 2.0

Example 3: Show/Hide Containers

-- Hide a container (and all its children)
MAIN_SCENE*TREE*$SponsorLogo*ACTIVE SET 0
 
-- Show it again
MAIN_SCENE*TREE*$SponsorLogo*ACTIVE SET 1

Example 4: Changing Colors

-- Set material to red (R=1, G=0, B=0, A=1)
MAIN_SCENE*TREE*$Bar*MATERIAL*DIFFUSE_COLOR SET 1.0 0.0 0.0 1.0
 
-- Make it semi-transparent
MAIN_SCENE*TREE*$Bar*MATERIAL*ALPHA SET 0.5

Example 5: Working with Multiple Directors

Scenes often have multiple directors for different animation segments:

-- Check director state
RENDERER*STAGE*DIRECTOR*InAnimation*STATE GET
→ "STOPPED"
 
-- Start the "in" animation
RENDERER*STAGE*DIRECTOR*InAnimation START
 
-- Later, start the "out" animation
RENDERER*STAGE*DIRECTOR*OutAnimation START
 
-- Or use SHOW to jump to the end instantly
RENDERER*STAGE*DIRECTOR*InAnimation SHOW

Example 6: Taking Snapshots

-- Capture the current render to a file
RENDERER SNAPSHOT "C:\Snapshots\frame001.png" RGBA 1920 1080

Example 7: Monitoring Engine Performance

RENDERER*CURRENT_FPS GET
→ "50.0"
 
RENDERER*RENDER_TIME GET
→ "4.2" (milliseconds per frame)
 
MAIN*GPU_MEMORY GET
→ "2048" (MB)
 
MAIN*RAM_USAGE GET
→ "4096" (MB)

Example 8: Shared Memory (Real-Time Data Injection)

Shared memory lets external systems inject data that running scenes can pick up automatically:

-- Set a shared memory value (via command interface)
VIZ_COMMUNICATION*MAP SET_ELEMENT "score_home" "3"
VIZ_COMMUNICATION*MAP SET_ELEMENT "score_away" "1"
 
-- Read back
VIZ_COMMUNICATION*MAP GET_ELEMENT "score_home"
→ "3"
 
-- Clear all shared memory
VIZ_COMMUNICATION*MAP CLEAR

High-Volume Data: For high-frequency data updates (for example, live sports telemetry), use the dedicated SHM TCP port (3001) or SHM UDP port (3000) instead of the command interface. Commands sent via port 6100 block the render queue and can cause frame drops.

Example 9: Batch Mode (Multiple Commands, One Response)

When you need to execute several commands atomically:

MYID BATCH START
-1 MAIN_SCENE*TREE*$Score_Home*GEOM*TEXT SET "3"
-1 MAIN_SCENE*TREE*$Score_Away*GEOM*TEXT SET "1"
-1 MAIN_SCENE*TREE*$Timer*GEOM*TEXT SET "87:32"
-1 BATCH STOP
→ "" (single response for the entire batch with MYID as answer ID)

All commands inside BATCH BEGIN / BATCH END execute sequentially in the engine, but you only receive one response at the end. This reduces network round-trips and ensures all updates appear in the same frame. It is important to send the consecutive lines after BATCH START with an ID of -1.

Example 10: Flicker-Free Multi-Command Updates

To update multiple properties without the audience seeing intermediate states:

-- Pause rendering updates
RENDERER*UPDATE SET 0
 
-- Make all your changes
MAIN_SCENE*TREE*$Name*GEOM*TEXT SET "Jane Doe"
MAIN_SCENE*TREE*$Title*GEOM*TEXT SET "Weather Presenter"
MAIN_SCENE*TREE*$Photo*TEXTURE*IMAGE SET IMAGE*Photos/jane
 
-- Resume rendering — all changes appear in one frame
RENDERER*UPDATE SET 1

8. Working with Multiple Engine Instances

When multiple Viz Engine instances run on the same machine, each instance offsets its ports:
Port = Base Port + (Instance Number - 1)

Instance

Command Port

REST Port

Start Command

1 (default)

6100

61000

viz.exe -u1

2

6101

61001

viz.exe -u2

3

6102

61002

viz.exe -u3

To target instance 3, connect to port 6102 instead of 6100.

9. Error Handling Best Practices

Always Check for ERROR in Responses

response = send_command("MAIN_SCENE*TREE*$NonExistent*POSITION GET")
# response might be: "ERROR: Unknown container"

The Engine Will Not Crash on Bad Input

Viz Engine is designed to handle invalid commands gracefully:

What you send

What happens

Wrong argument type

Silently ignored or returns ERROR

Missing required arguments

Returns ERROR message

Extra arguments

Extra arguments are ignored

Invalid object path

Returns "Unknown container" error

Out-of-range number

Clamped to valid range

Empty command

Returns empty or ERROR

Always Gate on Renderer Readiness

After engine startup or loading a scene, always wait for the renderer to be ready:

while True:
response = send_command("MAIN IS_RENDERER_READY")
if response == "1":
break
time.sleep(0.1)

Clean Up After Yourself

-- Close the scene from memory
SCENE*Scenes/MyLowerThird CLOSE
-- Release GPU resources (textures, geometry)
POOLS CLEANUP

Without POOLS CLEANUP, textures and geometry from unloaded scenes remain in GPU memory.

10. Quick Reference — Most Useful Commands

Engine Status

Command

Returns

MAIN VERSION

Engine version string

MAIN IS_RENDERER_READY

"1" if ready, "0" if not

MAIN IS_ON_AIR GET

"1" if on air

RENDERER*CURRENT_FPS GET

Current FPS

Scene Loading

Command

What it does

RENDERER SET_OBJECT SCENE*path

Load scene on air

RENDERER SET_OBJECT

Unload current scene

SCENE*path EXIST

Check if scene exists in database

SCENE*path LOAD

Pre-load into memory (not on air)

SCENE*path CLOSE

Release from memory

Scene Content

Command

What it does

MAIN_SCENE*TREE*$name*GEOM*TEXT SET "text"

Set text content

MAIN_SCENE*TREE*$name*GEOM*TEXT GET

Read text content

MAIN_SCENE*TREE*$name*ACTIVE SET 0/1

Hide/show container

MAIN_SCENE*TREE*$name*TRANSFORMATION*POSITION*X SET val

Set position

MAIN_SCENE*TREE*$name*MATERIAL*DIFFUSE_COLOR SET R G B A

Set color

Animations

Command

What it does

RENDERER*STAGE START DEFAULT

Start default director

RENDERER*STAGE*DIRECTOR*name START

Start named director

RENDERER*STAGE*DIRECTOR*name SHOW

Jump to director end

RENDERER*STAGE*DIRECTOR*name CONTINUE

Resume paused director

RENDERER*STAGE*DIRECTOR*name*STATE GET

Get state: RUNNING, STOPPED, PAUSED

Plugin Parameters

Command

What it does

*FUNCTION*ControlText*input SET "text"

Set ControlText value

*FUNCTION*ControlImage*source SET "IMAGE*path"

Set ControlImage

*FUNCTION*Toggle*switch INVOKE

Toggle visibility

*FUNCTION*PluginName*param GET

Read any plugin param

Shared Memory

Command

What it does

VIZ_COMMUNICATION*MAP SET_ELEMENT "key" "val"

Set distributed SHM

VIZ_COMMUNICATION*MAP GET_ELEMENT "key"

Read distributed SHM

MAIN_SCENE*MAP SET_ELEMENT "key" "val"

Set scene-local SHM

GLOBAL*MAP SET_ELEMENT "key" "val"

Set system-wide SHM

Cleanup

Command

What it does

POOLS CLEANUP

Release all unused resources

POOLS*TEXTURE CLEANUP

Release unused textures only

11. Common Mistakes to Avoid

Mistake

Correct Approach

Using dots as delimiter: MAIN_SCENE.TREE.$Title

Use asterisks: MAIN_SCENE*TREE*$Title

Forgetting the $ prefix: MAIN_SCENE*TREE*Title

Always prefix names: MAIN_SCENE*TREE*$Title

Forgetting the newline at end of command

Every command must end with \n

Connecting to port 6100 for instance 3

Use port 6102 (6100 + 3 - 1)

Not closing TCP connections

Always close — 255 max; leaks block everyone

Expecting JSON error responses

Check for ERROR substring in plain text

Not calling POOLS CLEANUP after unloading scenes

GPU memory accumulates without cleanup

Not checking IS_RENDERER_READY

Always wait for readiness after startup/load

Sending high-volume data via port 6100

Use SHM ports (3001 TCP / 3000 UDP) instead

12. Further Reading

  • Commands.xml self-documentation: Run viz.exe --doc to generate a complete XML file of every available command with argument types and ranges. Output: C:\ProgramData\vizrt\VizEngine\commands.xml

  • REST API: Viz Engine also exposes an HTTP API on port 61000 for stateless control.

  • WebSocket: A WebSocket interface is available on port 6900 for bidirectional web-based control.

  • Shared Memory ports: For high-frequency data, connect to TCP port 3001 (reliable) or UDP port 3000 (fast, unreliable) using the pipe-delimited format: key|value\0