This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

带有Surround插件的3显示器输出

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

Surround is designed to span the UNIGINE-based project across three monitors. It allows expanding the borders of the virtual world while keeping the full control over the rendered viewports.Surround旨在跨三个监视器跨越基于UNIGINE的项目。它允许扩展虚拟世界的边界,同时保持对渲染视口的完全控制。

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

Hardware Requirements硬体需求#

Both hardware requirements should be met to launch Surround:启动Surround应该同时满足两个硬件要求:

  1. At least 3 video simultaneous outputs on a one video card or NVIDIA SLI system.一个视频卡或NVIDIA SLI系统上至少有3个视频同时输出。
  2. AMD Radeon HD 6000 Series or NVIDIA GeForce 600 Series GPU.AMD Radeon HD 6000系列或NVIDIA GeForce 600系列GPU。

See Also也可以看看#

Launching Surround启动Surround#

Surround can be rendered both in the windowed and in the full screen mode.Surround既可以在窗口模式下也可以在全屏模式下渲染。

Surround on three monitors

Surround output onto three monitorsSurround输出到三个监视器

Launch the application together with a plugin library (bin/plugins/Unigine/Surround/UnigineSurround_*) with the usually required start-up arguments (such as rendering API, window size, etc.).通常需要将应用程序与插件库(bin/plugins/Unigine/Surround/UnigineSurround_*)一起启动启动参数(例如渲染API,窗口大小等)。

命令行
main_x64 -extern_plugin UnigineSurround

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 Surround with:不能将Surround用于:

Customizing Surround自定义Surround#

Surround can be customized to support any custom viewing frustums (symmetric or asymmetric ones) when rendering onto three monitors.可以自定义Surround,以在渲染到三个监视器时支持任何自定义的视锥(对称或不对称的视锥)。

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

Surround CamerasSurround相机#

Surround has one primary viewport in the center, 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 modelview and projection matrices. Both the primary monitor and auxiliary ones can be enabled or disabled, if necessary.Surround在中心有一个视口,而所有其他视口则被渲染为辅助视口。默认情况下,主显示是用于单显示器配置的UNIGINE引擎视口。它使用引擎使用的Player矩阵查看场景。其他显示器是具有任意角度并面向所需方向的任意摄像机。每个显示器都有自己的模型视图和投影矩阵。如果需要,可以启用或禁用主监视器和辅助监视器。

  • The central monitor is a primary one. Two side monitors are auxiliary monitors that can be arbitrary cameras with any perspective and facing whatever direction needed.中央监控器是主要的监控器。两侧监视器是辅助监视器,可以是任何摄像机,任何角度和面向任何方向的辅助监视器。
  • Each display, including the primary one, has its own modelview 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.默认情况下,只有主要的一个具有接口(渲染系统GUI,编辑器小部件,线框或分析器)。但是,分开图形用户界面可以在所有监视器上绘制。
  • All viewports have their own viewport and Reflection mask to selectively render nodes and reflections from them.所有视口都有自己的视口反射遮罩可选择性地渲染节点和来自节点的反射。

How to Customize Cameras Configuration如何自定义相机配置#

Just like in case with Wall, rendering of Surround viewports is controlled by the wall.h script (found in <UnigineSDK>/data/core/scripts/system).就像使用Wall一样,渲染Surround视口也由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_SURROUND ... #endif in the render() function of the system script:要实现自定义摄像机配置,请在unigine.usc系统脚本中将wall.h注释掉,并在系统脚本的render()函数中将您的自定义代码与#ifdef HAS_SURROUND ... #endif包装在一起:

源代码 (UnigineScript)
int render() {
	#ifdef HAS_SURROUND
		// place an implementation of a 
		// custom camera configuration here
		// ...
	#endif
	return 1;
}

There are two possible setups depending on how the central monitor is rendered. It can be drawn by:根据中央监视器的呈现方式,有两种可能的设置。可以通过以下方式得出:

  • The default engine renderer (the same as when a usual one-monitor application is rendered).默认引擎渲染器(与呈现通常的单显示器应用程序时相同)。
  • The Surround renderer itself (which is safer if you are going to use asymmetric frustum for the central monitor and modify its modelview matrix).Surround渲染器本身(如果要对中央监视器使用不对称的视锥,并修改其Modelview矩阵,则更加安全)。
注意
Only one of two renderers should be enabled at the same time.只能同时启用两个渲染器之一。

The following example demonstrates how to tweak cameras configuration and choose the renderer for the central monitor.以下示例演示了如何调整摄像机配置并选择中央监视器的渲染器。

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

The first variant is to render the central (primary) monitor by the default engine renderer.第一种变体是通过默认引擎渲染器渲染中央(主)监视器。

  1. Enable two side (auxiliary) monitors via engine.surround.setEnabled(). All Surround monitors are disabled by default. The central one should be disabled, as it is drawn by the default engine renderer.通过engine.surround.setEnabled()启用两个侧面(辅助)监视器。默认情况下,所有Surround监视器都处于禁用状态。中央的那个应该被禁用,因为它是由默认引擎渲染器绘制的。

    源代码 (UnigineScript)
    // Enable the 1-st and the 3-rd monitors.
    // The third argument of the function sets the "enabled" flag.
    engine.surround.setEnabled(0,1);
    engine.surround.setEnabled(2,1);
  2. Set projection and modelview matrices for side monitors via engine.surround.setProjection() and engine.surround.setModelview().通过engine.surround.setProjection()engine.surround.setModelview()设置侧面监视器的投影和模型视图矩阵。

    源代码 (UnigineScript)
    // Settings for the 1-st monitor
    engine.surround.setProjection(0,projection_0);
    engine.surround.setModelview(0,modelview_0);
    
    // Settings for the 3-rd monitor
    engine.surround.setProjection(2,projection_1);
    engine.surround.setModelview(2,modelview_1);

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

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

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

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

    源代码 (UnigineScript)
    // Enable all three monitors:
    engine.surround.setEnabled(0,1);
    engine.surround.setEnabled(1,1);
    engine.surround.setEnabled(2,1);
  3. Set modelview and projection matrices for all three monitors.为所有三个监视器设置模型视图和投影矩阵。

    源代码 (UnigineScript)
    // Settings for the 1-st monitor
    engine.surround.setProjection(0,projection_0);
    engine.surround.setModelview(0,modelview_0);
    
    // Settings for the 2-nd (primary) monitor
    engine.surround.setProjection(1,projection_1);
    engine.surround.setModelview(1,modelview_1);
    
    // Settings for the 3-rd monitor
    engine.surround.setProjection(2,projection_2);
    engine.surround.setModelview(2,modelview_2);
最新更新: 2024-01-11
Build: ()