Flightgear-2.8.0 with quad buffered stereo

In the article Flightgear with quad buffered stereo I have written about how to get quad buffered stereo to work with the famous flight simulator FlightGear. Recently FlightGear-2.8.0 has been released. The problem with quad buffered stereo still persists with FlightGear-2.8.0 .

One expects to enable stereoscopic mode in FlightGear starting it with the following line:

export OSG_STEREO_MODE=QUAD_BUFFER;export OSG_STEREO=ON; fgfs

When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

The reason for the above error message and the resulting broken stereo mode is, that the stereo context does not get initialized properly. The details are described here: Flightgear with quad buffered stereo. Unfortunately the patch I proposed in the mentioned post does not work for flightgear-2.8.0. However, the good news is, it only required a slight modification, the WindowBuilder.cxx file no longer is in src/Main, but in the src/Viewer directory. You can download the new patch from here:  flightgear-2.8.0-stereoscopic.patch (2582 downloads )

Hopefully the patch finds its way into the next flightgear release.

As usual for quad buffered stereo, you have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it. To use the quad buffered stereo mode start flightgear with the environment variables mentioned above. Afterwards you probably have to enable quad buffered stereo mode by selecting the Stereoscopic View Options Item in the the View menu.

The Gentoo way

For gentoo users I have created an overlay. Like the previous one it contains patches and modified ebuilds for flightgear with working quad buffer support. You may get the overlay from here:  flightgear-2.8.0 overlay (2596 downloads ) Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge flightgear and enjoy it in three dimensions.

Have fun

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Flightgear-2.4.0 with quad buffered stereo

In the post Flightgear with quad buffered stereo I have written about how to get quad buffered stereo to work with the famous flight simulator FlightGear.  Recently FlightGear-2.4.0 has been released. The problem with quad buffered stereo still persists with FlightGear-2.4.0 .

One expects to enable stereoscopic mode in FlightGear starting it with the following line:

export OSG_STEREO_MODE=QUAD_BUFFER;export OSG_STEREO=ON; fgfs

When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

The reason for the above error message and the resulting broken stereo mode is, that the stereo context does not get initialized properly.  The details are described here: Flightgear with quad buffered stereo. However, the  good news is, that the patch I proposed in the mentioned post, still works with FlightGear-2.4.0. You can download the patch from here: [download#43]

As usual for quad buffered stereo, you have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it. To use the quad buffered stereo mode start flightgear with the environment variables mentioned above. Afterwards you probably have to enable quad buffered stereo mode by selecting the Stereoscopic View Options Item in the the View menu.

With the previous version, when using the quad buffered stereo mode in flightgear, there occurred some graphics errors. Some cockpit controls and other scene details contained yellow lines, like a wireframe, which were not there when starting FlightGear in “normal” display mode. These problems seem to be gone with Flightgear-2.4.0. At least I did not notice them  anymore.

The Gentoo way

For gentoo users I have created an overlay. Like the previous one it contains patches and modified ebuilds for flightgear with working quad buffer support.  You may get the overlay from here: [download#72] Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge flightgear and enjoy it in three dimensions.

Have fun

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Improved OpenSceneGraph-2.8.3 ebuild

The current OpenSceneGraph ebuild in the Gentoo Portage tree does not install the OpenSceneGraph sample data set.  These  files include some sample models, fonts, bitmaps etc. used in the OpenSceneGraph examples and other applications.  This is a problem for applications relying on the files to be available. In example my stereoscopic image viewer SIV relies on having the OpenSceneGraph sample dataset installed and fails to load the arial font from the dataset with the following error:

Warning: font file “fonts/arial.ttf” not found.

Here is my modified ebuild resolving this issue: [download#63]

Download the modified ebuild and extract the archive into /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

If you want to use OpenSceneGraph with ffmpeg support, download the patch from bugs.gentoo.org and copy it to /etc/portage/patches/dev-games/openscenegraph-2.8.3/ as described there, to compile with ffmpeg-0.6. Otherwise the emerge will fail with:

/osgPlugins/ffmpeg/FFmpegAudioStream.hpp:18:9:
error: cannot allocate an object of abstract type
‘osgFFmpeg::FFmpegAudioStream’

Now you can set the examples USE-Flag and emerge openscenegraph to get the example dataset.

If you have got flightgear installed, reinstall simgear afterwards,  like the ebuild requests you to do:

emerge -1 dev-games/simgear

Depending on if you were upgrading or just reinstalling with the new ebuild it may be necessary to run revdep-rebuild to resolve issues with broken libraries. Hopefully the next ebuild in the portage tree will  include the sample data set.

Wxwidgets support seems to be broken with the current version. When using the wxwidgets USE-Flag Openscenegraph fails to compile with, so include

=dev-games/openscenegraph-3.0.1 -wxwidgets

in your /etc/portage/package.use if you have enabled wxwidgets in your make.conf.

best regards

Jürgen

 

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

SIV 1.1 released

I am proud to present a new version of SIV, the stereoscopic image viewer for Linux I published on MyGNU.de. It should be compilable also on MacOS and Windows, but I have never tested this. SIV is  capable of displaying JPS stereo images and MPO stereo images in different stereo modes. It is tested in fullscreen/windowed mode with anaglyphic and quad buffered stereo mode. Different output devices I tested were my Vuzix VR920 and relevator shutter glasses  on Nvidia Quadro FX 350M and FX 3700.

siv-1.1_screenshot

siv-1.1 the stereoscopic image viewer

Key Features

  • support for side by side JPS stereo images
  • support for MPO stereo images (used by Fujifilm Finepix Real 3D cameras)
  • many display modes, including quad buffered stereo
  • headtracking support for the Vuzix VR920 HMD (driver available on mygnu.de)
  • black-white and sepia filter
  • controls for gamma, brightness, contrast and parallax
  • on screen display

Basic usage
You may supply one or multiple .jps or .mpo files at the command line.  I.e.  siv *.jps will display all JPS files in the current folder. Once the first image of the list is being displayed you may use CURSOR_UP/DOWN or the mouse wheel to select a different image for being displayed. You can enable/disable the slideshow mode by pressing the [Enter] key. When displaying an image the filename of the image is displayed in the lower left corner for a few seconds. Using the number keys one may select different ways to zoom/navigate in the image. In VR920 mode or normal trackball mode use the right mouse button together with mouse movements to zoom the image. You can use the middle mouse button together with movements to pan the image. While displaying an image you may alter gamma, brightness, contrast and parallax for the best viewing experience. Some images may look better in black-white or sepia mode. By pressing the [t] key you may toggle these filters. The filters and controls use shaders on the GPU, so if you experience problems with these options you may disable them with the –disable-shaders commandline switch. At present the shader code is only tested on Nvidia hardware. If you have tested it on Intel/ATI please leave a comment.

Important keybindings are:

+/- increase/decrease parallax
HOME/END display first/last image
UP/DOWN display next/previous image
SHIFT+UP/DOWN jump 10 images forward/backward
F1/F2 decrease/increase brightness
F3/F4 decrease/increase contrast
F5/F6 decrease/increase gamma
F5/F6 decrease/increase slideshow delay
t toggle filter (normal/bw/sepia)
[Enter] toggle slideshow on/off
h Help

Press h to get the full list of keybindings.

Headtracking
If you want to try out the VR920 headtracking, enable the headtracking support with the “–vr920” option. You may want to specify the distance to the image with the “-d” option. Values between 0.25 and 0.5 seem to have a nice effect when using the headtracking. When headtracking is active you may press [z] to set the zero view so that with your current head position you will see the center of the image. If you want to manipulate the view manually press the left or mittle mouse button as described above and move the mouse. The “-m” and “-p” options allow to set IP-address and port for the connection to the headtracking driver.

Commandline Usage

siv [options] stereofile(s)

Options:
–CullDrawThreadPerContext                 Select CullDrawThreadPerContext
threading model for viewer.
–CullThreadPerCameraDrawThreadPerContext  Select
CullThreadPerCameraDrawThreadPerCo-
ntext threading model for viewer.
–DrawThreadPerContext                     Select DrawThreadPerContext
threading model for viewer.
–SingleThreaded                           Select SingleThreaded threading
model for viewer.
–accum-rgb                                Request a rgb accumulator buffer
visual
–accum-rgba                               Request a rgb accumulator buffer
visual
–cc                                       Request use of compile contexts and
threads
–clear-color <color>                      Set the background color of the
viewer in the form “r,g,b[,a]”.
–disable-shaders                          disable shaders for unsupported
graphics boards
–display <type>                           MONITOR | POWERWALL |
REALITY_CENTER |
HEAD_MOUNTED_DISPLAY
–filter=[bw|sepia]                        enable filter on startup
–rgba                                     Request a RGBA color buffer visual
–samples <num>                            Request a multisample visual
–screen <num>                             Set the screen to use when multiple
screens are present.
–serialize-draw <mode>                    OFF | ON – set the serialization of
draw dispatch
–stencil                                  Request a stencil buffer visual
–stereo                                   Use default stereo mode which is
QUAD_BUFFER if not overriden by
environmental variable
–stereo <mode>                            ANAGLYPHIC | QUAD_BUFFER |
HORIZONTAL_SPLIT | VERTICAL_SPLIT |
LEFT_EYE | RIGHT_EYE |
HORIZONTAL_INTERLACE |
VERTICAL_INTERLACE | CHECKERBOARD |
ON | OFF
–vr920                                    enable headtracking support for the
vuzix vr920 hmd
–window <x y w h>                         Set the position (x,y) and size
(w,h) of the viewer window.
-O <option_string>                         Provide an option string to
reader/writers used to load
databases
-d                                         distance (values between 0.0 and
1.0 are senseful)
-e <extension>                             Load the plugin associated with
handling files with specified
extension
-h or –help                               Display this information
-l <library>                               Load the plugin
-m                                         non default multicast ip
-p                                         non default multicast port
-s                                         start in slideshow mode
-t                                         delay for slideshow mode, defaults
to 15 sec

You may notice that most of the options come from osgViewer, which is the base class for the viewer. This gives the advantage, that one can use the “normal” osgViewer controls such as flying around the scene. Try to press [f] for toggling fullscreen mode or press [s] for toggling the onscreen stats (fps, etc.) display.

Download      

I decided to publish the viewer under the creative common noncommercial license. Make sure you have the OpenSceneGraph library installed before trying to compile or run the viewer. You may download the full source (Eclipse Project) from here: SIV-1.1 source (2062 downloads ) or an x86_64 binary from here: SIV-1.1 x86_64 binary (2165 downloads ) . More binary formats may be available in the future. Fore the x86_64 binary you’ll need OpenSceneGraph-2.8.2.
Binaries of the OpenSceneGraph library for most linux distributions can be downloaded from www.openscenegraph.org.  On gentoo one can just emerge openscenegraph.

Building from source
For building from source unpack the zip and cd to siv/Release and run make.

Possible Problems
As default SIV starts in fullscreen quad buffered stereo mode. Thus if your graphics hardware does not support this mode, the viewer will exit with the following error:

Error: Not able to create requested visual.
GraphicsWindow has not been created successfully.
Viewer::realize() – failed to set up any windows

In this case try anaglyphic mode or the apropiate 3D mode for your hardware (see the –stereo option). For instructions on how to get the xserver to work in stereoscopic mode see: Vuzix VR920 with Linux and active 3D stereo

History
SIV-1.1
-support for the new MPO file format
-black-white and sepia filter
-controls for gamma, brightness, contrast and parallax
-improved OSD
-manual controls in vr920 headtracking mode

SIV-1.0
-slideshow mode
-vr920 headtracking

SIV – first version
-initial realease with support for jps files, quad buffered stereo and various other display modes

Footnote
If you like the viewer, feel free to link to www.mygnu.de. To request commercial licenses contact us at info(at)mygnu.de. Well, if you just want to support our work on MyGNU.de use the donate button 😉

have fun, enjoy the 3rd dimension and have a merry Christmas

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

FlightGear with quad buffered stereo

With my upcoming new headtracking driver for the vusix vr920 hmd it is likely that I manage to get the famous flight simulator FlightGear to work with it. This led me again to the problem that FlightGear does not work in quad buffered stereo, as  I described in my comment to FlightGEAR 2.0.0 on GENTOO.

One expects to enable stereoscopic mode in FlightGear starting it with the following line:

export OSG_STEREO_MODE=QUAD_BUFFER;export OSG_STEREO=ON; fgfs

When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

Doing some code analysis in OpenSceneGraph-2.8.0 I discovered the following lines of code in View.cpp:

osg::DisplaySettings* ds = osg::DisplaySettings::instance();
if (ds->getStereo())
{
switch(ds->getStereoMode())
{
case(osg::DisplaySettings::QUAD_BUFFER): traits->quadBufferStereo = true; break;
case(osg::DisplaySettings::VERTICAL_INTERLACE):
case(osg::DisplaySettings::CHECKERBOARD):
case(osg::DisplaySettings::HORIZONTAL_INTERLACE): traits->stencil = 8; break;
default: break;
}
}

It seems that the stereo context in FlightGear does not get initialized properly in WindowBuilder::makeDefaultTraits(bool stencil). Thus these lines have to be added to WindowBuilder.cxx. For convenience here is the patch against  FlightGear-2.0.0: [download#43]

Perhaps some nice FlightGear developer can include this into upstream code. You have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it.

Problems remaining

When using the quad buffered stereo mode in flightgear there occur some graphics errors. These are not very annoying, but they are there. Some cockpit controls and other scene details contain yellow lines, like a wireframe,  which are not there when starting FlightGear in “normal” display mode. I suspect this to be another bug in FlightGear, which has still to be located. See the screenshots below for details. The problematic parts of the scenes are marked red. Especially the night pictures show the problem. This problem does not only exist in quad buffered stereo mode, but also in other stereo modes like HORIZONTAL_SPLIT.

flightgear_1

FlightGear by day, quad-buffered stereo, with errors

flightgear_2

FlightGgear by day, no stereo, without errors

flightgear_3

FlightGear by night, quad-buffered stereo, with errors

flightgear_4

FlightGear by night, no stereo, without errors

The Gentoo way

For gentoo users here is my overlay including the modified ebuild: [download#44] Download the modified overlay (including the patches) and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge flightgear and enjoy it in three dimensions.

Have fun

Jürgen

Tool to increase your alexa rank instantly

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

osgocean ebuild for gentoo

I just recognized the osgocean release on the osg mailing-list. Osgocean is a library that one can use to render water effects in a very realistic way. It was used to generate the above and below water effects in the VENUS project. For more information on the osgocean project see: osgocean You can see how realistic it looks if you watch the youtube video below.

It looked very interesting, so I decided to try it out. To do so I wrote two ebuilds, one for osgocean and one for  fftss, the fast fourier transformation library it depends on. Both are available in following archive: [download#21]

Extract the archive to your portage overlay.

# mkdir /usr/local/portage/
# cd /usr/local/portage/
# unzip osgocean_overlay.zip

Be sure that PORTDIR_OVERLAY=”/usr/local/portage” is included in your /etc/make.conf, then you can emerge it:

#emerge osgocean

For this you need to have the OpenSceneGraph library installed. Detailed Instructions on how to build OpenSceneGraph on gentoo can be found on PlopByte.

Since openscenegraph is now in the main portage tree I have updated the ebuild dependencies today (31/08/2009) to either media-gfx/openscenegraph or dev-games/openscenegraph.

Updated ebuild is now available here: [download#42] Just copy it to /usr/local/portage/media-gfx/osgocean/ after extractingosgocean_overlay.zip like described before and run:

ebuild /usr/local/portage/media-gfx/osgocean/osgocean-1.0.1.ebuild digest

Best regards

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

SIV-1.0 released

I’m proud to present a new version of SIV, the stereoscopic jps viewer for Linux I published first in SIV – a stereoscopic jps viewer for Linux. SIV is  capable of displaying jps stereo images in different stereo modes. I tried it in fullscreen/windowed mode with anaglyphic and quad buffered stereo mode. Different output devices I tested were my Vuzix VR920 and relevator shutter glasses  on Nvidia Quadro FX 350M and FX 3400. It should also work with an Ati FireGL, but I never tried this. The new version fixes some segfaults, that occured when needed libraries were missing. Furthermore I added a slideshow mode and the possibility to specify a default distance and therefore the possibility to set a default zoom factor. The coolest feature I added to the viewer is the headtracking support for the Vuzix VR920 HMD. For this you will need (in addition to the device 😉 ) the headtracking driver, I published in VR920 headtracking driver for Linux. You may watch  a video (demo_siv_headtracking_vr920) of me using the viewer with enabled headtracking to view some photos of NASA’s Apollo missions  downloadable from nvidia forums.

Usage changes:

New commandline options are:

  • -s                                         Enable slideshow mode
  • -t                                         delay Delay for slideshow mode,
    defaults to 10 sec
  • -d                                         distance (values between 0.0 and
    1.0 are senseful)

These new options control the new headtracking support:

  • –vr920                             enable headtracking support for the vuzix vr920 hmd
  • -m                                        non default multicast ip
  • -p                                         non default multicast port

For detailed information on the -m and -p options see the article about the headtracking driver : VR920 headtracking driver for Linux. They have the corresponding meaning. If you want to try out the headtracking, enable the headtracking support with the –vr920 option. You may want to specify the distance to the image with the -d option. Values between 0.25 and 0.5 seem to have a nice effect when using the headtracking. When headtracking is active you may press Z to set the zero view so that with your current head position you will see the center of the image. If you want to manipulate the view manually press 2 to enable the trackball manipulator and use i.e. the right moue button and up or down movements (with the mouse) to control the distance (zoom in or out). Afterwards press 1 to activate headtracking again.

For more usage documentation see: SIV – a stereoscopic jps viewer for Linux

Download:      

I decided to publish the viewer under the creative common noncommercial license. Make sure you have the OpenSceneGraph library installed before trying to compile or run the viewer. You may download the full source (Eclipse Project) from here: [download#9] or an x86_64 binary from here:  [download#10]. More binary formats may be available in the future. Fore the x86_64 binary you’ll need OpenSceneGraph-2.8.

Binaries for most linux distributions can be downloaded from www.openscenegraph.org.  Instructions on how to build OpenSceneGraph on gentoo can be found on PlopByte.

Building from source:

For building from source unpack the zip and cd to siv/Release and run make.

Footnote:

If you like the viewer, feel free to link to www.mygnu.de. To request commercial licenses contact us at info(at)mygnu.de. Well, if you just want to support our work on MyGNU.de use the donate button 😉

best regards and enjoy the 3rd dimension

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

siteinfo

Translator