/ SIGGRAPH 2011 BOF

OpenSceneGraph

Community

SIGGRAPH 2011 BOF

Presentations

The following presentations were given at the SIGGRAPH 2011 OpenSceneGraph Birds of a Feather:

Other Activities

Quick Start Tutorial

Jean-Sébastien Guay gave a short tutorial session about how to compile OpenSceneGraph itself, and then how to set up your own project using this. The steps followed were roughly:

OpenSceneGraph
  1. Download OpenSceneGraph sources (from svn or a source zip file of the version you want to use)
  2. Download relevant dependencies (on Windows, dependencies packages for most versions of Visual Studio are available; on Linux, install the -dev or -devel versions of the dependencies you want to build against; on MacOS X, use MacPorts to install the dependencies; if you want to use non-standard or less-used dependencies, it may be non-trivial, but that is up to the developers of the 3rdparty project itself, OSG cannot really do anything beyond make the CMake config find the appropriate files; there was lots of discussion / concern about the VRML plugin so that may have to be looked into)
  3. Run CMake GUI, drag and drop the root CMakeLists.txt onto it, change the build directory to (source tree)/build, click Configure.
  4. Activate / show Advanced settings and check that the relevant 3rdparty dependencies were found. On Linux / MacOS X they generally are, on Windows they generally are not since there is no standard place to look, so you will have to fill in the header / library paths.
  5. Also enable Build OSG Examples and other things you may want.
  6. Change CMAKE_INSTALL_PREFIX to where you want to install the binaries once they're built.
  7. Click Configure as many times as you need to for all red fields to be gone, then click Generate.
  8. In the build directory you specified in step 3, on Linux do make install, for Visual Studio open the OpenSceneGraph.sln file and right-click the INSTALL target and build that, on XCode open the generated project and build it.
Simple OSG-based project skeleton
  1. Download the skeleton
  2. Unzip the file somewhere.
  3. Run CMake GUI, drag and drop the root CMakeLists.txt onto it, change the build directory to (source tree)/build, click Configure.
  4. Set OSG Install Type to Alternative Installation Directory, click Configure again.
  5. In OSG Install Directory browse to the install path that you set in CMAKE_INSTALL_PREFIX when you built OpenSceneGraph above.
  6. Change CMAKE_INSTALL_PREFIX to where you want to install the binaries once they're built.
  7. Click Configure as many times as you need to for all red fields to be gone, then click Generate.
  8. In the build directory you specified in step 3, on Linux do make install, for Visual Studio open the solution file and right-click the INSTALL target and build that, on XCode open the generated project and build it.

The simple project you can download above is simply the source of the osgviewer application, as a starting point. The important part is the CMake configuration, which is basically 3 files: the root CMakeLists.txt, the one in the src directory, and the OSGHelper.cmake in the CMakeModules directory (which is from osgworks, thanks Paul Martz for this really good helper which hides all the redundant settings and lets you set the OSG binaries path in a clean and user-friendly fashion).

Some additional notes on the process

(from questions Jean-Sébastien Guay answered at the BOF)

  • As you can see, compiling OSG from source is not harder than compiling any other CMake project, which is pretty easy once you get the basic mechanics of the process. I really recommend building from source with a basic set of plugins / 3rdparty dependencies, and adding others as you need later. You can always come back to your build directory later and all your previous settings in CMake will have been preserved, so you can just add one plugin and regenerate the build files and you will be able to just compile that plugin.
  • For your own projects, using CMake is not mandatory. I use it and I showed this way of doing things because I could show one way that was valid on all platforms, and I personally use it so that my own projects are cross-platform, but if you want to make your own Makefiles, or Visual Studio projects, or whatever, just adjust your header paths and link to the libraries you need and you will be set.

Beginner's Guide Giveaway

Four electronic copies of the OpenSceneGraph Beginner's Guide book were given away in a draw from the business cards of the people who were present at the end of the tutorial. The winners were:

  • Stephen Bohus
  • Josselin Petit
  • Yvon Halbwachs
  • Peter Cho

Congratulations to the winners, and thanks to Wang Rui for providing these complimentary copies!

Videos

Photos