Sample .mpconfig files
----------------------

Updated for AVS/Express 5.1.1 MPE release and later release (6.0).

This directory contains sample .mpconfig files used at various sites during MPE
testing. 

** These .mpconfig files are specific to the hardware configuration at those
** sites. They may work with your hardware configuration but it seems likely
** they will require modification to match the properties of your system.

When activating the MPU renderer within Express, the renderer searches for the
.mpconfig file in the following locations:

1st: Any of the directories specified in the XP_MPE_MPCONFIG_PATH environment
variable. This may be a colon separated list of directories. The first directory
containing a .mpconfig file will be used. Do not specifiy the .mpconfig filename
in the list. This variable is optional.
2nd: Look in the current directory from where Express was started
3rd: Look in the directory specified by the XP_ROOT environment variable.
4th: If no .mpconfig file has been found, attempt to use a built-in default
config. 

Documentation
=============

SGI's documentation is available for download at 

http://www.sgi.com/software/multipipe/sdk

Upgrading from MPU
==================

The MPK library used in AVS/Express MPE 5.1.1 and later versions supercedes the
MPU library used prior to 5.1.1. The .mpconfig file format has several changes
changes. They are:

o  Keywords begining MPU_ now begin MPK_
o  Keywords have changed: See the Release Notes for a list of new keywords.
o  The 'USE' keyword is no longer supported.
o  Multiple configs per file are not supported by the SGI MPK v1.0 library. 
   However, it is possible to define multiple configs in a file by using a
   preprocessor to strip out all but one config. The MPU renderer will
   automatically issue the preprocessor command defined by the environment
   variable MPK_PARSER_CMD. If not set, no preprocessor will be used and the
   MPU renderer will expect only one config to be defined in the .mpconfig
   file. A typical setting for this variable is:

   setenv MPK_PARSER_CMD /usr/lib/cpp

   This will call the C preprocessor. Hence multiple configs can be used by
   using the macro commands as follows:
 
	#define cfg_name_1   1    /* Will use this config */
	#define cfg_name_2   0    /* Will not be used     */
	#define cfg_name_3   0    /* Will not be used     */

	
	#if cfg_name_1
	config {
          ...
	}
	#elif cfg_name_2
	config {
          ...
	}
	#elif cfg_name_3
	config {
          ...
	}
	#endif

   Note that when using a C preprocessor, comment lines should use the C-style
   notation and not the usual MPU notation (line begins with a #)

   If the standard SGI C preprocessor is not available (/usr/lib/cpp) an awk
   script can be used to provide cpp-like functionality (with some
   restrictions.) To use the awk script, set the enviroment variable as follows:

   setenv MPK_PARSER_CMD "/usr/bin/awk -f $XP_ROOT/sample_mpconfig/cpp.awk"

   The double quotes are required.

Available Samples
=================

There is a growing collection of example .mpconfig files that provide examples
of common configurations. Not all of these files and configurations have been
tested by AVS.

This directory contains .mpconfig files for use with a C preprocessor. As such,
files often contain several config with a macro (#define) at the top of the file
being used to select a particular config. AVS/Express MPE will generate errors
if using these configs without the MPK_PARSER_CMD environment variable being
set.

The /single_mpconfig subdirectory contains the same configurations for use
without a preprocessor. Each config has been written to its own file.

Other Notes
===========

As we currently use MPK v1.0 the following procedure should be used for
switching into stereo mode:

Do not switch Express into stereo mode through its GUI stereo button. Stereo
rendering is selected through the .mpconfig file. To do this, ensure that the
.mpconfig file contains the line

mode stereo

(rather than mode mono.)

Look for something like this in the .mpconfig file.

config
{
    name    "Graphics-Lab"
    mode    stereo         # <----- change this to mono if you want mono rendering

    mono    [ "", none ]   # The "" means no commands are issued to switch the
    stereo  [ "", quad ]   # hardware. You do this manually before starting MPU

    .....

}

Then,

o  Start Express, set up network etc. in mono mode.
o  Switch the hardware into stereo mode (e.g. using ircombine settings.)
   (you may to do the above steps the other way around depending on how destructive
    switching the hardware into stereo is.)
o  Select the MPU renderer in the Express GUI.
o  When you require mono mode, switch the hardware back manually.
o  Kill the MPU renderer either by exiting Express or switching back to the OGL
   renderer.

Eye Separation
--------------

To change the eye sepration either use the slider in the Express viewer UI
or switch back to the OGL renderer (if not already there), edit the .mpconfig
file and change the line

MPK_DEFAULT_EYE_OFFSET  0.035

to another value.

Look for something like this in the .mpconfig file (at the top of the file)

global {
  MPK_WATTR_HINTS_STEREO        1
  MPK_DATTR_QUADSTEREO_WIDTH    1024
  MPK_DATTR_QUADSTEREO_HEIGHT   768
  MPK_DEFAULT_EYE_OFFSET        0.035   # <----- Eye sep.
}

If the eye sep is not specified in the .mpconfig, then it is using the default
value (0.035). Just add the line to the global{ } section.

Whenever you need to edit the .mpconfig file, you only need to exit the MPU
renderer by going back to the OGL renderer. You do not need to exit Express.

Last Updated: 5 Apr 2001
MPE Team
