root/OpenSceneGraph/trunk/doc/introduction.html @ 3293

Revision 3293, 20.2 kB (checked in by robert, 10 years ago)

Updated docs for second rev of 0.9.7

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4  <meta http-equiv="Content-Type"
5 content="text/html; charset=iso-8859-1">
6  <meta name="GENERATOR"
7 content="Mozilla/4.77 [en] (X11; U; Linux 2.4.3-20mdk i686) [Netscape]">
8  <title>Introduction to the OpenSceneGraph</title>
9</head>
10<body bgcolor="#ffffff">
11<img src="images/OpenSceneGraphBanner_Distribution.jpg" border="0">
12<table>
13  <tbody>
14    <tr>
15      <td><a href="index.html">Index</a></td>
16      <td><a href="introduction.html">Introduction</a></td>
17      <td><a href="contents.html">Contents</a></td>
18      <td><a href="install.html">Install</a></td>
19      <td><a href="dependencies.html">Dependencies</a></td>
20      <td><a href="examples.html">examples</a></td>
21      <td><a href="data.html">Data</a></td>
22      <td><a href="osgviewer.html">Viewer</a></td>
23      <td><a href="stereo.html">Stereo</a></td>
24      <td><a href="osgdem.html">osgdem</a></td>
25      <td><a href="plan.html">Plan</a></td>
26      <td><a href="documentation.html">Reference Guides</a></td>
27    </tr>
28  </tbody>
29</table>
30<h2>
31<u>Introduction to the OpenSceneGraph</u></h2>
32<p>The OpenSceneGraph is an portable, high level graphics toolkit for
33the development of high peformance
34graphics applications such as flight simulators, games, virtual reality
35or scientific visualization. Providing an object orientated framework
36on top of OpenGL, it frees the developer
37from implementing and optimizing low level graphics calls, and provide
38many additional utilities for rapid development of graphics
39applications. </p>
40<p>
41The project was started as a hobby by Don Burns in 1998, as means of
42porting a hang gliding simulator written on top of the Performer scene
43graph running on IRIX to what was then a humble Linux PC. In 1999,
44Robert Osfield began helping out with the simulator development and
45ported the scene graph element to Windows. In september 1999 the source
46code was open sourced, and the openscenegraph.org website was born,
47with Robert taking over as project lead and Don remaining focused on
48the hang gliding simulator.
49</p>
50<p> In April 2001, in response to growing interest in the project
51around the world, Robert went fulltime on the project, setting up <a
52 href="http://www.openscenegraph.com">OpenSceneGraph Professional
53Services</a> providing commericial support, consultancy services and
54training. At the end of 2001 Don also formed his own company <a
55 href="http://www.andesengineering.com">Andes Computer Engineering</a>
56and participates in the development and support of OpenSceneGraph as
57well as complimentary projects like <a
58 href="http://www.andesengineering.com/Producer">OpenProducer</a> and <a
59 href="http://www.andesengineering.com/BlueMarbleViewer">BlueMarbleViewer</a>.
60</p>
61<h3><u>What is a Scene Graph?</u></h3>
62Its a tree! Quite simply one the best and most reusable data structures
63invented. Typically drawn schematically with the root at the top,
64leaves at the
65bottom. It all starts with a top-most root node which encompasses your
66whole
67virtual world, be it 2D or 3D. The world is then broken down into a
68hierarchy
69of nodes representing either spatial groupings of objects, settings of
70the
71position of objects, animations of objects, or definitions of logical
72relationships
73between objects such as those to manage the various states of a traffic
74light.
75The leaves of the graph represent the physical objects themselves, the
76drawable geometry and their material properties.
77<p></p>
78<p>A scene graph isn't a complete game or simulation engine, although
79it may
80be one of the main components of such an engine; it's primary focus is
81representation of your 3d worlds, and efficient rendering thereof.
82Physics models,
83collision detection and audio are left to other development libraries
84that
85a user will integrate with. The fact that scene graphs don't typically
86integrate all these features is actually a really good thing: it aids
87interoprability
88with clients' own applications and tools and allows it to serve many
89varied
90markets from games, visual simulation, virtual reality,
91scientific and commercial visualization, training through to modeling
92programs.
93</p>
94<h3>
95<u>Benefits that Scene Graphs provide</u></h3>
96The key reasons that many graphics developers uses scene graphs are <i>Performance,
97Productivity, Portability and Scalability:</i>
98<ul>
99  <li><b><i>Performance</i></b></li>
100Scene graphs provide an excellent framework for
101maximizing graphics performance. A good scene graph employs two key
102techniques
103- culling of the objects that won't be seen on screen, and state
104sorting
105of properties such as textures and materials, so that all similar
106objects
107are drawn together. Without culling the CPU, buses and GPU will all
108become
109swamped by many times the amount of data than they actually require to
110represent your scenes accurately. The hierarchical structure of the
111scene
112graph makes this culling process very efficient, for instance a whole
113city can be culled
114with just a few operations! Without state sorting, the the buses and
115GPU
116will thrash between states, stalling the graphics pipeline and
117destroying graphics
118throughput. As GPU's get faster and faster, the cost of stalling the
119graphics pipeline
120is also going up, so scene graphs are becoming ever more important.
121  <p></p>
122  <li><b><i>Productivity</i></b></li>
123Scene graphs take away much of the hard work required
124to develop high performance graphics applications. The scene graph
125manages
126all the graphics for you, reducing what would be thousands of lines of
127OpenGL down to a few simple calls. Furthermore, one of most powerful
128concepts
129in Object Oriented programming is that of object composition, enshrined
130in the <i>Composite Design Pattern</i>, which fits the scene graph
131tree structure
132perfectly and makes it a highly flexible and reusable design - in real
133terms this means that it can be easily adapted to solve your problems.
134Scene graphs also often come additional utility libraries which range
135from
136helping users set up and manage graphics windows to importing of 3d
137models
138and images. All this together allows the user to achieve a great deal
139with
140very little coding. A dozen lines of code can be enough to load your
141data
142and create an interactive viewer!
143  <p></p>
144  <li><b><i>Portability</i></b></li>
145Scene graphs encapsulate much of the lower level
146tasks of rendering graphics and reading and writing data, reducing or
147even
148eradicating the platform specific coding that you require in your own
149application.
150If the underlying scene graph is portable then moving from platform to
151platform can be as simple as recompiling your source code.
152  <p></p>
153  <li><b><i>Scalability</i></b></li>
154Along with being able to dynamic manage the complexity
155of scenes automatically to account for differences in graphics
156performance
157across a range of machines, scene graphs also make it much easier to
158manage
159complex hardware configurations, such as clusters of graphics machines,
160or multiprocessor/multipipe systems such as SGI's Onyx. A good scene
161graph
162will allow the developer to concentrate on developing their own
163application
164while the rendering framework of the scene graph handles the different
165underlying hardware configurations.
166</ul>
167<h3>
168<u>The OpenSceneGraph - <i> a robust, high peformance Open Source
169scene graph</i></u></h3>
170With the OpenSceneGraph our goal is make the benefits of scene graph
171technology freely available to all, for both commericial and non
172commericial users. Whilst our scene graph
173is still in development, it has already gained a respect
174amongst the development community for its high performance, cleanness
175of
176design and portability. Written entirely in Standard C++ and OpenGL, it
177makes full use of the STL and Design Patterns, and leverages the open
178source
179development model to provide a development library that is legacy free
180and focused on the needs of end users. The OpenSceneGraph delivers on
181the four key benefits of scene graph technology outlined above with the
182following features:
183<ul>
184  <li><b><i>Performance</i></b></li>
185Supports view frustum culling, occlusion culling, small feature
186culling,
187Level Of Detail (LOD) nodes, state sorting, vertex arrays and display
188lists as part of the core scene graph. These together make the
189OpenSceneGraph
190one of the highest performance scene graph available. User feedback is
191that
192performance matches or surpasses that of much more established scene
193graphs such as Performer, VTree, Vega Scene Graph and Java3D! The
194OpenSceneGraph also supports easy customization
195of the drawing process, which has allowed implementation of Continuous
196Level
197of Detail (CLOD) meshes on top the scene graph. These allow the
198visualization
199of massive terrain databases interactively, examples of this approach
200can
201be found at Vterrain.org and TerrainEngine.com, both of which integrate
202with the OpenSceneGraph.
203  <p></p>
204  <li><b><i>Productivity</i></b> </li>
205  <p>The core scene graph provides encapsulate the majority of OpenGL
206functionality including latest extensions, provides rending
207optimizations
208such as culling and sorting, and a whole set of add on libraries which
209make
210it possible to develop high peformance graphics applications very
211rapidly. The application developer is freed to concentrate on content
212and how that content is controlled rather than low level coding. </p>
213  <p>Combining lessons learned from established scene graphs like
214Performer
215and Open Inventor, with modern software engineering methods like Design
216Patterns, along with a great deal of feedback early on in the
217development cycle, it has been possible to design a library that is
218clean and extensible. This has made it easy for users to adopt to the
219OpenSceneGraph and to integrate it with their own applications. </p>
220  <p>For reading and writing databases an the database library (osgDB)
221adds
222support for a wide
223variety of database formats via a extensible dynamic plugin mechansim -
224the distribution now includes 33
225seperate plugins for loading various 3D and Image data formats. 3D
226Database loaders include OpenFlight (.flt), TerraPage (.txp) including
227multi-threading support, LightWave (.lwo), Alias Wavefront (.obj),
228Carbon Graphics GEO (.geo), 3D Studio MAX (.3ds), Peformer (.pfb),
229Quake Character Models (.md2). Direct X (.x), and Inventor Ascii 2.0
230(.iv)/ VRML 1.0 (.wrl), Designer Workshop (.dw) and AC3D (.ac) and the
231native .osg ASCII format.
232Image loaders include .rgb, .gif, .jpg, .png, .tiff, .pic, .bmp, .dds
233(include compressed mip mapped imagery), .tga and qucktime (under OSX).
234A whole set of high quality, anti-aliased fonts can also be loaded via
235the freetype plugin. </p>
236  <p>The scene graph also has a set of <i>Node Kits</i> which are
237seperate
238libraries,
239that can be compiled in with your applications or loaded in at runtime,
240which add support for particle systems (osgParticle),
241high quality anti-aliased text (osgText) and navigational light points
242(osgSim). </p>
243  <p>The community has also developed a number of additional <i>Node
244Kits</i>
245such as <a href="http://osgnv.sourceforge.net/">osgNV</a> (which
246includes support for NVidia's vertex, fragment, combiner etc extension
247and NVidia's Cg shader language.), <a
248 href="http://www.terrainengine.com">Demeter</a> (CLOD terrain +
249integration with OSG). <a href="http://osgcal.sourceforge.net">osgCal</a>
250(which integrates <a href="http://cal3d.sourceforge.net//">Cal3D</a>
251and the OSG), <a href="http://www.vrlab.umu.se/research/osgvortex">osgVortex</a>
252(which integrates the <a href="http://www.cm-labs.com/">CM-Labs Vortex</a>
253physics enginer with OSG)
254and a whole set libraries that integrating the leading Windowing API's
255Links can be found in the bazaar sections on the <a
256 href="http://www.openscenegraph.org/download/">download</a> page of
257OpenSceneGraph webiste. </p>
258  <p>The project has also been integrated with <a
259 href="http://www.vrjuggler.org/">VR Juggler</a> and <a
260 href="http://http://vess.ist.ucf.edu/">Vess</a> virtual realilty the
261frameworks, with others in developments. </p>
262  <li><b><i>Portability</i></b></li>
263The core scene graph has also been designed to
264have minimal dependency on any specific platform, requiring little more
265than
266Standard C++ and OpenGL. This has allowed the scene graph to be rapidly
267ported to a wide range of platforms - originally developed on IRIX,
268then
269ported to Linux, then to Windows, then FreeBSD, Mac OSX, Solaris, HP-UX
270and we even a report of successful porting to PlayStation2! <br>
271The core scene graph library being completely windowing system
272independent makes it easy for users to add their own window-specific
273libraries and applications on top.
274In the distribution there is already the osgProducer library which
275integrates with <a href="http://www.andesengineering.com/Producer/">OpenProducer</a>,
276and in the Bazaar
277found at openscenegrph.org/download/ one can find examples of
278applications
279written on top of GLUT, Qt, MFC, WxWindows and SDL. Users have also
280integrated it
281with Motif, and X.
282  <p></p>
283  <li><b><i>Scalability</i></b></li>
284The scene graph will not only run on portables all
285the way up to Onyx Infinite Reality Monsters, but also supports the
286multiple
287graphics subsystems found on machines like a mulitpipe Onyx. This is
288possible because the core scene graph supports multiple graphics
289contexts
290for both OpenGL Display Lists and texture objects, and the cull and
291draw
292traversals have been designed to cache rendering data locally and use
293the
294scene graph almost entirely as a read-only operation. This allows
295multiple
296cull-draw pairs to run on multiple CPU's which are bound to multiple
297graphics
298subsystems. Support for multiple graphic context and multi-threading is
299all
300available out of the box via osgProducer - all the examples in the
301distribution
302can run multi-pipe just by use a simple configuation file.
303</ul>
304All the source to the OSG is published under the Open Scene Graph
305Public License
306(a relaxed version on the LGPL) which allows both open source and
307closed source projects to use,
308modify and distribute it freely as long its usage complies with the
309OSGPL.
310The project has been developed over the last four years, initiated by
311Don
312Burns, and then taken over by Robert Osfield who continues to lead the
313project
314today. There are many other contributors to the library, for a full
315list
316check out the AUTHORS file. Both Robert and Don now work on the
317OpenSceneGraph
318in a professional capacity providing consultancy and bespoke
319development
320on top the library, and are also collaborating on the book. Work on the
321core scene graph and support of public mailing list remains unpaid as
322are
323the contributions of the rest of the community, but this hasn't
324impacted
325the quality of the source or support which once you get stuck in you
326grow
327to appreciate.
328<p>The project is currently in beta, which means the main core features
329are now in
330place, with a 1.0 release in second half of 2004. Despite the beta
331development status,
332the project has already earned the reputation as the leading open
333source scene
334graph, and is establishing itself as a viable alternative to the
335commercial
336scene graphs. Numerous companies, university researchers and graphics
337enthusiasts
338have already adopted the OpenSceneGraph for their projects, all over
339the world. Examples of the wide variety of applications already
340developed ontop of the OpenSceneGraph include <a
341 href="http://http://www.andesengineering.com/BlueMarbleViewer/">Blue
342Marble Viewer</a>, <a href="http://www.vterrain.org"> Virtual Terrain
343Project</a>, <a href="http://http://csp.sourceforge.net/">Combat
344Simulator Project</a>, <a href="http://osgedit.sourceforge.net/">OSG-Edit</a>.
345This is just a snippet of the projects that use the project, more
346examples can be found on the screenshot pages and bazaar on the
347website.
348</p>
349<h3>
350<u>Getting started</u></h3>
351The first thing is to select the distribution which suits you, there
352are
353binary, development and source code distributions, these can be loaded
354from the
355<a href="http://www.openscenegraph.org/download">http://www.openscenegraph.org/download</a>
356page. The latest developments area available as via a nightly tarball
357or
358via cvs.
359<p>The binary distribution contains just the libraries (.dll's /.so's)
360and example executables. This is suitable for using the OpenSceneGraph
361with
362an application that has already been compiled but depends at runtime on
363the OpenSceneGraph.
364</p>
365<p>The development distribution contains the libraries (.dll's /.so's),
366example executables, include files, and source to the examples. This is
367suitable
368for developers using the OpenSceneGraph.
369</p>
370<p>The source distribution contains all the source and include files
371required to build the OpenSceneGraph from scratch, and is ideal if you
372want to learn more about how the scene graph works, how to extend it,
373and
374to track down and fix any problems that you come across.
375</p>
376<p>If you are using a source distribution then read the <a
377 href="install.html">installation</a>
378instructions for how to get the OpenSceneGraph compiling and installed
379on your system. You may also need to download libraries that parts of
380the
381OpenSceneGraph depend upon, such as Producer. Check the <a
382 href="dependencies.html">dependencies</a>
383list for further details.
384</p>
385<p>For full instructions of how to run the examples read the <a
386 href="examples.html">examples</a>
387page.
388</p>
389<h3>
390<u>Learning how to use the OpenSceneGraph</u></h3>
391<p>The main collections of resources for learning how to use the
392OpenSceneGraph can be found on openscenegraph.org documentaiton page,
393please check this out regular for new entries.<br>
394</p>
395<p>The OpenSceneGraph distribution comes with a reference guide for
396each of
397the component libraries - osg, osgDB, osgUtil, osgText, osgSim,
398osgParticle and osgProducer, a set
399of 42 examples - the source of which can be found in examples/
400directory in the distribution. For questions
401or help which can't be easily be answered by the reference guide and
402examples
403source, one should join the mailing list (details below). There are
404also
405the beginnings of a <a
406 href="http://www.c2.com/cgi/wiki?OpenSceneGraphFaq">Wiki
407based FAQ</a> which may help answer a few of the common queries.
408</p>
409<p>Two sets of online tutorial been written by members of the
410OpenSceneGraph community:<br>
411&nbsp;&nbsp;&nbsp; Jason McVeigh's <a
412 href="http://www.tersesolutions.net/osgt/">OpenSceneGraph Tutorials</a><br>
413&nbsp;&nbsp;&nbsp; Joseph Sullivan's&nbsp; <a
414 href="http://www.nps.navy.mil/cs/sullivan/osgTutorials/index.html">OpenSceneGraph
415Tutorials</a><br>
416&nbsp;<br>
417A programming guide will be available in form of a OpenSceneGraph
418book
419which is being written by Don Burns and Robert Osfield, parts of it
420will
421be available online.
422</p>
423<p>Although not directly related to the OpenSceneGraph, once can learn
424about scene graph technology from such sources as the <a
425 href="http://www.sgi.com/software/inventor/manuals.html">Open
426Inventor Mentor</a>, and <a
427 href="http://www.cineca.it/manuali/Performer/ProgGuide24/html">Performer
428Programming Guides</a>. The latter is the closer in design to
429the OpenSceneGraph, although the Performer manuals are in C, alas. Also
430of use
431as a background to some of the techniques used is a SIGGRAPH <a
432 href="http://www.opengl.org/developers/code/sig99/advanced99/course_slides/vissim/index.htm">Vis-Sim
433course</a>.
434</p>
435<p>The OpenSceneGraph uses OpenGL and does so with a deliberately thin
436layer,
437making it easy to control the underlying OpenGL and to extend it with
438OpenGL
439extensions. The close tie with OpenGL is also reflected in the naming
440of
441many of the OpenGL state related classes, and the parameters that they
442encapsulate, which means that knowledge of OpenGL itself will go a long
443way
444to understanding how to get the best out of the OpenSceneGraph. To this
445end it is worth obtaining a copy of the OpenGL programming guide - <a
446 href="http://fly.cc.fer.hr/%7Eunreal/theredbook/">`Red
447Book`</a> and OpenGL reference guide 'Blue Book'. The main <a
448 href="http://www.opengl.org">OpenGL
449website</a> is also a good source of links and further information.
450</p>
451<h3>
452<u>Support and discussion - the <i>osg-user</i> mailing list</u></h3>
453For scene graph related questions, bug reports, bug fixes, and general
454design and development discussion one should join the <a
455 href="http://dburns.dhs.org/mailman/listinfo/osg-user"><span
456 style="text-decoration: underline;">osg-user</span></a>
457mailing list, and check the the mailing list <a
458 href="http://osgcvs.no-ip.com/osgarchiver/">archives</a>.
459<p>Professional support is also available in the form of confidential
460online,
461phone and onsite support and consultancy, for details contact Robert
462Osfield
463at <a href="mailto:robert@openscenegraph.com">robert@openscenegraph.com</a>.
464</p>
465</body>
466</html>
Note: See TracBrowser for help on using the browser.