This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Video Wall Output with Wall Plugin

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.

The Wall application is designed for rendering the Unigine world into the configurable number of windows. They can fit any display configuration and can be rendered both in the windowed and the full screen mode.

Notice
This plugin cannot be used in a Qt-based application.

The following display configurations are supported out of the box (only if monitors have identical resolutions):

  • 1 monitor (1×1)
  • 2 monitors in a column (1×2)
  • 2 monitors in a row (2×1)
  • 3 monitors in a row (3×1)
  • 4 monitors in a row (4×1)
  • 5 monitors in a row (5×1)
  • 4 monitors (2×2)
  • 6 monitors (3×2)
Notice
The maximum supported number of monitors is 64 (8x8).

See Also#

Launching Wall#

In case you use one of these configurations, you only need to specify a plugin library (lib/Wall_*) with the usually required start-up arguments (such as rendering API, window size, etc.) in the launcher.

Shell commands
main_x64 -extern_plugin Wall
  • UNIGINE engine automatically detects the number of available monitors and if they fit any of the supported configurations, it automatically creates the appropriate number of windows with UNIGINE viewports.
  • You can use 64-bit debug or release versions of the library. (The engine automatically loads the appropriate version of the library depending on the specified main application.)
Notice

It is not possible to use Wall with:

Four monitors in 2x2 configuration
2×2 configuration
Four monitors in 4x1 configuration
4×1 configuration

How to Set the Number of Windows#

If you want to set the number of Wall windows manually and use another supported configuration, you need to specify two specific start-up arguments in addition to the usually required ones:

  • width — sets the number of monitors in a horizontal row
  • height — sets the number of rows, i.e. how many monitors there are in a vertical column

For example, if you want to launch Wall in 6 windows (2 rows of monitors with 3 monitors in each row):

Shell commands
main_x64 -width 3 -height 2 -extern_plugin Wall

Do not forget to specify other required start-up arguments as well!

Customizing Wall#

Wall can be easily customized to support the desired configuration of monitors. You can create Wall that renders UNIGINE viewports into the arbitrary number of windows with custom viewing frustums (symmetric or asymmetric ones).

Notice
To prevent modifying camera settings from system script, specify the -extern_define "PROJECTION_USER" definition in the project's launcher.

Wall Cameras#

Wall have one primary viewport, while all others are rendered as auxiliary ones. By default, the primary display is the UNIGINE engine viewport used for one-monitor configuration. It uses matrices of the Player used by the engine to view the scene. Other displays are arbitrary cameras with any perspective and facing whatever direction needed. Each display has its own model-view and projection matrices. Both the primary monitor and auxiliary ones can be enabled or disabled, if necessary.

  • The primary display can be set to any monitor (for supported configurations it is already set).
  • Each display has its own model-view and projection matrices.
  • By default, only a primary one has an interface (render system GUI, editor widgets, wireframe, or the profiler). However, separate GUIs can be drawn on all monitors (see the sample for more details).
  • All viewports have their own Viewport and Reflection mask to selectively render nodes and reflections from them.

Default Configurations#

For default configurations, the primary display is set to the following monitor:

  • For 1×1 configuration, the 1st (and only) display.
  • For 2×1 configuration, the 1st display.
  • For 3×1 configuration, the 2nd display.
  • For 4×1 configuration, the 2nd display.
  • For 5×1 configuration, the 3rd display.
  • For 1×2 configuration, the 1st display in the column.
  • For 2×2 configuration, the 1st display in the 1st row.
  • For 3×2 configuration, the 2nd display in the 1st row.

How to Set Up Custom Cameras Configuration#

Rendering of Wall viewports is controlled by wall.h script (located in <UnigineSDK>/data/core/scripts/system).

To implement a custom camera configuration, comment wall.h out in the unigine.usc system script and wrap your custom code around with #ifdef HAS_WALL ... #endif in the render() function of the system script.

Notice
You can also directly modify the wall.h script.

There are two possible setups depending on how the primary monitor is rendered. It can be drawn by:

  • The default engine renderer (the same as when a usual one-window application is rendered).
  • The Wall renderer itself (which is safer if you are going to use asymmetric frustum for the primary monitor and modify its modelview matrix).
Notice
Only one of two renderers should be enabled at the same time.

The following example demonstrates how to create a 3×1 monitor configuration and choose the renderer for the primary monitor.

1. Using default engine renderer#

The first variant is to render the primary monitor by the default engine renderer.

  1. In case the created configuration is not supported by default, set the primary monitor via Unigine.Plugins.Wall.SetPrimary():

    Source code (C#)
    // The primary display is the 2nd one in a row and
    // it is positioned in the first line of monitors.
    Unigine.Plugins.Wall.SetPrimary(1, 0);
  2. Enable all auxiliary monitors via Unigine.Plugins.Wall.SetEnabled() (they are disabled by default). The primary one should be disabled, as it is drawn by the default engine renderer.

    Source code (C#)
    // Enable the 1st and the 3rd monitors in the first row.
    // The third argument of the function sets 'enabled' flag.
    Unigine.Plugins.Wall.SetEnabled(0, 0, 1);
    Unigine.Plugins.Wall.SetEnabled(2, 0, 1);
  3. Set projection and model-view matrices for auxiliary monitors's cameras.

    Source code (C#)
    // Settings for the 1st monitor
    Camera camera0 = Wall.GetPlugin().GetCamera(0, 0);
    camera0.Projection = projection_0;
    camera0.Modelview = modelview_0;
    
    // Settings for the 3rd monitor
    Camera camera2 = Wall.GetPlugin().GetCamera(2, 0);
    camera2.Projection = projection_2;
    camera2.Modelview = modelview_2;

2. Using Wall renderer#

Another variant is to render the primary monitor by the Wall renderer. This variant can be used, for example, if you want to set up symmetric frustums for all monitors.

  1. Disable rendering into the default UNIGINE viewport via Unigine.Render.SetEnabled():

    Source code (C#)
    Unigine.Render.SetEnabled(0);
  2. Enable all Wall monitors including the primary one. As a result, all three viewports will be rendered by Wall renderer itself:

    Source code (C#)
    // Enable all Wall monitors:
    Unigine.Plugins.Wall.SetEnabled(0, 0, 1);
    Unigine.Plugins.Wall.SetEnabled(1, 0, 1);
    Unigine.Plugins.Wall.SetEnabled(2, 0, 1);
  3. Set model-view and projection matrices for all three monitors' cameras.

    Source code (C#)
    // Settings for the 1st monitor
    Camera camera0 = Wall.GetPlugin().GetCamera(0, 0);
    camera0.Projection = projection_0;
    camera0.Modelview = modelview_0;
    
    // Settings for the 2nd (primary) monitor
    Camera camera1 = Wall.GetPlugin().GetCamera(1, 0);
    camera1.Projection = projection_1;
    camera1.Modelview = modelview_1;
    
    // Settings for the 3rd monitor
    Camera camera2 = Wall.GetPlugin().GetCamera(2, 0);
    camera2.Projection = projection_2;
    camera2.Modelview = modelview_2;
Last update: 2022-12-14
Build: ()