Particle System Improvements

Threads related to Google Summer of Code
Post Reply
Tenttu
Halfling
Posts: 74
Joined: Mon Dec 13, 2004 1:56 pm

Particle System Improvements

Post by Tenttu » Sat Mar 17, 2007 12:08 pm

More information:
http://www.students.tut.fi/~valkone8/SoC2007.pdf

General
Ogre has had for a long time a feature rich particle system implementation. However the newest advancements in hardware development and implementations of totally new kinds of options for graphic development has left holes to the old and stable particle system. There are multiple improvements that can be done for the system and I represent these more closely below.

Project Details
GPU Particles
Particle systems, especially on GPU, are divided into 2 different categories, stateless and state-preserving particle systems. Stateless implementation simply just updates the vertex positions of the particles, generating simple, but very fast particle systems.
The idea behind state-preserving systems is to store information about the state of the particle system. Information that is usually stored is position, velocity and some other data, like time of live etc. Hardware requirements for these kind of systems are floating point buffers and vertex texture support. Even complex effects can be handled with this system for example collisions, but collision against polygon soup is not efficient on GPU, which means that collision can't really be used on real-life production, only on some small demonstrations.

In this section goals for the SoC in order are:
- Implementing simple stateless particle system
- Benchmarking stateless particles against traditional system
- Implementing state-preserving systems, with most important features of the current system like fade out etc. Still keeping the implementation simple. This requires SM 3.0 hardware.
- Benchmarking state-preserving system against stateless particle system and traditional implementation.
- Demo that shows the advantages of GPU particles.

Multithreaded Particles
Multithreaded particles are the newest field of particle systems following the release of multi core CPUs. The basic idea behind multithreaded particle system is to update the movement and other changing parameters equally on each core of CPU. This can dramatically improve the speed and makes it possible to create more complex particle effects.

In this section goals for the SoC in order are:
- Implementing multithreading into current particle system.
- Benchmarking multithreaded system against traditional one.

Improvements to Particle script
Additions to particle scripting would have to be made to support the new implemented features.

billboard_type script value would be extended with settings vertex_shader and geometry_shader. These would activate the GPU based particle systems.

Also a setting mesh would be useful to use meshes as particles, syntax could be following:
billboard_type mesh gravel.mesh

Ability to store multiple particle systems into one â€
Last edited by Tenttu on Tue Mar 20, 2007 10:49 pm, edited 2 times in total.
0 x

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
Contact:

Post by tuan kuranes » Sat Mar 17, 2007 2:37 pm

Just to point out spookyboo's work and plans with FX_plugin.
0 x

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Sat Mar 17, 2007 3:35 pm

Spookyboo looks like the perfect mentor for this project :)

I'm intrigued about the particle pooling. Ogre already supports this. What plans do you have about it?
0 x
Image

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 3

Post by syedhs » Sat Mar 17, 2007 4:32 pm

Yes.. spookyboo is the first name comes to my mind upon seeing this thread :) The idea is nice, but should be made so that Spookyboo's code and the code from SOC are not redundant. Spookyboo is obviously the best mentor for this, but I am not sure whether the mentor application is still available. Plus it is his prerogative - time and commitment are needed here.
0 x

Tenttu
Halfling
Posts: 74
Joined: Mon Dec 13, 2004 1:56 pm

Post by Tenttu » Sat Mar 17, 2007 6:47 pm

I'm intrigued about the particle pooling. Ogre already supports this. What plans do you have about it?
I meant a system that also pools particle systems, when needed. Mainly refering to the help request
"Threadsafe small object allocators and pool management. Defined memory regions with budgets and pool settings."
This is after all what you need to do if you want to seriously use particle systems, but might be a bit out of Ogre's scope though? As it might be more beneficial to pool the higher level objects using particle systems.
0 x

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1140
Joined: Tue Jul 06, 2004 5:57 am
x 15
Contact:

Post by spookyboo » Sat Mar 17, 2007 11:51 pm

Tenttu, great idea to improve Ogre's particle system. That is also the reason why I'm creating a new particle system from scratch. My particle system is meant to be an addition to the current particle system and not a replacement.

syedhs is right about redundant activities. A number of things you have listed are also the things I want to investigate and integrate in my plugin, although my progress is a bit slow. I can't even think about mentoring, because I have very little time :cry:, but I'm willing to help as much as I can.

Some thoughts:
- Multi-threading is number one on the list of needed features imo.
- Something to investigate is the ability to create new emitters and affectors more dynamically (by means of a script). Often the code is very simple, but you have to create several new files for it and add some code here and there.
- Interaction of particles with the environment is very needed. I'm working on it also, but I think my first release will be a low-profile implementation.
- About new affectors: Flocking and fluid (like) simulations would be interesting
- Regarding the new script parsing system: I'm using it, but its important to think about its usage carefully. The way it is used in the Material- and Compositor- compiler doesn't really fit in the case of the Particle System, because of its extensibilty. I have struggled with it for some time and the solution I use still doesn't feel completely right.

Thanks for the links btw. :lol:
0 x

Tenttu
Halfling
Posts: 74
Joined: Mon Dec 13, 2004 1:56 pm

Post by Tenttu » Sun Mar 18, 2007 1:58 pm

Seems I have missed some of the progress/goals of FXPlugin/ParticleUniverse. I always thought it was just a general effect plugin, using Ogre's systems. Also will the license be compatible with the new additional license (static linking)?
- Multi-threading is number one on the list of needed features imo.
I agree, multithreading would be pretty high on my priority list also. Altough there is also places were GPU particles are useful. Of course they won't give that much control and fancy effects, but are very fast for simple particle effects and especially when geometry shaders are implemented, GPU particles will have their place.
- Something to investigate is the ability to create new emitters and affectors more dynamically (by means of a script). Often the code is very simple, but you have to create several new files for it and add some code here and there.
There is definately things to improve with particle scripting, but it becomes hard if you try to keep it backward compatible.
- Regarding the new script parsing system: I'm using it, but its important to think about its usage carefully.
I have worked with it on some extend, but have to say that I totally agree with you. It's on my list as I assumed it will be changed someday and it would probably be a good idea to tackle it, before any complex addons are made for the system.
syedhs is right about redundant activities. A number of things you have listed are also the things I want to investigate and integrate in my plugin, although my progress is a bit slow.
Of course there is no idea to do things twice as long as the licenses are compatible, but for sure there is enough work to be done. Also most of the improvements I proposed should be imo included with main ogre for easy of use to all users.


[edit]
Spherical billboards would also definately have their place in Ogre. Some engines call them as "Soft Particles" seen in Cryengine2 for example.
http://www.gametrailers.com/umwatcher.php?id=11693
[/edit]
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7152
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 19

Post by Kojack » Mon Mar 19, 2007 6:24 am

Combining the ogre particle system with the particle library from http://www.cs.unc.edu/~davemc/Particle would be very interesting (something I've been planning on doing for ages, but never have the time).
0 x

User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US

Post by xavier » Mon Mar 19, 2007 6:36 am

My suggestion for advanced particles is to try to bring them more in line with the particle system capabilities in 3D tools like Max.
0 x
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.

Tenttu
Halfling
Posts: 74
Joined: Mon Dec 13, 2004 1:56 pm

Post by Tenttu » Tue Mar 20, 2007 10:58 pm

A deeper description about the proposal is now written and changed as the first post. Feedback about the current list would be nice.
My suggestion for advanced particles is to try to bring them more in line with the particle system capabilities in 3D tools like Max.
What exactly does Max support that can't be done with Ogre's particle system?
0 x

boros000
Gnoblar
Posts: 1
Joined: Tue Mar 27, 2007 8:04 pm

Shader Programming

Post by boros000 » Tue Mar 27, 2007 8:07 pm

I have just one question,

I want first just to multiple to int numbers.How should i start.
0 x

futnuh
Goblin
Posts: 225
Joined: Sun Sep 25, 2005 3:22 am
Location: Calgary, Alberta

Post by futnuh » Wed Mar 28, 2007 12:20 am

xavier wrote:My suggestion for advanced particles is to try to bring them more in line with the particle system capabilities in 3D tools like Max.
Ahem, don't you mean Houdini? :-)

I would strongly urge people interested in extending Ogre's particle system to look at Houdini. Its inherent proceduralism maps very easily to a code implementation.
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Wed Mar 28, 2007 10:21 am

I would also like to add that animated billboard particle should be supported. I worked with a few artist who asked for that feature in Ogre.

When I say animated billboards, I mean animated per particle instance. NOT using material hack. That means we can set a particle start frame and end frame where the frame will animate base on it's particle life. Really nice effect for explosion, fire and such. ;-)
0 x

Tenttu
Halfling
Posts: 74
Joined: Mon Dec 13, 2004 1:56 pm

Post by Tenttu » Thu Mar 29, 2007 9:43 am

I would strongly urge people interested in extending Ogre's particle system to look at Houdini. Its inherent proceduralism maps very easily to a code implementation.
The particle page at Houdini's site doesn't really describe the system very deeply. Lots of features also seems rather hard to be implemented in real-time system, but the rules based simulation got me interested. Is there anywhere more information/documentation about that?
I would also like to add that animated billboard particle should be supported.
This would be a really good addition. Implementation could be done by moving uv coordinates of the particle triangles according to the animation and storing all the animation frames into one texture.
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Thu Mar 29, 2007 3:58 pm

Tenttu wrote:
I would also like to add that animated billboard particle should be supported.
This would be a really good addition. Implementation could be done by moving uv coordinates of the particle triangles according to the animation and storing all the animation frames into one texture.
Yep. Exactly what I was thinking :-) Infact, Ogre's billboard already support uv grid system to have animation frames in one texture. Hence this feature is already very possible. I once had in mind to extend a subclassed particle renderer to do this. But thanks to ogre's billboard particle not using protected virtual functions, it wasn't possible at all. Guess it's still best to extend ogre directly. :-)
0 x

azrialelf
Gremlin
Posts: 155
Joined: Wed Jul 11, 2007 2:43 am

Re: Particle System Improvements

Post by azrialelf » Thu Feb 24, 2011 6:05 am

When I say animated billboards, I mean animated per particle instance. NOT using material hack. That means we can set a particle start frame and end frame where the frame will animate base on it's particle life. Really nice effect for explosion, fire and such. ;-)
I realize this is a very old thread, but was any sort of feature like this implemented? I could REALLY use it for my game right about now.... Trying to make a cool fire/smoke effect and have a fantastic image sequence to use, but I need each particle to have it's own instance of the material so it looks right.
0 x

Post Reply