New Irrlicht Particle Affectors and Enhancements [BETA 2]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

New Irrlicht Particle Affectors and Enhancements [BETA 2]

Post by Dark_Kilauea »

Updated: June 22, 2008

I'm happy to present several new fancy particle affectors, along with several particle system enhancements. I hope this will be the first of several enhancements I'd like to add to the Irrlicht engine.

First up, a video introducing all the affectors:
http://www.youtube.com/watch?v=-brLc8uUeQk

Alright, now to describe each affector indepth:
  • Collision Response Affector: This affector allows for collision detection per particle at a speed that is actually useful for many effects. It has a bounce coefficient allowing for fine-tuned control over how the particles bounce.
  • Color Morph Affector: This changes the colors of particles based on a user supplied array. It supports any number of colors allowing for very specific effects.
  • Random Direction Affector: This affector adds a random direction to particles allowing for effects like wind turbulence to be achieved. It has several controls to fine-tune the effect.
  • Scale Affector: This changes the size of individual particles, allowing for effects like smoke to expand over time. Requires my custom particle enhancements to work!
  • Spline Affector: This affector simulates a spline that pulls individual particles along a path. Very powerful.
Ok, now to the particle system enhancements. In order to get the scale affector to work, I was forced to extend the functionality of the particle system itself. The changes allow for each particle to have it's own size and also store a small 8-bit user variable to allow affectors to remember particle's that have passed a condition. These changes are 100% backwards compatible with the old particle system interface. See below to get them.

Now, as I know some people won't look at this seriously unless they've seen a screeny, here you go:
Image
Can your version of irrlicht do that? Didn't think so :)

Final Note:
Please, please, please post bug reports or optimizations for these affectors or modifications. I'd like these to be as helpful as possible. Otherwise, feel free to leave any comments or other suggestions.

Thanks.

[Download Center]
Win32 Demos: http://kilauea.zxq.net/Downloads/DKNewI ... -demos.zip
Minimal Package: http://kilauea.zxq.net/Downloads/DKNewI ... inimal.zip
Full Package: http://kilauea.zxq.net/Downloads/DKNewI ... s-full.zip
Last edited by Dark_Kilauea on Thu Jul 10, 2008 8:23 pm, edited 4 times in total.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

:shock: very cool video, and thanks for sharing your modified code.

Very very useful.
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post by d3jake »

Very nice! Though it runs slow on my computer, but that's prolly due to me having extra things running in the background.
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

Post by wyrmmage »

very cool! I especially loved the flamethrower demo 8)
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Thanks for the kind words. :)

Perhaps someone can look at my code and see if there is a way to do things better than I have? Are there any other affectors or features to the existing affectors that people would like to see?
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I'll have a look, and what about submitting these extensions to the irrExt project? That's exactly the kind of things that should be developed there. Ask Zeussy or bitplane to join the project and maintain your extensions with easy access for the community.

First thing I found: Put the elements into the proper namespaces and only include the necessary stuff, not irrlicht.h.
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

I am still working on this. Things came up and stole my time atm.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Hmmm i remember i commited my scale affector but it never got integrated...to bad maybe its done this time and hopefully released in a resonable time together with a new irrlicht version.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Nice work! The flamethrower looks pretty cool, maybe we can make Team Fortress 2 in Irrlicht, gotta love the pyro xD
Image Image Image
Darktib
Posts: 167
Joined: Sun Mar 23, 2008 8:25 pm
Location: France

Post by Darktib »

Looks very good!

Very good job!
maves
Posts: 1
Joined: Thu Jun 19, 2008 8:36 am

Post by maves »

goooooood job !!! but.. there is always a 'but' ....

i couldnt compile your ScaleAffector example..

startSize is not member of irr::scene::SParticle ..

startSize dont exist in IrrLicht docs..

have you forgotten something?

mmmh how can i manage your diff file on windows !?
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

The Scale Affector will only work if you apply my patch to your copy of irrlicht and recompile the library. startSize and size are things I added to SParticle to allow for scale changes on individual particles.

I'm working on making it easier to use my affectors with irrlicht soon. I'll release updated files that people can just unzip into their 1.4.1 irrlicht copy and go from there, as well as integrating the affectors straight into the library.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

hey, thanks for the demo, looks really cool.
Image
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

[Update June 22, 08]
The project has been split into 2 packages. You can get either the full package, which features full integration into the irrlicht library, or the minimal package, which contains only what you need to use the scale affector.

The full package allows you to add one of my custom affectors with createFoo() functions built straight into the particle system scene node.
For example:

Code: Select all

 ps->createScaleAffector( core::vector2df(20,20) ); 
The minimal package will require you to add the affectors the old way.

GetFoo() and SetFoo() functions have been added to all the affectors. Several minor bug fixes and optimizations have been added as well. The documentation has also been improved, both for the affectors and the demos. I also made the affectors conform to irrlicht's namespaces, meaning that you will have to add scene:: or using namespace scene; in order to use the affectors. However, I made the headers include safe, meaning you can include them as many times as you need.

Keep in mind that the affectors in the minimal package are under a license very similar to the irrlicht one now. Please read the readme file for details. I don't foresee any problems. ;)

You can grab the new files in the first post, under the "Download Center"
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
piiichan
Posts: 59
Joined: Thu May 01, 2008 1:20 am
Location: New Caledonia (France - Pacific)
Contact:

Post by piiichan »

Are there any other affectors or features to the existing affectors that people would like to see?
Lately, I had a need for a fade in affector :roll: I think it would be easy for you (Dark_Kilauea) to implement. :)
Post Reply