Improved Particle System [feature suggestion]
by Lukas Joergensen · in Torque 3D Professional · 11/28/2012 (2:33 pm) · 20 replies
This is kind of a feature suggestion rather than a request.
I could add an improved version of the IPS Lite with some extra features, and cleaner code to T3D OS.
Some of the features are listed below.
Would the T3D OS community be interested in having these features added to the T3D repository?
I will ofc make sure that the quality of the code is on line with all other parts of the engine before pushing it to the repo!
Tbh I think T3D could use some improvements on the Particle Emitters sides which is why I started developing IPS Pro.
Features
GraphEmitters MeshEmitters Particle physics Refactored particle emitter structure which makes extending the Particle System very easy In time, more features might come along the development of IPS Pro
I could add an improved version of the IPS Lite with some extra features, and cleaner code to T3D OS.
Some of the features are listed below.
Would the T3D OS community be interested in having these features added to the T3D repository?
I will ofc make sure that the quality of the code is on line with all other parts of the engine before pushing it to the repo!
Tbh I think T3D could use some improvements on the Particle Emitters sides which is why I started developing IPS Pro.
Features
Showcase
Old patch video
MeshEmitter update video
About the author
IPS Bundle available at: https://www.winterleafentertainment.com/Products/IPS.aspx
#2
You can always contact me at LukasPJ [at] FuzzyVoidStudio [dot] com
11/30/2012 (2:55 am)
Just let me know when you figure something out :)You can always contact me at LukasPJ [at] FuzzyVoidStudio [dot] com
#3
CoD uses it, having the normal particles for up close and then displaying a seperate lower res version at distance. It's how they get all that smoke and debris in the background whilst making it look like the detailed smoke and debris in the foreground.
11/30/2012 (8:02 am)
LOD particles might be nice.CoD uses it, having the normal particles for up close and then displaying a seperate lower res version at distance. It's how they get all that smoke and debris in the background whilst making it look like the detailed smoke and debris in the foreground.
#4
But the most pressing performance problem in the current particle system is not the performance of having many high resolution particles, but rather watching many of them up close where they do a lot of overdraw. Try spawning a single sphereemitter (ParticleEmitter) and zoom in on it and you will see how the overdraw beats up your GPU
11/30/2012 (8:25 am)
Hmm I thought Torque already had an option for that..But the most pressing performance problem in the current particle system is not the performance of having many high resolution particles, but rather watching many of them up close where they do a lot of overdraw. Try spawning a single sphereemitter (ParticleEmitter) and zoom in on it and you will see how the overdraw beats up your GPU
#5
http.developer.nvidia.com/GPUGems3/gpugems3_ch23.html
12/01/2012 (5:39 am)
Do something like this, maybe?http.developer.nvidia.com/GPUGems3/gpugems3_ch23.html
#6
12/01/2012 (7:29 am)
Jeff thats already in the stock particle systems render manager :)
#7
12/02/2012 (8:45 am)
how about light emitting particles, tho idk how system heavy that will be.
#8
Generally, I would suggest not having lights on particles. I can imagine that would get really heavy so I don't think it is something we should put time into.
12/02/2012 (8:59 am)
Ah yeah someone did emit point lights instead of particles ones.. It looks nice but not sure what you would use it for.. (You can find a video of it on youtube)Generally, I would suggest not having lights on particles. I can imagine that would get really heavy so I don't think it is something we should put time into.
#9
12/02/2012 (5:23 pm)
Definitely interested in particle physics and improvements to the particle system's design. IMO, the mesh and graph emitters seem like add-on territory, but they do sound pretty great.
#10
Some of the non visible features (structural changes) is currently:
Refactored ParticleEmitter class
I refactored the ParticleEmitter class, now the ParticleEmitter class is an
abstract class, so to add a new emitter you simply inherit from the ParticleEmitter class and override the necessary functions ( most commonly how particles are emitted ) apart from making it easier to add new emitters, this also ensures that emitters can be used anywhere (GraphEmitters for footsteps woot?)
Unfortunately the MeshEmitter is not included in this ( early design choice made me eliminate the MeshEmitterNode since the mesh it emits on is a node itself, also MeshEmitters demands something to emit on so using it for footsteps is rather pointless )
ParticleBehaviours
To customize how particles interact after they have been spawned, you can now give it a list of ParticleBehaviours which changes particles behaviours.. So for example, to make particles attracted to an object, I would give them an attractionBehaviour (due to this design, parameters to the behaviour have to be defined in the behaviour itself) e.g.
@dB
Due to the nature of the refactored emitters it would be easy to exclude GraphEmitters and MeshEmitters from the MIT and then I could simply add an external download link to those emitters if that is desired :)
Also, if you are concerned that this will break alot of peoples scripts (because ParticleEmitter is renamed to SphereEmitter) I have written a tool for automatically updating script files to the new emitter class name. (I wrote it for IPS Pro but it works fine with IPS Lite aswell)
Edit:
Also for LOD and optimizations, I got some stuff in mind but I am not working on optimizations yet (last stage of development)
One of the obvious is reduce ejectionPeriod based on an offset. (Possibly increase size to compensate)
And change to a lower resolution when you are x distance away from the particle system.
12/05/2012 (4:17 am)
Just to get back at this.Some of the non visible features (structural changes) is currently:
Refactored ParticleEmitter class
I refactored the ParticleEmitter class, now the ParticleEmitter class is an
abstract class, so to add a new emitter you simply inherit from the ParticleEmitter class and override the necessary functions ( most commonly how particles are emitted ) apart from making it easier to add new emitters, this also ensures that emitters can be used anywhere (GraphEmitters for footsteps woot?)
Unfortunately the MeshEmitter is not included in this ( early design choice made me eliminate the MeshEmitterNode since the mesh it emits on is a node itself, also MeshEmitters demands something to emit on so using it for footsteps is rather pointless )
ParticleBehaviours
To customize how particles interact after they have been spawned, you can now give it a list of ParticleBehaviours which changes particles behaviours.. So for example, to make particles attracted to an object, I would give them an attractionBehaviour (due to this design, parameters to the behaviour have to be defined in the behaviour itself) e.g.
singleton AttractionBehaviour(Attracted_To_Player_BHV)
{
AttractedObjectID[0] = "player1";
AttractionMode[0] = "Attract";
Amount[0] = 20;
};
%emitter = new SphereEmitter(){
ParticleBehaviour[0] = Attracted_To_Player_BHV;
};@dB
Due to the nature of the refactored emitters it would be easy to exclude GraphEmitters and MeshEmitters from the MIT and then I could simply add an external download link to those emitters if that is desired :)
Also, if you are concerned that this will break alot of peoples scripts (because ParticleEmitter is renamed to SphereEmitter) I have written a tool for automatically updating script files to the new emitter class name. (I wrote it for IPS Pro but it works fine with IPS Lite aswell)
Edit:
Also for LOD and optimizations, I got some stuff in mind but I am not working on optimizations yet (last stage of development)
One of the obvious is reduce ejectionPeriod based on an offset. (Possibly increase size to compensate)
And change to a lower resolution when you are x distance away from the particle system.
#11
I have rewritten the raycollision code into a behaviour, now you can see how easy it is to add custom particle behaviours:
collisionBehaviour.h
collisionBehaviour.cpp
To add it to an emitter:
I'm gonna leave it here and wait for your response :)
12/07/2012 (4:11 pm)
Just another update, now that I'm seeing some movement on my IPS Pro development I can come with a few more details.I have rewritten the raycollision code into a behaviour, now you can see how easy it is to add custom particle behaviours:
collisionBehaviour.h
collisionBehaviour.cpp
To add it to an emitter:
datablock CollisionBehaviour(col_BHV){};
datablock SphereEmitterData(SampleEmitter)
{
ejectionPeriodMS = "50";
ejectionVelocity = "0";
velocityVariance = "0";
ejectionOffset = "0.2";
thetaMax = "40";
particles = "DefaultParticle";
blendStyle = "ADDITIVE";
softParticles = "0";
softnessDistance = "1";
ParticleBehaviour[0] = col_BHV;
};And now the particles will collide with objects in game!I'm gonna leave it here and wait for your response :)
#12
08/16/2013 (12:37 pm)
Owell since no one followed up on this, and it's been a while, I am formally withdrawing the offer.
#13
08/16/2013 (1:28 pm)
Having poked at light, I must say that's a pity. Could add quite a bit of useful functionality if the networking was sorted out. (You might very well have done so since you put that github repo up.)
#14
08/16/2013 (1:51 pm)
You found any networking issues? I would love it if you could report them to me, I'm still supporting IPS Lite for bugfixes etc, just wont add any of the architectural changes or new features that you can find in IPS Pro.
#15
Example at the time was having a mesh emitter spawned on a destructible object, and having a static off in the corner catch on fire, when it wasn't just flat out crashing.
Not a perfect fix, by any means, since I got roped into using a different system and couldn't finish the rest, but that github pull request from a few months back should give you a starting place for comparison.
Honestly, I figured you'd just gone ahead and fixed it for Pro, and left Light as-is.
08/16/2013 (2:13 pm)
Yes. The object ID transmission in a clientserver to client system needs to go through ghosting protocols, or the ID references get mangled.Example at the time was having a mesh emitter spawned on a destructible object, and having a static off in the corner catch on fire, when it wasn't just flat out crashing.
Not a perfect fix, by any means, since I got roped into using a different system and couldn't finish the rest, but that github pull request from a few months back should give you a starting place for comparison.
Honestly, I figured you'd just gone ahead and fixed it for Pro, and left Light as-is.
#16
08/16/2013 (7:11 pm)
We never saw a pull request... meh.
#17
As the first comment from Ron Kapaun said the committee would look into this, so just assuming they did, no one ever came with an answer so I just concluded that it was probably an unwanted change, and now that IPS is out as a commercial product I am no longer able to release this as open source (1. it would reduce the value of the products people have already bought 2. it would demand a change in documentation/commercialization model that I don't find possible at this point)
Also just to dust off my ego, I followed up on this twice, providing more information and new features to bump the thread but still no one followed up on this.
08/17/2013 (3:18 am)
@Michael.... Well this whole thread was about whether such a pull request was wanted or not. I didn't want to spend hours preparing a pull request just to get it rejected because that was not the direction you wanted to go with the particle system.Quote:Would the T3D OS community be interested in having these features added to the T3D repository?This line pretty much emphasizes my point
As the first comment from Ron Kapaun said the committee would look into this, so just assuming they did, no one ever came with an answer so I just concluded that it was probably an unwanted change, and now that IPS is out as a commercial product I am no longer able to release this as open source (1. it would reduce the value of the products people have already bought 2. it would demand a change in documentation/commercialization model that I don't find possible at this point)
Also just to dust off my ego, I followed up on this twice, providing more information and new features to bump the thread but still no one followed up on this.
#18
08/18/2013 (6:45 am)
Sorry, from my notes we had actually discussed this at a steering committe meeting. I was concerned about code quality based on the iteration of IPS that was added to the T3D CE. Dave was concerned about it introducing changes just to make installation of your pack easier. I can't speak for Ron for why he didn't follow up with you, but keep in mind that we don't always see every single forum post... the only reason I even looked at this thread was because I accidentally clicked on it on my phone.
#19
I would LOVE to see your changes go into T3D even if it made your pack easier to install (whats the problem with that?)
P.S. I already own IPS and wouldn't mind it going free if that would get it into T3D, can't speak for anyone else though..
08/18/2013 (4:32 pm)
well I as a user of Torque3D and not a member of the committee know for a Fact the committee don't always make the correct decision, for example they would rather have a quite bad bug visible than not visible in the in vain hope someone would rewrite a big section of C++ rather than add 3 lines of torque script.I would LOVE to see your changes go into T3D even if it made your pack easier to install (whats the problem with that?)
P.S. I already own IPS and wouldn't mind it going free if that would get it into T3D, can't speak for anyone else though..
#20
The architectural changes is what (IMO) makes the IPS awesome, as soon as the architectural changes have been made, the rest is just plug and play.
Edit: Btw don't know if I can figure out a commercially sane way to release this free at this point.. I can look into it but don't expect any news within a few months, it's a quite complicated situation.
08/18/2013 (5:00 pm)
Tbh it would make the pack easier to install... Because it's about 60% of the pack lol so naturally it would be easier to install.The architectural changes is what (IMO) makes the IPS awesome, as soon as the architectural changes have been made, the rest is just plug and play.
Edit: Btw don't know if I can figure out a commercially sane way to release this free at this point.. I can look into it but don't expect any news within a few months, it's a quite complicated situation.
Associate Ron Kapaun
3tdstudios.com
I will put it to the rest of the committee and see what they think. Excellent offer. More to follow.
Ron