Hi John, It sounds like when you compute the position of the trail and when the position of the emitter is updated is out of sync, what you need to do is make sure your trail code is executed after the emiter update each frame.
As a general comment, if I were to write a smoke trail right now I'd just write from scratch and not use osgParticle. osgParticle was original written for CPU based particle effects well before shaders became available. There is modest support for using shaders in osgParticle but the general design approach isn't conducive to a using shaders. For a modern smoke effect you should be able to do most of the effects using a combination of vertex, geometry and fragment shaders. Use of perlion noise in particle shaders can be a good way of generating effective smoke effects as doesn't need an particle effects. Robert. On 28 July 2014 02:56, John Farrier <john.farr...@gmail.com> wrote: > Hi, > > I am implementing my own smoke trail using osgParticle. I have it just > about where I want it, except for one thing: When I am emitting the smoke > trail from a fast moving object, the emitter seems to "lag behind" the > object. At some point, the faster the object moves, the further the > emitter seems to be. When moving slowly, it looks perfect. > > I am using an osgParticle::SegmentPlacer. The segment ends are made up of > the current position of the object and the previous position of the object. > My thought is that if I distributed particles over the segment, it would > fill in given a sufficient number of particles generated. I set up my > emitter's counter rate range to a high and low both of 4096 particles (i.e. > constant, no rate.) Even with this, my particles are showing up well > behind my object when it is moving quickly. (The distance seems to be > about equal to the distance the object traveled in a single frame.) > > Any thoughts or ideas would be appreciated! > > Thank you! > > Cheers, > John > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=60474#60474 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org