OpenSceneGraph/src
Robert Osfield b4789863ac Form Wang Rui, "An initial GLSL shader support of rendering particles. Only the POINT
type is supported at present. The attached osgparticleshader.cpp will
show how it works. It can also be placed in the examples folder. But I
just wonder how this example co-exists with another two (osgparticle
and osgparticleeffect)?

Member variables in Particle, including _alive, _current_size and
_current_alpha, are now merged into one Vec3 variable. Then we can
make use of the set...Pointer() methods to treat them as vertex
attribtues in GLSL. User interfaces are not changed.

Additional methods of ParticleSystem are introduced, including
setDefaultAttributesUsingShaders(), setSortMode() and
setVisibilityDistance(). You can see how they work in
osgparticleshader.cpp.

Additional user-defined particle type is introduced. Set the particle
type to USER and attach a drawable to the template. Be careful because
of possible huge memory consumption. It is highly suggested to use
display lists here.

The ParticleSystemUpdater can accepts ParticleSystem objects as child
drawables now. I myself think it is a little simpler in structure,
than creating a new geode for each particle system. Of course, the
latter is still compatible, and can be used to transform entire
particles in the world.

New particle operators: bounce, sink, damping, orbit and explosion.
The bounce and sink opeartors both use a concept of domains, and can
simulate a very basic collision of particles and objects.

New composite placer. It contains a set of placers and emit particles
from them randomly. The added virtual method size() of each placer
will help determine the probability of generating.

New virtual method operateParticles() for the Operator class. It
actually calls operate() for each particle, but can be overrode to use
speedup techniques like SSE, or even shaders in the future.

Partly fix a floating error of 'delta time' in emitter, program and
updaters. Previously they keep the _t0 variable seperately and compute
different copies of dt by themseleves, which makes some operators,
especially the BounceOperator, work incorrectly (because the dt in
operators and updaters are slightly different). Now a getDeltaTime()
method is maintained in ParticleSystem, and will return the unique dt
value (passing by reference) for use. This makes thing better, but
still very few unexpected behavours at present...

All dotosg and serialzier wrappers for functionalities above are provided.

...

According to some simple tests, the new shader support is slightly
efficient than ordinary glBegin()/end(). That means, I haven't got a
big improvement at present. I think the bottlenack here seems to be
the cull traversal time. Because operators go through the particle
list again and again (for example, the fountain in the shader example
requires 4 operators working all the time).

A really ideal solution here is to implement the particle operators in
shaders, too, and copy the results back to particle attributes. The
concept of GPGPU is good for implementing this. But in my opinion, the
Camera class seems to be too heavy for realizing such functionality in
a particle system. Myabe a light-weight ComputeDrawable class is
enough for receiving data as textures and outputting the results to
the FBO render buffer. What do you think then?

The floating error of emitters
(http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-May/028435.html)
is not solved this time. But what I think is worth testing is that we
could directly compute the node path from the emitter to the particle
system rather than multiplying the worldToLocal and LocalToWorld
matrices. I'll try this idea later.
"
2010-09-14 15:47:29 +00:00
..
OpenThreads From Stephan Huber, 2010-07-31 08:57:52 +00:00
osg From Ulrich Hertlein, "not sure how severe this is but I believe there's a bug in 2010-09-14 13:19:55 +00:00
osgAnimation From Rob Smith, makes hardware skinning use of the existing stateset 2010-08-04 08:35:49 +00:00
osgDB Aded option for doing a glFlush() after compiling texture objects, with a dedicated compile thread default to issuing the glFlush. 2010-08-09 16:19:50 +00:00
osgFX Convertex osg::notify to OSG_INFO etc. 2010-05-28 16:04:56 +00:00
osgGA Changed setTransformation(eye, center, up) paramter ordering to match gluLookAt conventions. 2010-08-16 11:03:24 +00:00
osgManipulator Converted osg::notify to OSG_INFO etc. 2010-05-28 16:06:15 +00:00
osgParticle Form Wang Rui, "An initial GLSL shader support of rendering particles. Only the POINT 2010-09-14 15:47:29 +00:00
osgPlugins From Jean-Sebastien Guay, "osgWidget::WindowManager did nothing in its keyUp event, and in particular didn't call any callbacks. Since I wanted to have callbacks on keyUp, I copied what it does on keyDown, which works for me. I could have just used keyDown and saved myself the trouble, but you know me... :-) 2010-09-09 16:49:10 +00:00
osgPresentation From Wang Rui, "I've found a minor bug in the cmake script of src/osgPresentation when testing the osgIntrospection project. It missed the Export header file and thus will not install this file while 'make install'. Add a line to the LIB_PUBLIC_HEADERS variable will fix the issue." 2010-07-08 10:56:34 +00:00
osgQt Moved TextNode into osgText. 2010-09-07 18:18:35 +00:00
osgShadow Fixed permissions 2010-06-03 15:09:06 +00:00
osgSim Introduced the use of atan2 in place of asin/acos for reliability and simplicity 2010-06-14 16:27:35 +00:00
osgTerrain From Brad Christiansen, "To build OSG using Visual Studio 2010 Terrain.cpp requires #include <iterator>. This is a very common fix when using 2010 due to changes in Microsoft STL. 2010-07-31 10:17:06 +00:00
osgText Cleaned up debug info, and changed Text3D across to using GL_NORMALIZE instead of GL_RESCALE_NORMAL. 2010-09-08 11:02:39 +00:00
osgUtil From Roland Smeenk, "this submission adds a "Fast Drawable" line to the camera scene statistics. 2010-09-09 10:03:58 +00:00
osgViewer From Torben Dannhauer, "I extended the attached CMAKE module to search for the collada libraries of my VS2008 3rdParty package if no other library is found. 2010-09-09 10:44:11 +00:00
osgVolume Converted osg::notify to OSG_INFO etc. 2010-05-28 16:04:19 +00:00
osgWidget From Jean-Sebastien Guay, "osgWidget::WindowManager did nothing in its keyUp event, and in particular didn't call any callbacks. Since I wanted to have callbacks on keyUp, I copied what it does on keyDown, which works for me. I could have just used keyDown and saved myself the trouble, but you know me... :-) 2010-09-09 16:49:10 +00:00
osgWrappers Form Wang Rui, "An initial GLSL shader support of rendering particles. Only the POINT 2010-09-14 15:47:29 +00:00
CMakeLists.txt Removed osgIntrospection as it's now available as a seperate osgIntrospection project that can be checked out thus: 2010-06-23 13:28:19 +00:00