Configuring Hardware Displays
Configuring a Simple Image Generator
The following steps describe how to set up a simple desktop simulator with a single physical monitor.
Creating a Setup File
- Create a new Setup file.
- Select Modules from the Toolbox. Add a Graphics Module OSG module by double-clicking it.
- Select Display from the Toolbox. Add a 3D Display extension by double-clicking it.
- Save the setup.
- Start a SimApp instance using the setup you creating by running the following command line template:
<path to simapp.exe> --config <path to saved configuration.vxc> <path to VxScene>
The following example is a Windows batch file to run a SimApp instance:
set SIMAPP="C:\CM Labs\Vortex Studio [current version]\bin\SimApp.exe" set CONFIG="C:\CM Labs\Vortex Studio [current version]\resources\config\custom.vxc" set VXSCENE="C:\CM Labs\Vortex Studio Content <current version>\Demo Scenes\Scenario\Excavator Scene\Excavator.vxscene" %SIMAPP% --config %CONFIG% %VXSCENE%
Since the viewpoint is not yet set, you will see an empty blue screen. Pressing C on the keyboard after focusing on the full screen window created by Vortex® will change the view to a useable camera.
Creating and Configuring a Viewpoint
- Open the scene for your simulator or the mechanism for the vehicle you will be driving.
- Select Cameras in the Toolbox. Add a Viewpoint extension by double-clicking it. By default, it is called "Viewpoint".
- Position and orient the viewpoint.
- Switch to the Setup tab.
- Select the 3D Display extension created in Creating a Setup File above.
- Set the Viewport Name in the display's Properties panel to the name of the viewpoint.
At this point, if you save the setup and the scene or mechanism, you can start a SimApp instance with it. When the display appears, the default camera is set to match the viewpoint that you just configured.
Configuring a Multi-monitor Simulator
The following sets up a simulator with two physical computers that are dedicated to generate images and five physical monitors, using the setup and viewpoint created above as a starting point.
Creating the Nodes
Note Create one node per physical machine in order to optimize the start-up time and reduce the amount of memory used.
- Create three image generator nodes and one master node, for a total of four nodes.
- Name the nodes, e.g., "IGÂ Left and Right", "IGÂ Center", "IGÂ Top and Bottom", and "Engine".
- Select the three IGÂ nodes. In the Properties panel, select IsFreeRunningSimulation.
- Select Modules from the Toolbox. Add an Engine module to the Master node.
- From the Toolbox:
- Add a Graphics Module OSG to each of the IGÂ nodes.
- Create a 3D Display extension for each physical monitor attached to the physical machine running each IG. For example, the "IG Left and Right" node will have two 3D Display extensions.
- Alternatively, you can use Presets from the Toolbox. For example, "IGÂ Left and Right"Â could be generated using the Slave with 2 windows preset.
- Copy and paste the Graphics module, the Network slave module and the 3D Display extension into the other IG nodes.
- Select Network in the Toolbox. Add a Configuration extension by double-clicking it.
Note When configuring the resolution of the displays, and using marine decals, there are extra parameters to consider. Please see Adding a Decal Controller for more information.
Assigning Monitors to Nodes
The Automatic placement mode sorts the position of the displays in the virtual world, comparing them with their positions on the desktops of the physical computers where the nodes are spawned. This means that if you start all four nodes of this configuration on one physical computer with five physical monitors, they will automatically distribute themselves according to the desktop position of the physical monitors.
- Select the 3D Display extension of the "IG Center" node. Set its Physical Position to (1, 0, 0).
- Select the first 3D Display extension of the "IG Top and Bottom" node. Set the Physical Position to (0.94, 0, 0.322) and the Physical Orientation to (0, -15, 0).
- Select the second 3D Display extension of the "IG Top and Bottom" node. Set the Physical Position to (0.94, 0, -0.322) and the Physical Orientation to (0, 15, 0)
- Select the first 3D Display extension of the "IG Left and Right" node. Set the Physical Position to (0.94, 0.43, 0) and the Physical Orientation to (-90, -15, 0) and the HUD Rotation to Rotate 270 Degrees.
- Select the second 3D Display extension of the "IG Left and Right" node. Set the Physical Position to (0.94, -0.43, 0) and the Physical Orientation to (90, -15, 0) and the HUD Rotation to Rotate 90 Degrees.
You will need to create six batch files, one for each node. These batch files are needed to start the nodes on all the physical computers. Then, distribute the data and the configuration to all the physical computers involved in the system.
For example, IGÂ Left.bat contains the following:
set SIMAPP="C:\CM Labs\Vortex Studio [current version]\bin\SimApp.exe" set CONFIG="C:\CM Labs\Vortex Studio [current version]\resources\config\custom.vxc" set VXSCENE="C:\CM Labs\Vortex Studio Content [current version]\Demo Scenes\Scenario\Excavator Scene\Excavator.vxscene" %SIMAPP% --confignode "IG Left" --config %CONFIG% %VXSCENE
Advanced Features
Automatic Display Placement Mode
There are three placement modes from which to select:
- Automatic:Â The physical monitors attached to the physical computer are sorted in 2D and compared to the Desktop placement in the OSÂ configuration. When the nodes are started, they are assigned their physical monitors according to their relative positions to each other.
- Fixed: When you select this mode, the Placement parameter appears. This parameter represents a quad on the desktop position, where the four values are "left", "top", "width" and "height". This display creates a window to cover this area on the desktop. Setting the width to a negative value creates an off-screen memory buffer instead of a window.
- Monitor0/Monitor1/...: The indexed physical monitor is covered by this 3D Display extension. The indexes of the physical monitor match those in the OSÂ configuration.
Display HUDÂ Rotation
The HUDÂ Rotation allows you to configure the orientation of the HUDÂ elements separately from the scene elements. This is useful when physical monitors are rotated in portrait mode, or for floor- and ceiling-level monitors where the up-axis differs from the norm.
By default, this parameter is set to No Rotation and the HUD is oriented with the physical monitor. The rotation angles in these parameters are counter-clockwise with respect to the viewer.
NVIDIAÂ Surround
In order to achieve the best performance when drawing on multiple monitors attached to the same physical machine, CM Labs recommends enabling NVIDIA Surround to trick Windows into believing only one monitor is attached to the physical machine. Then, create one node in the configuration that contains and describes all the display for all the physical monitor.
Starting with Windows 8, the Display Window Manager (DWM) process is not optional. To achieve its purpose of supporting transparent windows and window-switching effects, the DWM intercepts any attempt by graphical applications to draw on the monitor. This means that real-time 3D applications like CM Labs simulators may occasionally fail the vertical-sync of the physical monitor, something the user will notice. This effect is typically called "stuttering".
For single-monitor, real-time 3D applications, the DWM allows a process to enter "exclusive mode". A process can enter "exclusive mode" by having a window that covers exactly the primary monitor. When in "exclusive mode", the DWM does nothing in its interception of draw attempts, so its cost becomes negligible. The DWM does not offer any way to enter "exclusive mode" on a secondary monitor.
The NVIDIA Surround mode allows you to trick Windows into believing there is only one large monitor attached to the physical machine. In the case where the NVIDIA Surround mode merges two physical HD monitors into one surround monitor, the desktop for this surround monitor will be 2xHD. The DWM process will then allow one process to enter "exclusive mode" if its window covers the 2xHD area of the surround monitor.
Vortex Studio has integrated the NVIDIA API and detects the NVIDIA Surround mode. If a display uses the indexed Monitor mode, Vortex Studio will iterate through the actual physical monitors rather than cover the surround monitor. If a display uses the Automatic placement mode, it will be placed on the actual physical monitors. When the 3D Display and Qt Display extensions create their windows, they will attempt to cover the area of the surround monitor if enough displays are found to cover it.