[osg-users] Particle Sorting

Zach Deedler mynamezach at gmail.com
Wed Sep 5 16:14:20 PDT 2007


If you have several smoke grenades in the same area you shouldn't see
anomalies unless they have the same exact position, or your far clip to near
clip ratio is too big.  This would make the z-buffer stretched out, and
depth tests to not be as accurate.

 

  _____  

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of DC Fennell
Sent: Wednesday, September 05, 2007 6:44 PM
To: Public OpenSceneGraph Users discussion list.
Subject: Re: [osg-users] Particle Sorting

 

Hello,

 

What if you have several smoke grenades go off in one area, where the smoke
of each intermingles with the smoke of the other?

 

When moving around, one smoke grenade takes priority (because the drawable
is sorted back to front in the transparent bin). All particles in that
drawable are drawn and overlay other smoke which may be intermingled from
the other smoke grenades. I'm not sure if my example makes sense or not. I
trust you on the bin number, but I would rather not have to create separate
bins if possible. In a large battle scene, explosions, smoke grenades, etc.
can get messy trying to determine priorities.

 

Having one particle system works, but it just seems like the wrong way to go
about this.

 

 

----- Original Message ----- 

From: Zach Deedler <mailto:mynamezach at gmail.com>  

To: 'Public OpenSceneGraph Users <mailto:osg-users at lists.openscenegraph.org>
discussion list.' 

Sent: Wednesday, September 05, 2007 5:39 PM

Subject: Re: [osg-users] Particle Sorting

 

Playing around with bin number of your model may help you in this case.  The
default bin number of models is 10.  If you set your explosion to 11 then
your explosion will have priority when they are at the same position.  This
will get rid of the anomalies, and will look better.  Trust me.

 

You can take a look at osglogo for what to set in code, but I find it easier
to do it inside the osg model (if that is what you are using).

 

 

Models are prioritized by their group and not by polygon.  I don't know of
any better way to 'blend' particle systems.

 

 


  _____  


From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of DC Fennell
Sent: Wednesday, September 05, 2007 12:20 PM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Particle Sorting

 

Hello,

 

I have several particle systems, which may be close to each other. Unless
all particles emitted are grouped and sorted as one bucket, then drawn, I
get visual anomalies. For example. If I have 3 smoke stacks (each a separate
particle system) close together, and if an explosion occurs in the middle of
the smoke stacks, it looks odd, i.e., the smoke effect may appear in front
of the explosion instead if intermingled when the smoke overlaps, depending
on your view. Running double pass does not help with this. The only solution
I can think of is to use one particle system for all effects, then sort back
to front.

 

Anyone have any other suggestions?

 

Thanks in advance


  _____  


_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070905/3ae4ff59/attachment-0003.htm>


More information about the osg-users mailing list