Posts Tagged ‘unixes’

9
Feb

OpenSceneGraph

   Posted by: sye   in science

About Author:
Rui Wang is a sofware engineer at the Chinese Academy of Surveying and Mapping and the manager of osgChina, the largest OSG discussion website in China. He is one of the most actve members of the ofcial OSG community, who contributes to the serializaton I/O, GPU-based partcle functonalites, BVH and animated GIF plugins, and other fixes and improvements to the OSG project. He translated Paul Martz’s OpenSceneGraph Quick Start Guide into Chinese in 2008, and wrote his own Chinese book OpenSceneGraph Design and Implementaton in 2009, cooperatng with Xuelei Qian. He is also a novel writer and a guitar lover.

Xuelei Qian received his B.Sc. degree in Precision Instrument Engineering from Southeast University, Jiangsu, China, and his Ph.D. degree in applied graphic computng from the University of Derby, Derby, UK in 1998 and 2005, respectvely. Upon completon of his Ph.D. degree, he worked as a postdoctoral research fellow in the Dept. of Precision Instrument and Mechanology at Tsinghua University and his current research interests include E-manufacturing, STEP-NC and intelligent CNC, and virtual reality engineering.

A quick overview of rendering middleware:
Before entering the world of OpenSceneGraph, we assume that you are already experienced
in OpenGL programming. You work with stacks of matrices, set pipeline states, look for new
extensions, call rendering APIs or commands and immediately draw them on a context, no
mater if you are enjoying or sufering from the whole process.
A rendering middleware is a soluton that raises the level of abstracton and eases the
complexity of using a low-level OpenGL API, at the cost of fexibility. The concepts of
modularity and object-orientaton are ofen applied to manage graphics primitves,
materials, and diferent visual data sets in user applicatons, saving much development
tme and allowing new functonalites to be combined as modules and plugins.
OpenSceneGraph is a well-designed rendering middleware applicaton. It is actually a
retained rendering (or deferred rendering) system based on the theory of scene graph,
which records rendering commands and data in a bufer, for executng at some other
tme. This allows the system to perform various optmizatons before rendering, as well as
implement a multthreaded strategy for handling complex scenes.

Scene graphs
A scene graph is a general data structure that defnes the spatal and logical relatonship
of a graphical scene for efcient management and rendering of graphics data. It is typically
represented as a hierarchical graph, which contains a collecton of graphics nodes including
a top-level root node, a number of group nodes each of which can have any number of child
nodes, and a set of leaf nodes each of which has zero child nodes and that serve together
as the botom layer of the tree. A typical scene graph does not allow a directed cycle (where
some nodes are connected in a closed chain) or an isolated element (a node that has no
child or parent) inside of itself.
Each group node can have any number of children. Grouping these child nodes allows them
to share the informaton of the parent and be treated as one unit. By default, an operaton
performed by a parent propagates its efects to all of its children.
It also happens that certain nodes have more than one parent node, in which case the
node is considered to be “instanced”, and the scene graph can be defned as a directed
acyclic graph (DAG). Instancing produces many interestng efects, including data sharing
and mult-pass rendering.
The concept of scene graph has been widely applied in many modern sofware and
applicatons, for instance, AutoCAD, Maya, CorelDraw, VRML, Open Inventor, and the
one that we are going to investgate–OpenSceneGraph.

The OpenSceneGraph project was initated as an avocaton by Don Burns in 1998. He used to
work for SGI and is a hang-gliding enthusiast. He wrote a simplifed SGI Performer-like scene
graph API on a humble Linux PC, named SG, which was the prototype of OSG.
In 1999, Robert Osfeld, a design consultant for a hang-glider manufacturer, started to take
part in this young project. He suggested contnuity to develop SG as a standalone, open
source project and soon ported its elements to Windows. At the end of the year, Robert
took over the project and changed its name to OpenSceneGraph. The project was then fully
rewriten to take advantage of C++ standards and design paterns.
In 2001, in response to the growing interest in the project, Robert set up OpenSceneGraph
Professional Services. He gave up the opportunity to work for other companies, and went
full-tme providing both commercial and free OSG services. Don also formed his own
company, Andes Computer Engineering, and contnues to support the development of OSG.
The frst OpenSceneGraph birds-of-a-feather (BOF) meetng occurred the same year, at
SIGGRAPH 2001, with only 12 people atending. Afer that, atendance at the OSG BOF
contnues to grow every year, with more and more people getng to know this great
OpenGL-based API.
The Producer library, which was initally created to provide windowing and mult-pipe
graphic system integratons for customer’s needs, was added, along with other two
important libraries, osgText and osgFX, in 2003. Then, in 2005, OSG 1.0 was announced,
to the delight of over 1,100 members in the mailing list.