OpenSceneGraph: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (→‎Current issues: Removed some solved issues.)
Line 100: Line 100:




[[List of 'compatible' aircrafts]] TO BE CONTINUED
[[List of 'compatible' aircrafts]] TO BE CONTINUED (<b>NOTE:</b> the list is out of date.)


== Missing features ==
== Missing features ==

Revision as of 17:39, 16 January 2008

As of October 29th 2006, FlightGear has migrated from PLIB to OpenSceneGraph.

Thanks to Mathias Fröhlich, we can use an current OpenSceneGraph SVN version

Getting OpenSceneGraph

The latest OSG version from svn

The OpenSceneGraph project uses Subversion (SVN).


To check out OpenSceneGraph:

   svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph 

The OpenSceneGraph repository includes all parts of OSG you need.

Download the latest stable release

http://www.openscenegraph.org/projects/osg/wiki/Downloads

The patched version (NOTE: The patched version should not be needed anymore)

OpenSceneGraph-SVN is now up to date with the required patches and should serve as well for running FlightGear.

The MSVC8 (Visual Sudio 2005) win32 build dependencies for OpenSceneGraph can be found at http://www.oflebbe.de/oflebbe/FlightGear. Look out for the link to http://www.oflebbe.de/oflebbe/FlightGear/3rdparty-2006-11-25.zip.

Compiling OpenSceneGraph

OpenSceneGraph uses cmake. A minimal build instruction for unix systems is

mkdir build.osg
cd build.osg
ccmake ../path/to/osg/source
make
make install

On other systems the steps might be different.

Recommended options to set in the ccmake menus:

  • Build type: Release
  • You don't need to build the examples, wrappers or applications.

Installing OpenSceneGraph and FlightGear with --prefix

If you use --prefix to choose were to install FlightGear and do not want to install OSG globally on the system this can be done with the following method:

OpenSceneGraph uses cmake so to build it do

 mkdir build.osg
 cd build.osg
 cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3" -D CMAKE_C_FLAGS="-O3" \
       -D CMAKE_INSTALL_PREFIX:PATH="$(MY_PREFIX)" ../path/to/osg/source
 make
 make install

or if you want to avoid needing to set LD_LIBRARY_PATH

 mkdir build.osg
 cd build.osg
 cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_CXX_FLAGS="-O3" -D CMAKE_C_FLAGS="-O3" \
       -D CMAKE_INSTALL_PREFIX:PATH="$(MY_PREFIX)" -D CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOLEAN="true" ../path/to/osg/source
 make
 make install


Configure and build SimGear and FlightGear with --prefix as usual.

No need to install any quickly changing software globally.

Installing with --prefix is a very nice way to keep several distinct and independent versions of FlightGear around. To start a new $PREFIX directory you'll also need to install plib in it, but that is easy. Most other needed dependencies are usually available through the package system of most Linux distributions (e.g. FreeGLUT, SDL, ALSA, etc).

Compilation work arounds

If you get errors when compiling the patched OpenSceneGraph after having compiled (and installed) OpenThreads and Producer successfully (happens on Arch Linux), you may have to add the following to your 'make':

    make PRODUCER_INC_DIR=/usr/local/include \
    PRODUCER_LIB_DIR=/usr/local/lib \
    OPENTHREADS_INC_DIR=/usr/local/include \
    OPENTHREADS_LIB_DIR=/usr/local/lib

Current issues

  • The 2D Panels and the rendering order of instruments ... is wrong.
  • transparency issues:
    • runway lights shine through panel:
    • runway lights shine through cloud layers in an awkward way:
    • 2D-cloud layers flood into cockpit
    • The prop of the C172 block the view on the waves of the carrier
    • The reflector gun sight on the Seahawk causes other transparent objects (carrier wake etc.) to disappear
    • A new overhead window in the C172 (inside out)
  • Runway lighting seems to have rendering artefacts on ATI Cards.
  • Enhanced runway lighting option in the drop-down menu seems to have no effect - light always appear enhanced.
  • Seneca II HSI: upper instrument clipping issue for NAV/HDG flags, heading bug, pointer


List of 'compatible' aircrafts TO BE CONTINUED (NOTE: the list is out of date.)

Missing features

Due to the migration from PLIB to OSG, some of the features seen in past versions of FlightGear are now temporarily non-functional. These are:


  • 3D clouds
  • Rendering of some scenes is not perfect.
  • Shadows
  • Exhaust shader
  • Weather Radar is there, but of course not showing any clouds
  • cloud layers don't follow the curve of the earth
  • Menu Items have no effect
    • Enhanced Runway Lights
    • Bump Mapped Clouds

Miscelaneous OSG benefits

Mathias: "I think that we should make use in the longer term of the Producers capabilities for multiple view installations. But not only multipipe installs will benefit from that. The Producer will also help to get benefit from multicore SMP machines. For that the following article is of huge interrest: http://www.donburns.net/OSG/Articles/OSGMP/"

Getting the PLIB Code

Use the tag PRE_OSG_PLIB_20061029 for checking out the branch with the plib scenegraph.


For SimGear, this works (more or less) as follows:


    cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 login
    CVS passwd: guest
    cvs -d :pserver:cvsguest@cvs.simgear.org:/var/cvs/SimGear-0.3 co source
    cd source
    cvs up -rPRE_OSG_PLIB_20061029


For FlightGear, you have to update the "source" directory:

    cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 login
    CVS passwd: guest
    cvs -d :pserver:cvsguest@cvs.flightgear.org:/var/cvs/FlightGear-0.9 co -rPRE_OSG_PLIB_20061029 source

The data directory should be the CVS HEAD version. Some aircraft, however, have a PRE_OSG_PLIB_20061029 branch that works better with FlightGear/plib, e.g Hawker Hunter.

External links

http://www.openscenegraph.org/index.php?page=CVS.CVS