Hi Tom,

I wouldn't expect the cessnafire.osg model to work under a moving
MatrixTransform, this is a known attribute of osgParticle - you have
to move the ParticleSystem outside of any moving models, you can't
leave it from within the moving subgraph otherwise the particles get
transformed twice.

The osgparticleeffects example illustrates how to handling moving
models and particle systems.

In your own case I don't know what to make of the issues, could it be
that you aren't constructing your particle system appropriately for
moving models, or is it that you have a genuine precision issue that
is unrelated to the moving model issue?  Tim's submission was intended
to address some of the precisions issues, so it's disappointing that
in some usage case it might have made things worse.  Reverting this
change would break the problem Tim was trying to solve though, so I'm
very reluctant to do this without clear illustration of problems and a
solution that addresses both the issues you are seeing and the ones
that Tim was seeing.

Unfortunately not being the original author of osgParticle I don't
have a 100% clear picture of the internal implementation so am
effectively in the same boat as everyone else - I just have to read
the code and try and make sense of it.

Robert.

On Wed, Apr 22, 2009 at 6:35 PM, Jolley, Thomas P
<[email protected]> wrote:
> Hi Robert,
>
> A little late but I just noticed this change has broken particle effects
> in my application.  When I tried to change my application to work with
> this change I get problems with floating point precision on the
> particles.  I don't think this change is the correct solution for fixing
> floating point precision problems with particle effects.  It's better
> done at the application level by separating out non-particle system
> nodes, particle processors, and the geodes where particles are placed.
> An appropriate MatrixTransform can be placed above each new graph to
> resolve the precision issues for the particular frames of reference.
> Perhaps Tim Moore can explain further the problem he was trying solve by
> giving us an example.
>
> Here are some examples of how this change looks like it might work and
> how it doesn't work using the cessnafire.osg model.
>
> 1.  How it looks like it might work.  Load the cessnafire.osg model and
> put it under a MatrixTransform.  Using the MatrixTransform, move the
> model to about 6M meters.  Watch the particle effects when the model is
> slowly translated using the MatrixTransform.  The precision of the
> particles look good.  The particles are emitted from the correct
> location from the model.  The particles once emitted move with the
> MatrixTransform when they should stay fixed to the world coordinate
> system.
>
> 2.  How it doesn't work.  Load the cessnafire.osg model and put it under
> a MatrixTransform.  Put the MatrixTransform under a Group.  Move the
> Geodes where particles are placed so that they are under the top Group
> node.  You may as well move the ParticleSystemUpdater under the top
> Group node.  Moving the model out to 6M meters and slowly translate the
> model using the MatrixTransform.  The precision of the particles is bad.
> The particles are emitted from the correct location but possibly the
> wrong direction due to precision problems.  The particles once emitted
> stay fixed to the world coordinate system as I would expect.
>
>
> -----Original Message-----
> From: Robert Osfield [mailto:[email protected]]
> Sent: Thursday, September 18, 2008 5:12 AM
> To: OpenSceneGraph Submissions
> Subject: Re: [osg-submissions] osgParticle ParticleSystem and
> ModularEmitterin different coordinate systems
>
> Thanks Tim, I've merged your changes, and also added a
> Drawable::getWorldMatrices(const Node*) method and tweaked your code to
> use this rather than needing to use getParents(0) and then
> getWorldMatrices() as getParents(0) could in theory be null (although in
> a correctly set up scene it won't be).
>
> Could you do an svn update and test out my changes, Robert.
>
> On Wed, Sep 10, 2008 at 9:39 AM, Tim Moore <[email protected]> wrote:
>> Hello,
>> This submission fixes a bug when the ModularEmitter and ParticleSystem
>
>> are in different frames of reference. Specifically, it supports the
>> case where the ParticleSystem is not in the world frame. One way this
>> can come up is if your world coordinate system is Earth-centric; the
>> float coordinates of particles don't have enough precision to avoid
>> terrible jitter and other rendering artifacts, so it's convenient to
>> root the particle systems in a local Z-up coordinate system that gets
> moved around from time to time.
>>
>> I haven't touched the rotation and angular velocity properties of
> particles.
>> IMHO they are pretty broken, dealing in Euler angles and such, and I
>> see that they aren't used in the rest of the particle system code.
>>
>> Tim
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscene
>> graph.org
>>
>>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegr
> aph.org
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to