I'm porting my current particle system to OSG (version 2.6.x). I am hoping to use osgParticle instead of wrapping my current OpenGL calls in OSG drawables. It seems that osgParticle overall provides more functionality than my current scheme.
However, I'm unsure of the best way to handle random start and end colors, alpha, etc. for particles in a system. In my current code, I set a range for both the starting and ending color and the starting and ending colors are randomly chosen from that range. (For example, I may want the particle start off red to red-yellow with little to no transparency and end up red to white with almost full transparency.) My first thought was to override the osgParticle::Particle::update method and initialize the particle with the desired randomness. Alas, osgParticle::Particle has no virtual methods. So, I dug further and found that I could override osgParticle::ParticleSystem::createParticle or osgParticle::Emitter::emit and change the default particle template every time to apply the desired randomness. That doesn't seem like a very elegant solution. I have to believe someone else has done something similar before. Am I missing something or have I found the best options? Is there a reason that osgParticle::Particle has absolutely no virtual methods? John Cummings _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

