Spheres, spheres it's all spheres!
by Lukas Joergensen · 05/19/2012 (12:53 pm) · 21 comments
One of the most frustrating things about the Torque3D engine from my perspective is that the particle system seems to only support spheres or sphere based emitters!
This makes it hard to create special emitters!
I have already made some work on improving the particle system in Torque 3D using the Twillex resource by Charlie Patterson. This gave me some nice particle effects like the voidSphere particle:
But i want more, even tho the particles can be animated with my resource now.
It is still spheres! So i thought, how can i extend the particle system, making it so customizeable that everyone can use it to make everything they want?
Function based emitters!
I made a very basic proof of concept video:
This is basically a particleEmitter with the function:
x=t
y=t
z=t
I hope to make some more advanced function and post them here soon!
Todo list:
I ended up using muParser by Ingo Berg to parse the expressions. (Released under MIT license)
To make the particleEmitter move like that sine curve in the video above i simply set 5 variables in my code:
Current issues is:
The t value is based on how many particles have been emitted. Causing it to reach funcMax fast on particleEmitter which spawns alot of particles and slowly on emitters with few particles, i need a general solution on this.
Cannot be edited from script yet.
It is really satisfying to work with this improved particle system! Everything is easier and it is so simple to make some really impressive effects!
Here is a video with 3 effects and a showcase of in script editing:
This makes it hard to create special emitters!
I have already made some work on improving the particle system in Torque 3D using the Twillex resource by Charlie Patterson. This gave me some nice particle effects like the voidSphere particle:
But i want more, even tho the particles can be animated with my resource now.
It is still spheres! So i thought, how can i extend the particle system, making it so customizeable that everyone can use it to make everything they want?
Function based emitters!
I made a very basic proof of concept video:
This is basically a particleEmitter with the function:
x=t
y=t
z=t
I hope to make some more advanced function and post them here soon!
Todo list:
- Make all the variables completely accessable from script
- Make composed expressions!
- Make an expression parser so you would set the function for x to something like "2t^2*sqrt(2t)+4"
- Expression variables editable from script
- Intervals
Update
Been working on this for quite a while now and the basic functions is working!I ended up using muParser by Ingo Berg to parse the expressions. (Released under MIT license)
To make the particleEmitter move like that sine curve in the video above i simply set 5 variables in my code:
xFunc = "5-sin(t/1000)*10"; yFunc = "t"; zFunc = "5+sin(t/100)*2"; funcMax = 200000; funcMin = 0;The constants are for properly offsetting the particles from the ground.
Current issues is:
The t value is based on how many particles have been emitted. Causing it to reach funcMax fast on particleEmitter which spawns alot of particles and slowly on emitters with few particles, i need a general solution on this.
Cannot be edited from script yet.
Another update
Damn... I can make so many effects with this, so easily! I wish i could show them all to you!It is really satisfying to work with this improved particle system! Everything is easier and it is so simple to make some really impressive effects!
Here is a video with 3 effects and a showcase of in script editing:
/**Waves: x = cos(t)*t*0.02 y = sin(t)*t*0.02 z = 0 Square spiral: x = cos(t/50)*t*0.02 y = sin(t)*t*0.02 z = 0 Spiral: x = cos(t/50)*t*0.02 y = sin(t/50)*t*0.02 z = 0 3D spiral (not shown): x = cos(t/50)*t*0.02 y = sin(t/50)*t*0.02 z = t*0.02 **/
About the author
IPS Bundle available at: https://www.winterleafentertainment.com/Products/IPS.aspx

Torque Owner Lukas Joergensen
WinterLeaf Entertainment
I am close to have an update ready for the resource with particle attraction on objects! You might find it interesting! About to upload some videos of it!