|
Syzygy Documentation: Syzgy Graphics ConfigurationIntegrated Systems Lab01/02/2007 Documentation Table of Contents This chapter will show you how to configure Syzygy to work with your display devices. Thanks to Lee Hendrickson for creating the arGUI toolkit that provides Syzygy with a flexible windowing system.
As discussed in Szygy System Configuration, a Syzygy parameter or 'dbatch' file contains two types of parameters, local (computer-specific) and global. Specification of graphical display devices falls into the global category; after defining one or more display devices, you define local parameters for each computer specifying which display or displays it will use. Global Graphics ParametersThe Syzygy graphics system contains a number of different levels of objects linking the 2-D space of your computer screen or screens to the 3-D space of the virtual world. Starting from the 3-D end, which is also the bottom of the object hierarchy, these are:
ScreensA screen is a virtual window into the virtual world. It is defined by three unit vectors (center, normal, and up) that specify its position and orientation and by its width and height in feet. Note that the normal vector points away from the viewer, and the three vectors don't have to specified as unit vectors, they will be normalized. Note also that all of these quantities represent virtual-world coordinates. Generally speaking, you will probably want them to be congruent with the real-world layout of your physical screens, but you certainly don't have to set them up that way. A screen has a number of other parameters:
CamerasA camera is an object for computing the viewing frustum. There are three types of cameras:
The other two types of cameras don't use a screen or head object (or head tracking, for that matter). They also specify near and far clipping planes. Ordinarily, Syzygy programs specify their own near and far clipping distances, and the VR camera honors these. The other two camera types don't. For these reasons, they are only useful in special circumstances:
Both are specified with the following two parameters:
ViewportsA viewport binds a camera object to a specific sub-region within a window on your computer screen. Besides a camera, a viewport has the following parameters:
Viewport ListsA viewport list may contain one or more viewports. They can be specified in a couple of different ways:
WindowsA Syzygy window corresponds to a window of your computer's graphical interface. A window contains a viewport list and the following additional parameters:
DisplaysEach Syzygy rendering program will attach itself to a display. As of Syzygy 0.8, a display contains one or more windows; previously each process could only open one window. Other parameters of displays are:
Nesting Parameter Definitions
Putting it all together: Up til now I've been putting each object in it's own
<param>
<name>display_glommed</name>
<value>
<szg_display framelock="none" threaded="no">
<szg_window>
<size width="400" height="300" />
<position x="50" y="50" />
<decorate value="false" />
<fullscreen value="true" />
<cursor value="none" />
<title value="A Syzygy Window" />
<stereo value="false" />
<zorder value="topmost" />
<szg_viewport_list viewmode="walleyed">
<szg_camera type="vr">
<szg_screen>
<center x="0." y="0." z="-3." />
<up x="0." y="1." z="0." />
<normal x="0." y="0." z="-1." />
<dim width="8." height="6." />
<headmounted value="yes" />
<usefixedhead value="ignore" />
<fixedheadpos x="0.0" y="5.0" z="0.0" />
<fixedheadupangle value="0.0" />
<tile tilex="0" numtilesx="1" tiley="0" numtilesy="1" />
</szg_screen>
</szg_camera>
</szg_viewport_list>
</szg_window>
</szg_display>
</value>
</param>
or, omitting default and unimportant values:
<param>
<name>display_compact</name>
<value>
<szg_display>
<szg_window>
<size width="400" height="300" />
<position x="50" y="50" />
<decorate value="false" />
<fullscreen value="true" />
<cursor value="none" />
<zorder value="topmost" />
<szg_viewport_list viewmode="walleyed">
<szg_camera type="vr">
<szg_screen>
<center x="0." y="0." z="-3." />
<up x="0." y="1." z="0." />
<normal x="0." y="0." z="-1." />
<dim width="8." height="6." />
<headmounted value="yes" />
<usefixedhead value="ignore" />
</szg_screen>
</szg_camera>
</szg_viewport_list>
</szg_window>
</szg_display>
</value>
</param>
(Actually, Basically, any tag beginning with 'szg_' represents a record that can either be embedded within another record or split off into its own named parameter. Local Graphics ParametersAs mentioned in the Syzygy System Configuration chapter Syzygy configuration parameters are global or local. There are three sets of local parameters that are relevant to the display of your virtual world: head parameters, selection of displays, and resource paths. If one of these parameters is not defined in the parameter database, then Syzygy will query an appropriate environment variable for the value (see Standalone Mode for an explanation). HeadsAs mentioned above in the Cameras section, a Syzygy VR camera requires a head object to compute the viewing frustum. This object contains information about the spatial relationships between the eyes and a tracking sensor on the user's head. These do not need to be defined on every computer, just on each computer that is either a master or trigger (NOTE: need a link here). A master computer is one on which the master instance of a master/slave application runs; the controller program of a distributed scene graph application runs on the trigger computer. These programs will share the head information with relevant other programs running on the cluster. When running in Standalone Mode, the current computer is both master and trigger for the purposes of this section. Please see the chapter on the Distributed OS for a definition of these terms. A head has the following parameters:
An example. The following block of parameters specifies that, for computer 'Machine':
Display SelectionAs discussed in the section on displays, each computer can be assigned one or more display objects. These are differentiated on the basis of a 0-based index, i.e. the default display is #0, the next #1, etc. A simple example should suffice to demonstrate the selection of two displays (we'll use named displays defined above) for the computer named 'Machine':
Machine SZG_DISPLAY0 name display_default
Machine SZG_DISPLAY1 name display_compact
TroubleShootingThe global graphics parameter portions of a Syzygy parameter ('dbatch') file are not parsed when the file is loaded, but when an application is launched and about to open a window. Error messages will typically begin with:
szg:ERROR: arGUIXML ...
...and will usually give a fairly accurate indication of where the error occurred. Besides XML syntax errors, the parser will catch mis-spelled attribute names. It will also catch illegal attribute values if the set of legal values is small (e.g. if the value must be one of yes/no/true/false). It makes no attempt to check that numerical values are reasonable, so to catch that sort of error you'll have to inspect the virtual scene display itself. Graphics Configuration ExamplesA number of special Graphics Configuration Examples are included in a separate chapter:
|
|
[Schedule] [Labs] [Beckman Meeting Rooms] [Equipment] [Projects] [CUBE Projects] [Syzygy] [VSS] [People] [Events] [Publications] |