Hi Tim, 

Looks like this didn't go to the mailing list.  So, here it is again.

> -----Original Message-----
> From: Tim Moore [mailto:[email protected]] 
> 
> Hi,
> Sorry to have dropped this on the floor; I missed your 
> response below.

Thank you for responding.

> I took a look at your examples, especially 
> the one that is now broken. I see that what you were doing is 
> quite similar to what the September patch does: construct a 
> frame of reference for the ModularEmitter that is relative to 
> ParticleSystem frame, even though it is rooted to the global 
> frame in the scene graph. You end up doing the particle 
> creation calculations in a frame that doesn't blow out float 
> precision.

That's close.  The intent is, as you say, to avoid blowing out float
precision.

> The September code makes the assumption that the 
> ModularEmitter and ParticleSystem are both in "real" 
> coordinate frames, which seems reasonable to me.

I'm not sure what you mean by "real" coordinate frames.  I would not put
them in the same coordinate frame for the effect I want.  See the jalopy
description below.

> 
> Both our methods require that the ParticleSystem be placed 
> and moved to avoid precision errors. In FlightGear I manually 
> change the coordinates of the particles when the 
> ParticleSystem is moved.

In the pre-September ModularEmitter code I lock the part of the graph
with ParticleSystem drawables in place with a MatrixTransform.  When the
model moves the ParticleSystem drawables don't.  The ModularEmitters use
part of the model's MatrixTransform and part of the ParticleSystem
drawable's locked MatrixTransform.  In short, managing the
ModularEmitter.  This is what I think you're trying to avoid.

Are you managing the particles created by the ParticleSystem drawables
instead of the ModularEmitter?

> I suppose you might be able to get 
> around this in some situations by playing with the velocity 
> vector of the emitted particles,

Not a general solution.

> but I like my approach 
> better because the ModularEmitter does not need to be 
> managed; it can simply be attached to the object from which 
> the particles are emitted. I recommend that you attach the 
> ModularEmitter to your model.

It's the difference between cigarette smoke inside an old jalopy moving
with the jalopy vs. the burning oil smoke from the tail pipe that, once
emitted, no longer moves with the jalopy.  I'm trying to do the
equivalent of the later.  I can do this without managing ModularEmitter
and attaching it to the model except I get precision problems with
particles.

So, one of the following must be true:
1. Your particles always move with the model when the model moves.  The
cigarette smoke in the jalopy.  No management of ModularEmitters or
ParticleSystem drawables.
2. When your model moves you do a transform on every particle; even if
there are many thousands.  The burning oil smoke from the tailpipe.
Managing ParticleSystem drawables and particles, not managing
ModularEmitters.
3. Or, I still don't understand your use of particle effects.

How would you take the original particle.osg, move it 600000 meters and
get it to work as I show in particle_move_6M_new_code.osg without the
precision problems?


I have access to a copy of FlightGear 1.9.1.  Is there someplace in the
FlightGear code I can see how you're managing the ParticleSystems?  Or,
not managing the ModularEmitters?

----
Tom Jolley

> 
> Jolley, Thomas P wrote:
> > So, where does that leave us?  What breaks by reverting the 
> September 
> > changes on ModularEmitter.cpp?  Do you have an example of 
> your usage?
> > 
> > Traversing the hierarchy to get double precision world matrices and 
> > applying it to single precision particle systems causes precision 
> > problems for my usage.  Reverting the change helps me.
> One of the changes I made was to do the emitter particle 
> placement calculations in double precision. In any case, 
> someone has to manage the particle system so that the results 
> will fit in single precision variables.
> 
> Tim
> > 
> > ----
> > Tom Jolley
> > 
> > 
> >> -----Original Message-----
> >> From: Tim Moore
> >> FYI, my change wasn't intended to solve particle precision 
> problems 
> >> by itself, merely support an approach where the particle system is 
> >> not rooted in the world frame of reference. Application 
> management of 
> >> the particle system transform is still needed. Before my 
> submission 
> >> that seemed to be broken.
> >>
> >> Tim
> >>
> > _______________________________________________
> > 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

Reply via email to