Hi Rudolf,

I had exactly the same problem as you, I have an application with particles
where you can change the current time (coming back to the start, going to a
given time...).

To not have problems with particles not destroyed, I needed to :

- First destroy manually all the particles.
- Then stop the emiter by setting a RandomRateCounter with a rate range
between 0 and 0 for example.
- Change the simulation time.
- Set back a normal RandomRateCounter.

Good luck !

On Thu, Mar 20, 2008 at 12:50 PM, Vincent Bourdier <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> It looks normal for me that when you stop emmiting particle, the ones
> which have been shot will continue to move... until the end of the
> lifetime... so if you want to cut it on one frame to the next one... I think
> killing each particle could be the better way to do it...
>
> maybe another better solution exist... but I don't know it.
>
> Regards
>
>    Vincent.
>
> 2008/3/20, Wiedemann, Rudolf, OPS3 <[EMAIL PROTECTED]>:
>
> >  Hi Vincent,
> >
> > I have a particle system in my scene, which starts emitting particles at
> > simulation time = 0 (endless).
> > Then, at an arbitrary simulation time, I want the scene starting at
> > simulation time 0 again.
> > This works well except for the particle system, because it begins now
> > with another shape as in the first run, by and by getting the expected shape
> > with increasing simulation time.
> > I tried setting several parameter combinations (life time, reset time,
> > re-reading the scene before every run...) and with some combinations I had
> > the problem, that the particle system started correctly out-of-the-box
> > again, but the old particles did still exist. So one idea was to destroy the
> > particles manually...
> > ... which works in the way Serge suggests, but then no new particles
> > seemed to be created in the following run.
> >
> > I would be grateful for any hint!
> > Rudi
> >
> >
> >  ------------------------------
> >  *Von:* [EMAIL PROTECTED] [mailto:
> > [EMAIL PROTECTED] *Im Auftrag von *Vincent
> > Bourdier
> > *Gesendet:* Donnerstag, 20. März 2008 11:58
> > *An:* OpenSceneGraph Users
> > *Betreff:* Re: [osg-users] Resetting particle systems
> >
> > Hi,
> >
> > I don't understand why you want to destroy the particle...
> > A particle System works great without killing particle manually... what
> > do you expect from it ?
> >
> > Vincent.
> >
> >
> > 2008/3/20, Serge Lages <[EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > The best way I found is :
> > >
> > > for (int i = 0; i < _emitter->getParticleSystem()->numParticles();
> > > i++)
> > > {
> > >      _emitter->getParticleSystem()->destroyParticle(i);
> > > }
> > >
> > > Yeah, it's a bit tricky, but it works... :)
> > >
> > > On Thu, Mar 20, 2008 at 9:12 AM, Wiedemann, Rudolf, OPS3 <
> > > [EMAIL PROTECTED]> wrote:
> > >
> > > >  Hi,
> > > >
> > > > how can I reset a particle system, so when rendering the next frame
> > > > no old particles exist any more, but only new particles are emitted?
> > > >
> > > > Thanks in advance!
> > > > Rudi
> > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [email protected]
> > > >
> > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Serge Lages
> > > http://www.tharsis-software.com
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > >
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to