27.3. Configurations

What Do I Need to Do Remote Rendering on Unix?

The most important requirement is:

The server machine must have an X server running that supports GLX.

This is important to remember. Pure computation or file servers often do not have an attached monitor (or only have a text-based console) and therefore do not appear to need an X server running. However an X server is required because Open Inventor requires OpenGL and OpenGL cannot be used on a Unix/Linux system without an X server (and the GLX extension). It is not necessary to have a monitor. Open Inventor will use this X server to create off-screen buffers, do OpenGL rendering, and read back the resulting images.

We recommend:

The remote viewing tool VNC ( www.realvnc.com).

VNC provides image compression, simple collaboration capability, and many features to make remote viewing easier. VNC is also free and has light weight viewers suitable for low-end machines, including a Java-based viewer that runs inside a web browser.

From the VNC web site:

VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing ‘desktop’ environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures.

There is also a commercial version of VNC from Tridia ( www.tridia.com) and several experimental versions of VNC featuring alternate compression algorithms and other features (see the VNC web site for more links).

What Do I Need to Do Remote Rendering on MS-Windows?

This is possible, but much more limited than on Unix. Because Windows does not have a network rendering capability like the X Window system, all applications render to the screen. So, in general, only a single graphics application can run (and be fully visible) at any time. However remote rendering is still possible using a remote viewing tool like VNC. In this case, VNC actually reproduces the entire desktop on the remote machine. The VNC server for Windows does not support collaboration.

Because the application will always render to the screen, even when remote viewing, there is no need for any special support in Open Inventor.

VNC Setup on Unix

Install the VNC server distribution for your machine and operating system. Start the VNC server with the desired display number and depth of 24, for example:

vncserver :12 -depth 24

You may also need to specify “-pixelformat bgr888a” if the colors appear to be reversed.

If the display number is not specified, VNC will pick one. Use this display number when connecting your VNC viewer and when running your application. Read the VNC documentation for more options and info.

Important: Open Inventor remote rendering requires “-depth 24”.

The VNC server will print a message containing the name of its log file. Check the log file to be sure the server started successfully. The VNC FAQ covers most of the things that can go wrong. The most common problem we have seen is not being able to start the server unless you are “root”.

Extract from the VNC FAQ: The most likely reason for this is that Xvnc can't create the unix domain socket (the path for this unix domain socket is usually /tmp/.X11-unix/Xn). Try making sure that users can write to this directory by making it world-writable, i.e., chmod 01777 /tmp/.X11-unix

The VNC server is an X server. X Window applications can connect to it just like any other X server, by setting the DISPLAY environment variable. For example, you can run “xdpyinfo” to confirm that the VNC server is running. However it is not associated with any physical screen on the machine where it is running. It manages a “virtual” screen which is displayed on whatever VNC viewers (typically running on remote machines) are connected to it.

If you need to start the VNC viewer from the command line, you may need the following options:

vncviewer -shared (for multiple users) -truecolor -depth 24

Open Inventor Setup on Unix

The application program must be built with Open Inventor v3.0 or higher.

Here are the main environment variables that control remote rendering:

  • OIV_REMOTERENDER has values ON, OFF, and AUTO. The default value is AUTO, meaning that remote rendering will be used automatically if the target X server does not support the GLX extension. The VNC X server does not support the GLX extension, so by default remote rendering is used automatically when the target is a VNC server. If this variable is set to OFF, remote rendering will not be used. In this case, if the target server does not support GLX the application will exit (as in previous releases of Open Inventor). If this variable is set to ON, remote rendering is always used. This may be useful for testing.

  • OIV_REMOTERENDER_DISPLAY specifies the X display that Open Inventor will use for OpenGL rendering on the server machine. It has the same format as the standard X Window environment variable “DISPLAY” (which will typically be set to the display number of a VNC server). If this variable is not set, Open Inventor will attempt to use display “:0.0” for OpenGL rendering. This variable can be used to take advantage of multiple graphics pipes on the server machine. For example, one application might use display “:0.0” while another application uses display “:0.1”. Open Inventor does not currently have a mechanism to automatically choose an “unused” graphics pipe.

  • OIV_REMOTERENDER_BUFFER specifies the type of buffer that Open Inventor will use for OpenGL rendering on the server machine. Valid values are PIXMAP, PBUFFER, and SCREEN. The default is PBUFFER. PIXMAP rendering is not hardware accelerated, but any number of pixmaps can be used. PBUFFER rendering is the most useful because it is hardware accelerated and off-screen. However the size and/or number of pbuffers may be limited by the amount of video memory on the graphics board. SCREEN rendering uses the normal frame buffer on the server machine. In some cases this is a disadvantage because it prevents another user from using the server machine’s display, but it can also be an advantage because it allows a user at the server machine to see the same image as the remote user.

  • OIV_REMOTERENDER_DEBUG requests debug output about remote rendering. Setting it to any value enables the debug output.

VNC Setup on Local Machine

Install the VNC Viewer distribution for your machine and operating system. Start the VNC Viewer and enter the name of a VNC server as “host:display”, for example “bigserver:12”. The VNC Viewer will display the virtual desktop managed by the VNC server on the remote machine. If you have previously connected to this VNC server, it will restore the state of your session at the point when you disconnected.

In a command window (on the remote machine desktop), set the DISPLAY variable to the VNC server, for example:

setenv DISPLAY :12

Then run your Open Inventor application. All windows opened by the application should now appear on your local machine (inside the remote machine desktop window).