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...

New version of the vr920 headtracking driver coming soon

Last year I published the first version of my linux headtracking driver for the VR920 HMD here. Currently I am working on a new driver version which will have the following additional features:

  • Multiple Protocols:
    -UDP multicast (as before)
    -UDP unicast (for flightgear connection and perhaps more)
    -mouse emulation (via uinput)
    -joystick emulation (via uinput)
    -character device for direct angle readings (via cuse, will
    require a kernel >= 2.6.31)
  • Inverting of axes (to have moving the head up making the mouse pointer up or down, depending on needs)
  • Better filtering algorithm (more stable headtracking)
  • Scaling of data (i.e. to match screen size with mouse mode)
  • Customisable delay between sensor readings
  • User interface separated from the driver

With the upcoming MPX and the mouse emulation it should be possible to control the visible viewport by turning around the head. Controlling the view for games or other software that do not natively support headtracking should also be possible with the emulation.

In the current development stage most of the features are basically working so expect the new driver to be released soon.

Stay tuned for updates

Jürgen

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

FlightGEAR 2.0.0 on GENTOO

I have searched for a 3D game on Linux and found this nice flight simulation. In Gentoos portage tree there is only an old version avaiable, so I wrote an ebuild for the new version. It compiles fine on my computer wth 64bit Gentoo – Linux.

The Power of my graphics board (nVidia Corporation Quadro FX 360M) seems to be enough for this simulation. The control is not easy, but with some time, you can fly around, like in a real aircraft.

What is FlightGear?
The FlightGear flight simulator project is an open-source, multi-platform, cooperative flight simulator development project. Source code for the entire project is available and licensed under the GNU General Public License.

HowTo install on Gentoo:

Download [download#37] file which include the ebuilds

cd /usr/locale/portage
tar -xzpvf ~/flightgear-2.0.0.tar.gz

Then you have to unmask the ebuilds in /etc/portage/package.keywords :
=games-simulation/flightgear-2.0.0 **
=dev-games/simgear-2.0.0 **
=dev-libs/boost-1.37.0-r1 **
=dev-util/boost-build-1.37.0 **
=media-libs/freeglut-2.6.0  **

now you can ’emerge =games-simulation/flightgear-2.0.0′

Have fun

Xexplorer

UPDATE 04.03.2010:

Now it´s in portage, with two different lines. First of all I found out that freeglut 2.6 is needed for flightgear, so I put it in the ebuild. And the second is a patch witch is needed if you don´t use freeglut 2.6. So I think my choice is the better way.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

stereoscopic mplayer working again

One year ago I provided a gentoo ebuild for mplayer which included support for quad-buffered stereo, enabling mplayer to display stereoscopic movies like the great movie Avatar3D I watched in cinema today. To learn more about the movie look here and here. Sadly the patch I referenced there does not apply over newer mplayer versions. So I had to modify the original patch from Stuart Levy to work again with newer mplayer versions. You may download the updated patch from here:

[download#35]

New version available!

The patch should work at least with nvidia quadro boards, probably with some others. It can be used with CRT and generic shutter glasses or HMDs like the Vusix VR920. Some stereoscopic sample movies for trying it out can be found on www.3d.wep.dk.

For Gentoo users I also modified the mplayer ebuild from portage to include the patch. The modified ebuild is available here:

[download#36]

New version available!

The older ebuild is still available on mygnu.de.

To use the ebuild it just copy it to /usr/local/portage/media-video/mplayer and copy the the patch to the “/usr/local/portage/media-video/mplayer/files” directory.  You probably have to create these directories. Then run

ebuild /usr/local/portage/media-video/mplayer/mplayer-1.0_rc4_p20091026-r1.ebuild digest

Be sure to include the following line in your /etc/make.conf.

PORTDIR_OVERLAY=”/usr/local/portage”

Then just re-emerge mplayer.

Now start mplayer with -vo gl2:stereo and enjoy the experience in the 3rd dimension again.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

java3d ebuild for gentoo

The java3d ebuilds in the gentoo portage tree are very outdated, and didn’t even work for me anymore. So I wanted to install a newer version of java3d. This resulted in the updated ebuild you can download from here:

[download#22]

I tried the ebuild together with sun-jdk-1.6.0.13 on x86_64 gentoo linux, but it schould also work on i586.

To use it just create the directory structure

mkdir -p /usr/local/portage/dev-java/sun-java3d-bin/

and copy the new ebuild to that directory. Then run

ebuild /usr/local/portage/dev-java/sun-java3d-bin/sun-java3d-bin-1.5.2.ebuild digest

Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then just emerge sun-java3d.

emerge /usr/local/portage/dev-java/sun-java3d-bin/sun-java3d-bin-1.5.2.ebuild

The ebuild creates some symlinks in your VM’s directory, so if you switch the browser plugin or the entire VM you have to reemerge sun-java3d-bin. To have the library ready to use you also have to add the following lines to your /etc/profile:

if [ “$CLASSPATH” = “” ] ; then
CLASSPATH=”/usr/share/sun-java3d-bin/lib/vecmath.jar:/usr/share/sun-java3d-bin/lib/j3dutils.jar:/usr/share/sun-java3d-bin/lib/j3dcore.jar”
else
CLASSPATH=”${CLASSPATH}:/usr/share/sun-java3d-bin/lib/vecmath.jar:/usr/share/sun-java3d-bin/lib/j3dutils.jar:/usr/share/sun-java3d-bin/lib/j3dcore.jar”
fi
export CLASSPATH

if [ “$LD_LIBRARY_PATH” = “” ] ; then
LD_LIBRARY_PATH=”/usr/lib/sun-java3d-bin/”
else
LD_LIBRARY_PATH=”${LD_LIBRARY_PATH}:/usr/lib/sun-java3d-bin/”
fi
export LD_LIBRARY_PATH

To have the changes in effect logout and login again.

If you want to have java3d useable in firefox you have to modify the line:

export LD_LIBRARY_PATH=”/usr/lib64/mozilla-firefox”

in your /usr/bin/firefox to:

export LD_LIBRARY_PATH=”/usr/lib64/mozilla-firefox”:$LD_LIBRARY_PATH

Otherwise you will end up getting unstatisfied link errors since the j3d library cannot be loaded.

Finally you can test if your java3d works on Testseite für Java und Java3D – VS-C. If you are working in a multiheaded environment, this java3d version may only work on the first display. So, if you experience problems just place your browser on the first head.

Have Fun

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
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...

nvidia-drivers-185.18.08 beta is not working

Because of the problem with a good, fast and working nvidia driver, I’ve tested the actual beta driver from Nvidia. After installing it on my system (Dell M4300, with zen-sources 2.6.29-r3 running fine on it) everything seems to be fine. But there was the first fault. The character set in the Terminal swaps. The next serious error was restarting the X-Server or crashing the whole system while surfing with Epiphany. So I downgraded my system to nvidia-drivers-180.29 again as mentioned here. It seems Nvidia has to do some work on it, still we have another working release. Stay tuned, we will test it and tell you our experience with any new driver we found from Nvidia.

LG Thorsten

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

siteinfo

Translator