[osg-users] Particle Sorting

DC Fennell dchristopher at playnet.com
Wed Sep 5 15:43:47 PDT 2007


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 
  To: 'Public OpenSceneGraph Users 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




  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070905/6000e2ae/attachment-0003.htm>

More information about the osg-users mailing list