This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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 Optimization
Materials
Material Nodes Library
Art Samples
Tutorials

带AppWall插件的视频墙输出

警告
本文介绍的功能在 Community SDK 版本中不可用。
您应该升级到 Sim SDK版本才能使用它。

The AppWall application is designed for rendering the Unigine world into the configurable number of windows. The number of AppWall monitors is not limited. They can fit any display configuration and can be rendered both in the windowed and the full screen mode.AppWall应用程序旨在将Unigine世界渲染到可配置数量的窗口中。 AppWall监视器的数量不受限制。它们可以适合任何显示配置,并且可以在窗口模式和全屏模式下呈现。

注意
This plugin cannot be used in a Qt-based application.此插件不能在基于Qt的应用程序中使用。

The following display configurations are supported out of the box (only if monitors have identical resolutions):开箱即用地支持以下显示配置(仅当显示器具有相同的分辨率时):

  • 1 monitor (1×1)1个显示器(1×1)
  • 2 monitors in a column (1×2)一列中的2个监视器(1×2)
  • 2 monitors in a row (2×1)连续2个监视器(2×1)
  • 3 monitors in a row (3×1)连续3台显示器(3×1)
  • 4 monitors in a row (4×1)连续4个监视器(4×1)
  • 5 monitors in a row (5×1)连续5台显示器(5×1)
  • 4 monitors (2×2)4台(2×2)
  • 6 monitors (3×2)6台(3×2)
注意
The maximum supported number of monitors is 6.支持的最大监视器数量为6。

See Also也可以看看#

Launching AppWall启动AppWall#

In case you use one of these configurations, you only need to specify a plugin library (lib/AppWall_*) with the usually required start-up arguments (such as rendering API, window size, etc.) in the launcher.如果您使用这些配置之一,则只需指定具有通常要求的插件库(lib/AppWall_*启动参数(例如渲染API,窗口大小等)在启动器中。

命令行
main_x64 -extern_plugin AppWall
  • 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.UNIGINE引擎自动检测可用监视器的数量,并且如果它们符合任何受支持的配置,它将自动使用UNIGINE视口自动创建适当数量的窗口。
  • 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.)您可以使用该库的64位调试或发行版本。 (引擎会根据指定的主应用程序自动加载相应版本的库。)
注意

It is not possible to use AppWall with:不能将AppWall用于:

Four monitors in 2x2 configuration
2×2 configuration2×2配置
Four monitors in 4x1 configuration
4×1 configuration4×1配置

How to Set the Number of Windows如何设置Windows数量#

If you want to set the number of AppWall windows manually and use another supported configuration, you need to specify two specific start-up arguments in addition to the usually required ones:如果要手动设置AppWall窗口的数量并使用其他受支持的配置,除了通常需要的参数外,还需要指定两个特定的启动参数:

  • width — sets the number of monitors in a horizontal rowwidth —设置水平行中的监视器数
  • height — sets the number of rows, i.e. how many monitors there are in a vertical columnheight —设置行数,即垂直列中有多少个监视器

For example, if you want to launch AppWall in 6 windows (2 rows of monitors with 3 monitors in each row):例如,如果要在6个窗口中启动AppWall(2行监视器,每行3个监视器):

命令行
main_x64 -width 3 -height 2 -extern_plugin AppWall

Do not forget to specify other required start-up arguments as well!不要忘记指定其他必填项启动参数也一样!

Customizing AppWall自定义AppWall#

AppWall can be easily customized to support the desired configuration of monitors. You can create AppWall that renders UNIGINE viewports into the arbitrary number of windows with custom viewing frustums (symmetric or asymmetric ones).可以轻松自定义AppWall以支持所需的监视器配置。您可以创建AppWall,以将UNIGINE视口渲染到任意数量的具有自定义查看视锥(对称或非对称视锥)的窗口中。

注意
To prevent modifying camera settings from system script, specify the -extern_define "PROJECTION_USER" definition in the project's launcher.为防止通过系统脚本修改摄像机设置,请在项目的启动器中指定-extern_define "PROJECTION_USER"定义。

AppWall CamerasAppWall相机#

AppWall 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.AppWall具有一个视口,而所有其他视口则呈现为辅助视口。默认情况下,主显示是用于单显示器配置的UNIGINE引擎视口。它使用引擎使用的Player矩阵查看场景。其他显示器是具有任意角度并面向所需方向的任意摄像机。每个显示器都有自己的模型视图和投影矩阵。如果需要,可以启用或禁用主监视器和辅助监视器。

  • 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).默认情况下,只有主要的一个具有接口(渲染系统GUI,编辑器小部件,线框或分析器)。但是,分开图形用户界面可以在所有监视器上绘制(请参阅样本更多细节)。
  • 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.对于1×1配置,显示第一个(也是唯一一个)。
  • For 2×1 configuration, the 1st display.对于2×1配置,第一个显示。
  • For 3×1 configuration, the 2nd display.对于3×1配置,第二个显示。
  • For 4×1 configuration, the 2nd display.对于4×1配置,第二个显示。
  • For 5×1 configuration, the 3rd display.对于5×1配置,则显示3。
  • For 1×2 configuration, the 1st display in the column.对于1×2配置,该列中的第一个显示。
  • For 2×2 configuration, the 1st display in the 1st row.对于2×2配置,第一行显示在第一行。
  • For 3×2 configuration, the 2nd display in the 1st row.对于3×2配置,第二行显示在第一行。

How to Set Up Custom Cameras Configuration如何设置自定义相机配置#

Rendering of AppWall viewports is controlled by wall.h script (located in <UnigineSDK>/data/core/scripts/system).AppWall视口的渲染由wall.h脚本(位于<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_APP_WALL ... #endif in the render() function of the system script.要实现自定义摄像机配置,请在unigine.usc系统脚本中注释掉wall.h,然后在系统脚本的render()函数中将您的自定义代码与#ifdef HAS_APP_WALL ... #endif环绕在一起。

注意
You can also directly modify the wall.h script.您也可以直接修改wall.h脚本。

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 AppWall renderer itself (which is safer if you are going to use asymmetric frustum for the primary monitor and modify its modelview matrix).AppWall渲染器本身(如果要对主监视器使用非对称视锥,并修改其模型视图矩阵,则更加安全)。
注意
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.下面的示例演示如何创建3×1监视器配置以及如何为主监视器选择渲染器。

1. Using default engine renderer1.使用默认引擎渲染器#

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::AppWall:setPrimary():如果默认情况下不支持创建的配置,请通过Unigine::Plugins::AppWall:setPrimary()设置主监视器:

    源代码 (C++)
    // The primary display is the 2nd one in a row and
    // it is positioned in the first line of monitors.
    Unigine::Plugins::AppWall::get()->setPrimary(1, 0);
  2. Enable all auxiliary monitors via Unigine::Plugins::AppWall::setEnabled() (they are disabled by default). The primary one should be disabled, as it is drawn by the default engine renderer.通过Unigine::Plugins::AppWall::setEnabled()启用所有辅助监视器(默认情况下禁用它们)。主菜单应被禁用,因为它是由默认引擎渲染器绘制的。

    源代码 (C++)
    // Enable the 1st and the 3rd monitors in the first row.
    // The third argument of the function sets 'enabled' flag.
    Unigine::Plugins::AppWall::get()->setEnabled(0, 0, 1);
    Unigine::Plugins::AppWall::get()->setEnabled(2, 0, 1);
  3. Set projection and model-view matrices for auxiliary monitors via Unigine::Plugins::AppWall::setProjection() and Unigine::Plugins::AppWall::setModelview().通过Unigine::Plugins::AppWall::setProjection()Unigine::Plugins::AppWall::setModelview()设置辅助监视器的投影和模型视图矩阵。

    源代码 (C++)
    // Settings for the 1st monitor
    Unigine::Plugins::AppWall::get()->setProjection(0, 0, projection_0);
    Unigine::Plugins::AppWall::get()->setModelview(0, 0, modelview_0);
    
    // Settings for the 3rd monitor
    Unigine::Plugins::AppWall::get()->setProjection(2, 0, projection_1);
    Unigine::Plugins::AppWall::get()->setModelview(2, 0, modelview_1);

2. Using AppWall renderer2.使用AppWall渲染器#

Another variant is to render the primary monitor by the AppWall renderer. This variant can be used, for example, if you want to set up symmetric frustums for all monitors.另一个变体是通过AppWall渲染器渲染主监视器。例如,如果要为所有监视器设置对称的视锥台,则可以使用此变体。

  1. Disable rendering into the default UNIGINE viewport via Unigine::Render::setEnabled():通过Unigine::Render::setEnabled()禁用渲染到默认的UNIGINE视口:

    源代码 (C++)
    Unigine::Render::setEnabled(0);
  2. Enable all AppWall monitors including the primary one. As a result, all three viewports will be rendered by AppWall renderer itself:启用所有AppWall监视器,包括主要的监视器。结果,所有三个视口将由AppWall渲染器本身渲染:

    源代码 (C++)
    // Enable all AppWall monitors:
    Unigine::Plugins::AppWall::get()->setEnabled(0, 0, 1);
    Unigine::Plugins::AppWall::get()->setEnabled(1, 0, 1);
    Unigine::Plugins::AppWall::get()->setEnabled(2, 0, 1);
  3. Set model-view and projection matrices for all three monitors.设置所有三个监视器的模型视图和投影矩阵。

    源代码 (C++)
    // Settings for the 1st monitor
    Unigine::Plugins::AppWall::get()->setProjection(0, 0, projection_0);
    Unigine::Plugins::AppWall::get()->setModelview(0, 0, modelview_0);
    
    // Settings for the 2nd (primary) monitor
    Unigine::Plugins::AppWall::get()->setProjection(1, 0, projection_1);
    Unigine::Plugins::AppWall::get()->setModelview(1, 0, modelview_1);
    
    // Settings for the 3rd monitor
    Unigine::Plugins::AppWall::get()->setProjection(2, 0, projection_2);
    Unigine::Plugins::AppWall::get()->setModelview(2, 0, modelview_2);
最新更新: 2021-06-16
Build: ()