Hi Wang, It is just my personal experience that a simple to use and high performance generic particle system is a huge if not impossible task. Just see for exemple in osgParticle the PrecipitationEffect done by Robert, in fact it does not use osgParticle framework. I send you the ParticleSystemBuilder class i use to create my effects. Very basic but sufficient for my own needs. It covers particle drawing (using PointSprite), and basic particle management. It is a template class so that you can easily reuse it with different kind of particles. Too rough to be really useful for OSG, but it can give an idea of a lightweight solution. Then most of the code (particle simulation) is done in each effect and deals with various problems, like precision issues when dealing with earth-like databases. Cheers, Fabien
-----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wang Rui Sent: mardi 17 août 2010 16:25 To: OpenSceneGraph Users Subject: Re: [osg-users] osg::Particle problem Hi Fabien, Today's osgParticle already uses GLBeginEndAdapter for rendering particles, which is actually glDrawArray() at its low-level implementation. I wonder if this is not too inefficient comparing with the use of osg::Geometry. Of course, making use of shaders will be much better on modern graphics devices. To develop new features for osgParticle, I mainly refer to a good open-source project by David McAllister (http://www.particlesystems.org/). Any other ideas and usable source code are welcome and appreciated. Cheers, Wang Rui 2010/8/17 Fabien Lavignotte <fabien.lavigno...@vegatechnologies.fr>: > A quick mail just to give more opinions on the subject. > We stopped using osgParticle for performance reasons. osgParticle is a > little bit overengineered for a real time particle system, the > particle simulation loop is quite bloated with different layer of > abstractions that are finally not so useful. Moreover, the particle > class is quite big, with lot of informations that are not useful for > all particle systems. It is really not suited for high performance > particle systems (thousands of particles). > Finally, doing the particle simulation on my own was easier, and give > me more control. For exemple, the particle system must work with > earth-like databases. I have several effects (explosion, reactor > trail, dust trail), they just share the drawing code (convert > particles to osg::Geometry) and some basic particles management, and it is > sufficient... > ________________________________ > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
ParticleSystemBuilder.h
Description: ParticleSystemBuilder.h
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org