Particles in an Octree

Started by
1 comment, last by MickeyMouse 18 years, 9 months ago
Ive recently got my Octree working with my particle system, now Im able to have multiple different emitters and particles mingling together and still have correct culling and alpha sorting. Even though I still have many optimizations to make it obviously eats the CPU when the particle number increases because of all the dynamic updates for the particle position. I could remove the particles from the octree and frustrum check each particle, or I could add a bounding volume into the octree to represent the emitters maximum bounding area, then only frustrum check the particles in the frustum when there emiiters bounding volume is inside the frustum. Does anyone know of a better way of culling/alpha sorting particles?
Advertisement
The lame answer: use additive blending, and don't sort at all ;)

On a more serious note, if your viewpoint doesn't differ much from one frame to the next (you could test for this), you could consider not sorting every frame, or doing a single-pass bubblesort (quite fast if the order of your particles is almost right).
Store particles in some bounding boxes and use radix sort if you need to have them sorted. Using bubble or insertion sort, as suggested, might also be good to have your particles "almost" sorted most of the time.
Maciej Sawitus
my blog | my games

This topic is closed to new replies.

Advertisement