2002-04-25 14:27:09 +08:00
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2002-04-19 05:29:31 +08:00
< html >
< head >
2002-04-25 14:27:09 +08:00
< meta http-equiv = "Content-Type" content = "text/html; charset=iso-8859-1" >
< meta name = "GENERATOR" content = "Mozilla/4.77 [en] (X11; U; Linux 2.4.3-20mdk i686) [Netscape]" >
2002-04-25 18:07:44 +08:00
< title > Introduction to the OpenSceneGraph< / title >
2002-04-19 05:29:31 +08:00
< / head >
2002-04-25 14:27:09 +08:00
< body bgcolor = "#FFFFFF" >
2002-04-25 15:47:37 +08:00
< img SRC = "images/OpenSceneGraphBanner_Distribution.jpg" BORDER = 0 height = 77 width = 640 >
2002-04-25 18:07:44 +08:00
< table >
2002-04-25 21:26:33 +08:00
< tr >
< td > < a href = "index.html" > Index< / a > < / td >
< td > < a href = "introduction.html" > Introduction< / a > < / td >
< td > < a href = "contents.html" > Contents< / a > < / td >
< td > < a href = "install.html" > Install< / a > < / td >
< td > < a href = "dependencies.html" > Dependencies< / a > < / td >
2003-04-11 18:37:31 +08:00
< td > < a href = "examples.html" > examples< / a > < / td >
2002-04-25 21:26:33 +08:00
< td > < a href = "data.html" > Data< / a > < / td >
2003-04-11 18:37:31 +08:00
< td > < a href = "osgviewer.html" > Viewer< / a > < / td >
2002-04-25 21:26:33 +08:00
< td > < a href = "stereo.html" > Stereo< / a > < / td >
< td > < a href = "plan.html" > Plan< / a > < / td >
< td > < a href = "documentation.html" > Reference Guides< / a > < / td >
< / tr >
2002-04-25 14:27:09 +08:00
< / table >
2002-04-19 05:29:31 +08:00
2002-04-25 14:27:09 +08:00
< h2 >
< u > Introduction to the OpenSceneGraph< / u > < / h2 >
Welcome to OpenSceneGraph project!
2002-05-22 03:34:16 +08:00
< p > The OpenSceneGraph is an Open Source (LGPL), Cross Platform (Windows,
2002-04-25 14:27:09 +08:00
Linux, Mac OSX, FreeBSD, Irix, Solaris), Standard C++ and OpenGL based
2002-05-22 03:34:16 +08:00
graphics development library. Uses range from visual simulation, games,
virtual reality, scientific visualization and graphics research. This page
2002-04-25 14:27:09 +08:00
introduces what scene graphs are, why graphics developers use them, and
2002-05-22 03:34:16 +08:00
details about the OpenSceneGraph project, how to learn how to use it and
2002-04-25 14:27:09 +08:00
contribute to the OpenSceneGraph community.
2002-07-21 02:27:40 +08:00
< p > < i > Robert Osfield, Project Lead. July 2002.< / i >
2002-04-25 14:27:09 +08:00
< br >
< hr >
< h3 >
< u > What is a Scene Graph?< / u > < / h3 >
Its a tree! Quite simply one the best and most reusable data structures
2002-05-22 03:34:16 +08:00
invented. Typically drawn schematically with the root at the top, leaves at the
bottom. It all starts with a top-most root node which encompasses your whole
virtual world, be it 2D or 3D. The world is then broken down into a hierarchy
of nodes representing either spatial groupings of objects, settings of the
position of objects, animations of objects, or definitions of logical relationships
between objects such as those to manage the various states of a traffic light.
2002-04-25 14:27:09 +08:00
The leaves of the graph represent the physical objects themselves, the
drawable geometry and their material properties.
2002-05-22 03:34:16 +08:00
< p > A scene graph isn't a complete game or simulation engine, although it may
be one of the main components of such an engine; it's primary focus is
representation of your 3d worlds, and efficient rendering thereof. Physics models,
2002-04-25 14:27:09 +08:00
collision detection and audio are left to other development libraries that
2002-05-22 03:34:16 +08:00
a user will integrate with. The fact that scene graphs don't typically
integrate all these features is actually a really good thing: it aids interoprability
with clients' own applications and tools and allows them to serve many varied
markets from games, visual simulation, virtual reality,
2002-04-25 14:27:09 +08:00
scientific and commercial visualization, training through to modeling programs.
< br >
< hr >
< h3 >
< u > Why use a Scene Graph - Performance, Productivity, Portability and Scalability< / u > .< / h3 >
2002-04-19 05:29:31 +08:00
2002-04-25 21:26:33 +08:00
< ol > < i > Performance< / i > - scene graphs provide an excellent framework for
2002-05-22 03:34:16 +08:00
maximizing graphics performance. A good scene graph employs two key techniques
2002-04-25 14:27:09 +08:00
- culling of the objects that won't be seen on screen, and state sorting
2002-05-22 03:34:16 +08:00
of properties such as textures and materials, so that all similar objects
2002-04-25 14:27:09 +08:00
are drawn together. Without culling the CPU, buses and GPU will all become
swamped by many times the amount of data than they actually require to
2002-05-22 03:34:16 +08:00
represent your work accurately. The hierarchical structure of the scene
2002-04-25 14:27:09 +08:00
graph makes this culling process very efficient with whole town being culled
with just a few operations! Without state sorting, the the buses and GPU
2002-05-22 03:34:16 +08:00
will thrash between states, stalling the graphics pipeline and destroying graphics
througput. As GPU's get faster and faster, the cost of stalling the graphics
is also going up, so scene graphs are becoming ever more important.
< p > < i > Productivity< / i > - scene graphs take away much of the hard work required
to develop high performance graphics applications. The scene graph manages
2002-04-25 14:27:09 +08:00
all the graphics for you, reducing what would be thousands of lines of
2002-04-25 21:26:33 +08:00
OpenGL down to a few simple calls. Furthermore, one of most powerful concepts
2002-05-22 03:34:16 +08:00
in Object Oriented programming is that of object composition, enshrined
in the < i > Composite Design Pattern< / i > , which fits the scene graph tree structure
perfectly and makes it a highly flexible and reusable design - in real
terms this means that it can be easily adapted to solve your problems.
With scene graphs often also come additional utility libraries which range from
helping users set up and manage graphics windows to importing of 3d models
2002-04-25 14:27:09 +08:00
and images. All this together allows the user to achieve a great deal with
very little coding. A dozen lines of code can be enough to load your data
2002-04-19 05:29:31 +08:00
and create an interactive viewer!
2002-04-25 21:26:33 +08:00
< p > < i > Portability< / i > - scene graphs encapsulate much of the lower level
2002-04-25 14:27:09 +08:00
tasks of rendering graphics and reading and writing data, reducing or even
eradicating the platform specific coding that you require in your own application.
If the underlying scene graph is portable then moving from platform to
2002-05-22 03:34:16 +08:00
platform can be as simple as recompiling your source code.
2002-04-25 21:26:33 +08:00
< p > < i > Scalability< / i > - along with being able to dynamic manage the complexity
2002-04-25 14:27:09 +08:00
of scenes automatically to account for differences in graphics performance
across a range of machines, scene graphs also make it much easier to manage
complex hardware configurations, such as clusters of graphics machines,
or multiprocessor/multipipe systems such as SGI's Onyx. A good scene graph
will allow the developer to concentrate on developing their own application
while the rendering framework of the scene graph handles the different
2002-04-25 21:26:33 +08:00
underlying hardware configurations.< / ol >
2002-04-19 05:29:31 +08:00
< hr >
2002-04-25 14:27:09 +08:00
< h3 >
< u > So what about the OpenSceneGraph project?< / u > < / h3 >
The OpenSceneGraph is an Open Source Scene Graph, and our goal is make
the benefits of scene graph technology available to all. Our scene graph
is still in development, but has already gained a great deal of respect
amongst the development community for its high performance, cleanness of
design and portability. Written entirely in Standard C++ and OpenGL, it
2002-05-22 03:34:16 +08:00
makes full use of the STL and Design Patterns, and leverages the open source
2002-04-25 14:27:09 +08:00
development model to provide a development library that is legacy free
and well focused on the solving the task. The OpenSceneGraph delivers on
the four key benefits of scene graph technology outlined above using the
following features:
2002-07-21 02:27:40 +08:00
< ol > < i > Performance< / i > - supports view frustum culling, occlusion culling, small feature culling,
2002-05-22 03:34:16 +08:00
Level Of Detail (LOD) nodes, state sorting, vertex arrays and display
lists as part of the core scene graph. These together make the OpenSceneGraph
one of the highest performance scene graph available. User feedback is that
performance surpasses that of much more established scene graphs such as Performer, VTree, Vega
Scene Graph and Java3D! The OpenSceneGraph also supports easy customization
of the drawing process, which has allowed implementation of Continuous Level
of Detail (CLOD) meshes on top the scene graph. These allow the visualization
2002-04-25 14:27:09 +08:00
of massive terrain databases interactively, examples of this approach can
2002-05-22 03:34:16 +08:00
be found at Vterrain.org and TerrainEngine.com, both of which integrate
2002-04-25 14:27:09 +08:00
with the OpenSceneGraph.
2002-04-25 21:26:33 +08:00
< p > < i > Productivity< / i > - by combining lessons learned from established
2002-05-22 03:34:16 +08:00
scene graphs like Performer and Open Inventor, with modern software engineering
boosts like Design Patterns, along with a great deal of feedback early on
in the development cycle, it has been possible to design a library that is
clean and highly interpretable. This has made it easy for users to adopt
to the OpenSceneGraph and to integrate it with their own applications. With
2002-04-25 14:27:09 +08:00
a full feature set in the core scene graph, utilities to set up the scene
graph and viewers and a wide range of loaders it is possible to create
an application and bring in user data with a very small amount of code.
2002-04-25 21:26:33 +08:00
< p > < i > Portability< / i > - The core scene graph has also been designed to
2002-05-22 03:34:16 +08:00
have minimal dependency on any specific platform, requiring little more than
Standard C++ and OpenGL. This has allowed the scene graph to be rapidly
ported to a wide range of platforms - originally developed on IRIX, then
2002-04-25 14:27:09 +08:00
ported to Linux, then to Windows, then FreeBSD, then Mac OSX and most recently
Solaris! Being completely windowing system independent makes it easy for
2002-05-22 03:34:16 +08:00
users to add their own window-specific libraries and applications on top.
2003-04-11 18:37:31 +08:00
In the distribution there is already the osgProducer library, and in the Bazaar
2002-05-22 03:34:16 +08:00
found at openscenegrph.org/download/ one can find examples of applications
written on top of Qt, MFC, WxWindows and SDL. Users have also integrated it
2002-04-25 14:27:09 +08:00
with Motif, and X.
2002-05-22 03:34:16 +08:00
< p > < i > Scalability< / i > - the scene graph will not only run on portables all
2002-04-25 21:26:33 +08:00
the way up to Onyx Infinite Reality Monsters, it supports the multiple
2002-05-22 03:34:16 +08:00
graphics subsystems found on machines like a mulitpipe Onyx. This is
possible because the core scene graph supports multiple graphics contexts
for both OpenGL Display Lists and texture objects, and the cull and draw
2002-04-25 21:26:33 +08:00
traversals have been designed to cache rendering data locally and use the
2002-05-22 03:34:16 +08:00
scene graph almost entirely as a read-only operation. This allows multiple
2002-04-25 21:26:33 +08:00
cull-draw pairs to run on multiple CPU's which are bound to multiple graphics
subsystems. This has been demonstrated using the OpenSceneGraph in conjunction
2002-05-22 03:34:16 +08:00
with SGI's OpenGL multipipe SDK. We also have osgMP in development, which
will be cross platform and will transparently support multiple multipipe systems
2002-04-25 21:26:33 +08:00
like the Onyx and graphics clusters< / ol >
2002-05-22 03:34:16 +08:00
All the source to the OSG is published under the GNU Lesser General Public License
2002-04-25 14:27:09 +08:00
(LGPL) which allows both open source and closed source projects to use,
modify and distribute it freely as long its usage complies with the LGPL.
The project has been developed over the last four years, initiated by Don
2002-05-22 03:34:16 +08:00
Burns, and then taken over by Robert Osfield who continues to lead the project
today. There are many other contributors to the library, for a full list
2002-04-25 14:27:09 +08:00
check out the AUTHORS file. Both Robert and Don now work on the OpenSceneGraph
2002-05-22 03:34:16 +08:00
in a professional capacity providing consultancy and bespoke development
2002-04-25 14:27:09 +08:00
on top the library, and are also collaborating on the book. Work on the
core scene graph and support of public mailing list remains unpaid as are
the contributions of the rest of the community, but this hasn't impacted
the quality of the source or support which once you get stuck in you grow
to appreciate.
2002-07-21 02:27:40 +08:00
< p > The project is currently in beta, which means the main core features are now in
place, with a 1.0 release in fall 2002. Despite the beta development status,
2002-04-25 14:27:09 +08:00
the project has already earned the reputation the leading open source scene
2002-05-22 03:34:16 +08:00
graph, and is establishing itself as a viable alternative to the commercial
2002-04-25 14:27:09 +08:00
scene graphs. Numerous companies, university researchers and graphics enthusiasts
2002-05-22 03:34:16 +08:00
have already adopted the OpenSceneGraph for their projects, all over the world.
2002-04-25 14:27:09 +08:00
< br >
2002-04-24 21:05:03 +08:00
< hr >
2002-04-25 14:27:09 +08:00
< h3 >
< u > Getting started< / u > < / h3 >
The first thing is to select the distribution which suits you, there are
binary, development and source code distributions, these can be loaded
from the
< a href = "http://www.openscenegraph.org/download" > http://www.openscenegraph.org/download< / a >
page. The latest developments area available as via a nightly tarball or
via cvs.
< p > The binary distribution contains just the libraries (.dll's /.so's)
and demo executables. This is suitable for using the OpenSceneGraph with
an application that has already been compiled but depends at runtime on
the OpenSceneGraph.
< p > The development distribution contains the libraries (.dll's /.so's),
demo executables, include files, and source to the demos. This is suitable
for using the developers using the OpenSceneGraph.
2002-05-22 03:34:16 +08:00
< p > The source distribution contains all the source and include files
2002-04-25 14:27:09 +08:00
required to build the OpenSceneGraph from scratch, and is ideal if you
want to learn more about how the scene graph works, how to extend it, and
2002-05-22 03:34:16 +08:00
to track down and fix any problems that you come across.
2002-04-25 14:27:09 +08:00
< p > If you are using a source distribution then read the < a href = "install.html" > installation< / a >
instructions for how to get the OpenSceneGraph compiling and installed
on your system. You may also need to download libraries that parts of the
2003-04-11 18:37:31 +08:00
OpenSceneGraph depend upon, such as Producer. Check the < a href = "dependencies.html" > dependencies< / a >
2002-04-25 14:27:09 +08:00
list for further details.
2003-04-11 18:37:31 +08:00
< p > For full instructions of how to run the demos read the < a href = "examples.html" > demos< / a >
2002-04-25 21:26:33 +08:00
page.
2002-04-25 14:27:09 +08:00
< br >
2002-04-19 05:29:31 +08:00
< hr >
2002-04-25 14:27:09 +08:00
< h3 >
2002-05-22 03:34:16 +08:00
< u > Learning how to use the OpenSceneGraph< / u > < / h3 >
2002-04-25 14:27:09 +08:00
The OpenSceneGraph distribution comes with a reference guide for each of
2003-04-11 18:37:31 +08:00
the component libraries - osg, osgDB, osgUtil, osgText, osgParticle and osgProducer, a set
of demos - the source of which can be found in examples. For questions
2002-04-25 14:27:09 +08:00
or help which can't be easily be answered by the reference guide and demo
2002-05-22 03:34:16 +08:00
source, one should join the mailing list (details below). There are also
the beginnings of a < a href = "http://www.c2.com/cgi/wiki?OpenSceneGraphFaq" > Wiki
2002-04-25 14:27:09 +08:00
based FAQ< / a > which may help answer a few of the common queries.
< p > A programming guide will be available in form of a OpenSceneGraph book
which is being written by Don Burns and Robert Osfield, parts of it will
be available online.
< p > Although not directly related to the OpenSceneGraph, once can learn
about scene graph technology from such sources as the < a href = "http://www.sgi.com/software/inventor/manuals.html" > Open
Inventor Mentor< / a > , and < a href = "http://www.cineca.it/manuali/Performer/ProgGuide24/html" > Performer
2002-05-22 03:34:16 +08:00
Programming Guides< / a > . The latter is the closer in design to
the OpenSceneGraph, although the Performer manuals are in C, alas. Also of use
2002-04-25 14:27:09 +08:00
as a background to some of the techniques used is a SIGGRAPH < a href = "http://www.opengl.org/developers/code/sig99/advanced99/course_slides/vissim/index.htm" > Vis-Sim
course< / a > .
2002-05-22 03:34:16 +08:00
< p > The OpenSceneGraph uses OpenGL and does so with a deliberately thin layer,
2002-04-25 14:27:09 +08:00
making it easy to control the underlying OpenGL and to extend it with OpenGL
extensions. The close tie with OpenGL is also reflected in the naming of
2002-05-22 03:34:16 +08:00
many of the OpenGL state related classes, and the parameters that they
encapsulate, which means that knowledge of OpenGL itself will go a long way
2002-04-25 14:27:09 +08:00
to understanding how to get the best out of the OpenSceneGraph. To this
end it is worth obtaining a copy of the OpenGL programming guide - < a href = "http://fly.cc.fer.hr/~unreal/theredbook/" > `Red
Book`< / a > and OpenGL reference guide 'Blue Book'. The main < a href = "http://www.opengl.org" > OpenGL
website< / a > is also a good source of links and further information.
< br >
2002-04-19 05:29:31 +08:00
< hr >
2002-04-25 14:27:09 +08:00
< h3 >
< u > Support and discussion - the < i > openscenegraph-news< / i > mailing list< / u > < / h3 >
For scene graph related questions, bug reports, bug fixes, and general
design and development discussion one should join the < a href = "http://lists.sourceforge.net/mailman/listinfo/openscenegraph-news" > openscenegraph-news< / a >
mailing list, and check the the mailing list < a href = "http://www.geocrawler.com/redir-sf.php3?list=openscenegraph-news" > archives< / a > .
< p > Professional support is also available in the form of confidential online,
phone and onsite support and consultancy, for details contact Robert Osfield
at < a href = "mailto:robert@openscenegraph.com" > robert@openscenegraph.com< / a > .
2002-04-19 05:29:31 +08:00
< / body >
2002-04-24 21:08:30 +08:00
< / html >