T2D Particle Tutorial
by Matthew Langley · 04/02/2005 (9:12 pm) · 11 comments
Lets create a new particle effect!
ok... fire up the particle editor (by hitting "F11" in the engine)...
click the "New..." button
you should see the follow menu, click "Yes".

Ok lets start with an idea... say we just want some very basic explosion... where fire shoots in all direction and we get a
simple smoke puff in the center, it could be for anything that explodes...
ok... first let me introduce you to some ideas of a Particle in T2D... we have the Particle "effect" and particle
"emitters"... now the effect is the overall particle effect that you save off... emitters are part of the effect, a particle
effect can have multiple emitters, this creates some very powerful particle effects that look amazing... ok lets start
by adding our first emitter...
click "Add" (like the picture)

You should see a menu that says "Emitter Name"... now what shall we name it... choose what you want, though I will call it
"BOOM", simple lol... ;)

ok after clicking create you should see "BOOM" under the "Emitters:" list... you have just created your first emitter ! Ok
yippee, nothing is happening still lol... lets fix that... Left click "BOOM" and then left click EDIT... you should see a
menu like this

Ok this can be scarey, but don't worry about all these options, I will just cover what we need for our effect... first thing
we need is some sort of image... click on the empty box next to "ImageMap" like this picture

you should then get a dropdown... select particle1ImageMap... like this

now you should see fire shooting in a circle... ok we're getting somehwere, but a couple things, for one its too small and
they go too far, two we don't want fire shooting in a circle lol... ok
lets solve the simplest first... that the particles are shooting too far... now this can be a couple things... speed of the
particle... as well as the life... if you look down on the left side you should see "Graph Field:".. and
"particlelife_base"...

now coincidentaly this might be what we need... scroll down all the way.
now we can see more options... the "Graph Field:" is where the true power in the particle editor is.
you should see this right now

Ok now the thing to notice is the info under "Key(s) - Time/Value"...
ok so what does that "0.000000 2.000000" mean ? (you may or may not be asking)
0 represents the time and 2 represents the value... this means at 0 time it will be 2 life... lets change that... left click
it then click edit
you should get a pop-up that allows you to change the 2.000000... change it to 0.5, like this

now click save... you should see a much better result... now you get a starting idea of how this works... but it gets
better... however, particlelife_base is not the best setting to explain this... so lets move to another problem... the size,
these are way too small, click on "particlelife_base" and you should get a drop down... go down to "sizey_base"...

and click it, you should get the same thing we first got with particlelife_base....
"0.000000 2.000000" ... well thats definately too small... left click that entry, then click edit... change the number to
"10"

now click save... but you notice nothing happens... why? because this is just the "y" size... now click "sizey_base" and go
down to "sizex_base"... click the entry (should be the same 0 and 2 values) and click edit again... change that to "10" like
this

now click save and you should get a much different result :)
now are size reflects what we want... the reason is because "Fixed Aspect" is selected by default, this means it will keep
the ratio the same, if we took that off we could skew the image... so its working well now... hmm except now its just a
bunch of fireball looking things shooting out... still in a circle of course... first thing lets talk about what we did... we
changed it so it goes to the value of "10" at time "0" for both x and y... well what if we made the size get smaller... to
do this we need to look at a new value, "sizex_life"... think of this as practically sizex_scale... if you click the dropdown
and go to "sizex_life" you should see this

so basically we have it set to value scale of "1" at "0" time... this means its full scale when it starts... so what we want
to make it shrink some by the end
that would simply be adding a new value at a later time... lets try that... click the "add button"
now you should see an entry for "Key Time" and "Key Value"...set the time to "1.0" and lets make the size decrease by half,
so st the value as "0.5", it should look like this

now click "Create"
now you should see it shrink to half the size... now the effect is looking better, as you can see as you throw on different
effects it can get tweaked to look better and better. On that note I'll show you another spiffy little visual tweak... right
now the fireballs just shoot out and shrink then disapear instantly... what we really want is it to fade out quickly at the
end, like a real explosion... ok... now click "sizex_life" and change it to "visibility_life"... (all the way at the top)...
it should already have a basic 0 time 1 value entry...
ok now lets try something a little more fancy... click add... for time put 0.5 (halfway through the life)... then for value
put "1"... that way we know halfway it will still be fully visible... click add again and put "1" for time (when its life
end) and "0" for value... that way halfway through the particles' life it will begin to fade and by the end of the life it
should be completley faded.... click create on the last entry and you should see it fade out halfway through the life of
the particle... you should see something like this

Ok so we're getting somewhere, though still not quite the effect we want... we want an explosion, we still have a bunch of
spinning fireballs lol, albeit they are now a little more "pretty"... a few more things we need to modify... we need it to
shoot the particles out "at once" and we need it to die down afterwords... since they are tied to eachother lets tackle the
second one first... the effect of having them all go at once will be hard to do without the effect dieng out at the right
time, best to do things in the best order, that way we don't have to re-cover the same ground.
click the Effect button, like this

This will take you back to the effect option... these options change the settings for the entire "effect"... this is where we
will want to specify how long the whole effect goes...
click on the Graph Field: drop down, just like you do in the emitter settings... and go to "quantity_scale" affect clicking
it you should see something like this

as you can see it starts out as a quantity of "1"... so the goal will be to setting the quantity to 0 at the correct point...
To do this we need to add two new keys...
the first key will be at time 0.09 and value set at 0.5...
the second key will be at time .1 at the value of 0...
that way we ensure at .09 the effect will be lowered to half and then will stop
you should have keys that look like this

As you may have noticed the effect sends a spark off and then stops... since we set a time for it to stop it no longer
loops... to test the effect you can click the "trigger" button... ok so now the last thing we need to do with this emitter is
make it shoot off a bunch of flames...
click "BOOM" again and click "Edit" again
you should be back to the settings we've been at for a long time... click the Graph Field: drop down and go down to
quantity_base ... you should see something like this

as we already know, 10 isn't enough, try clicking the 0 time and value 10 key... then click edit... and change the value to
200... you should have something like

now click trigger a few times to test it out... not a bad little explosion, later you can tweak this more to your liking,
maybe increasing the starting size of the explosion, the speed, etc etc...
right now we will move on to the second part of the explosion, the smoke puffs, this will add a lot of realism to the
explosion
The Smoke!
ok... click the "Effect" button to get back to the overall effect settings again... As you should see you have one emitter,
called BOOM... now click "Add" and name this new emitter "PUFF"
now select this emitter and click "Edit"...click the drop down to the left of the label "ImageMap"... scroll to
"particles5ImageMap" leave the Frame at 0
right now if you hit trigger you wont see any difference for a couple reasons, for one the default size is too small as well
as the quantity, remember our effect only lasts from 0 - 0.1, we had to pump the fire quantity up to 200 to get it to show
correctly... so lets increase the quantity to about 50... (by now you should know you can do this by clicking the Graph
Field: dropdown and going to quantity_base and making it look like this

and then going to the sizex_base and changing it to 15 like this

since you know this I didn't just instruct you ;) )
now if you hit trigger you should get at least some visible smoke intermingled with the fire...
we want the smoke to do a couple things... for one we want it to stay put for the most part, maybe move at a very slow
speed and then we want it to fade smoothly out (maybe even shrink in size)
lets tackle the first... lets change its speed... go to speed_base and change it to 0.5 like this

if you hit trigger it moves at a much better speed, though lives way to long compared to the other particles
go to particlelife_base and change the 0 value to .75 ... remember the BOOM was set to 0.5 so we have this one last a
little longer, the effect we want is having the smoke fade slowly... the key setting should look like this

ok so we have the life changed to match the effect better... now we need to make it fade out properly... change the Graph
Field: to visibility_life... and add a key at time "0.5" of a value of ".25"... then a key at 0.75 time and value of 0...
that way by the time the fire dies down the smoke is at .25.... then it dies off in the next .25
it should look like this

now click Trigger and you should see a much more complete effect... now we have a puff of smoke that fades out nicely, with
fire that shoots out in all directions... now you can go back and tweak the settings for each of these to your liking,
change out images, even add more emitters.
Before you start modifying... you need to save your effect out... click "Effect" to go back to the main effect.
Scroll up if needed... and click on Save... put the name you want to save in the prompt that is loaded... like this

then click save... now it should be saved in the appropriate folder (whichever one is specified)... one thing to remember,
currently when you save an effect out you cannot reload it back in with "Load" until you restart T2D... just a simple
quirk...
well this should get you started... and probably get your imagination going... the names are pretty self explanitory once you
understand these basics... enjoy and don't forget to post your progress pics in the "Show Off!" forum !!! can't wait to see
the results... hope you enjoyed
- Matthew "King BoB" Langley
ok... fire up the particle editor (by hitting "F11" in the engine)...
click the "New..." button
you should see the follow menu, click "Yes".
Ok lets start with an idea... say we just want some very basic explosion... where fire shoots in all direction and we get a
simple smoke puff in the center, it could be for anything that explodes...
ok... first let me introduce you to some ideas of a Particle in T2D... we have the Particle "effect" and particle
"emitters"... now the effect is the overall particle effect that you save off... emitters are part of the effect, a particle
effect can have multiple emitters, this creates some very powerful particle effects that look amazing... ok lets start
by adding our first emitter...
click "Add" (like the picture)
You should see a menu that says "Emitter Name"... now what shall we name it... choose what you want, though I will call it
"BOOM", simple lol... ;)
ok after clicking create you should see "BOOM" under the "Emitters:" list... you have just created your first emitter ! Ok
yippee, nothing is happening still lol... lets fix that... Left click "BOOM" and then left click EDIT... you should see a
menu like this
Ok this can be scarey, but don't worry about all these options, I will just cover what we need for our effect... first thing
we need is some sort of image... click on the empty box next to "ImageMap" like this picture
you should then get a dropdown... select particle1ImageMap... like this
now you should see fire shooting in a circle... ok we're getting somehwere, but a couple things, for one its too small and
they go too far, two we don't want fire shooting in a circle lol... ok
lets solve the simplest first... that the particles are shooting too far... now this can be a couple things... speed of the
particle... as well as the life... if you look down on the left side you should see "Graph Field:".. and
"particlelife_base"...
now coincidentaly this might be what we need... scroll down all the way.
now we can see more options... the "Graph Field:" is where the true power in the particle editor is.
you should see this right now
Ok now the thing to notice is the info under "Key(s) - Time/Value"...
ok so what does that "0.000000 2.000000" mean ? (you may or may not be asking)
0 represents the time and 2 represents the value... this means at 0 time it will be 2 life... lets change that... left click
it then click edit
you should get a pop-up that allows you to change the 2.000000... change it to 0.5, like this
now click save... you should see a much better result... now you get a starting idea of how this works... but it gets
better... however, particlelife_base is not the best setting to explain this... so lets move to another problem... the size,
these are way too small, click on "particlelife_base" and you should get a drop down... go down to "sizey_base"...
and click it, you should get the same thing we first got with particlelife_base....
"0.000000 2.000000" ... well thats definately too small... left click that entry, then click edit... change the number to
"10"
now click save... but you notice nothing happens... why? because this is just the "y" size... now click "sizey_base" and go
down to "sizex_base"... click the entry (should be the same 0 and 2 values) and click edit again... change that to "10" like
this
now click save and you should get a much different result :)
now are size reflects what we want... the reason is because "Fixed Aspect" is selected by default, this means it will keep
the ratio the same, if we took that off we could skew the image... so its working well now... hmm except now its just a
bunch of fireball looking things shooting out... still in a circle of course... first thing lets talk about what we did... we
changed it so it goes to the value of "10" at time "0" for both x and y... well what if we made the size get smaller... to
do this we need to look at a new value, "sizex_life"... think of this as practically sizex_scale... if you click the dropdown
and go to "sizex_life" you should see this
so basically we have it set to value scale of "1" at "0" time... this means its full scale when it starts... so what we want
to make it shrink some by the end
that would simply be adding a new value at a later time... lets try that... click the "add button"
now you should see an entry for "Key Time" and "Key Value"...set the time to "1.0" and lets make the size decrease by half,
so st the value as "0.5", it should look like this
now click "Create"
now you should see it shrink to half the size... now the effect is looking better, as you can see as you throw on different
effects it can get tweaked to look better and better. On that note I'll show you another spiffy little visual tweak... right
now the fireballs just shoot out and shrink then disapear instantly... what we really want is it to fade out quickly at the
end, like a real explosion... ok... now click "sizex_life" and change it to "visibility_life"... (all the way at the top)...
it should already have a basic 0 time 1 value entry...
ok now lets try something a little more fancy... click add... for time put 0.5 (halfway through the life)... then for value
put "1"... that way we know halfway it will still be fully visible... click add again and put "1" for time (when its life
end) and "0" for value... that way halfway through the particles' life it will begin to fade and by the end of the life it
should be completley faded.... click create on the last entry and you should see it fade out halfway through the life of
the particle... you should see something like this
Ok so we're getting somewhere, though still not quite the effect we want... we want an explosion, we still have a bunch of
spinning fireballs lol, albeit they are now a little more "pretty"... a few more things we need to modify... we need it to
shoot the particles out "at once" and we need it to die down afterwords... since they are tied to eachother lets tackle the
second one first... the effect of having them all go at once will be hard to do without the effect dieng out at the right
time, best to do things in the best order, that way we don't have to re-cover the same ground.
click the Effect button, like this
This will take you back to the effect option... these options change the settings for the entire "effect"... this is where we
will want to specify how long the whole effect goes...
click on the Graph Field: drop down, just like you do in the emitter settings... and go to "quantity_scale" affect clicking
it you should see something like this
as you can see it starts out as a quantity of "1"... so the goal will be to setting the quantity to 0 at the correct point...
To do this we need to add two new keys...
the first key will be at time 0.09 and value set at 0.5...
the second key will be at time .1 at the value of 0...
that way we ensure at .09 the effect will be lowered to half and then will stop
you should have keys that look like this
As you may have noticed the effect sends a spark off and then stops... since we set a time for it to stop it no longer
loops... to test the effect you can click the "trigger" button... ok so now the last thing we need to do with this emitter is
make it shoot off a bunch of flames...
click "BOOM" again and click "Edit" again
you should be back to the settings we've been at for a long time... click the Graph Field: drop down and go down to
quantity_base ... you should see something like this
as we already know, 10 isn't enough, try clicking the 0 time and value 10 key... then click edit... and change the value to
200... you should have something like
now click trigger a few times to test it out... not a bad little explosion, later you can tweak this more to your liking,
maybe increasing the starting size of the explosion, the speed, etc etc...
right now we will move on to the second part of the explosion, the smoke puffs, this will add a lot of realism to the
explosion
The Smoke!
ok... click the "Effect" button to get back to the overall effect settings again... As you should see you have one emitter,
called BOOM... now click "Add" and name this new emitter "PUFF"
now select this emitter and click "Edit"...click the drop down to the left of the label "ImageMap"... scroll to
"particles5ImageMap" leave the Frame at 0
right now if you hit trigger you wont see any difference for a couple reasons, for one the default size is too small as well
as the quantity, remember our effect only lasts from 0 - 0.1, we had to pump the fire quantity up to 200 to get it to show
correctly... so lets increase the quantity to about 50... (by now you should know you can do this by clicking the Graph
Field: dropdown and going to quantity_base and making it look like this
and then going to the sizex_base and changing it to 15 like this
since you know this I didn't just instruct you ;) )
now if you hit trigger you should get at least some visible smoke intermingled with the fire...
we want the smoke to do a couple things... for one we want it to stay put for the most part, maybe move at a very slow
speed and then we want it to fade smoothly out (maybe even shrink in size)
lets tackle the first... lets change its speed... go to speed_base and change it to 0.5 like this
if you hit trigger it moves at a much better speed, though lives way to long compared to the other particles
go to particlelife_base and change the 0 value to .75 ... remember the BOOM was set to 0.5 so we have this one last a
little longer, the effect we want is having the smoke fade slowly... the key setting should look like this
ok so we have the life changed to match the effect better... now we need to make it fade out properly... change the Graph
Field: to visibility_life... and add a key at time "0.5" of a value of ".25"... then a key at 0.75 time and value of 0...
that way by the time the fire dies down the smoke is at .25.... then it dies off in the next .25
it should look like this
now click Trigger and you should see a much more complete effect... now we have a puff of smoke that fades out nicely, with
fire that shoots out in all directions... now you can go back and tweak the settings for each of these to your liking,
change out images, even add more emitters.
Before you start modifying... you need to save your effect out... click "Effect" to go back to the main effect.
Scroll up if needed... and click on Save... put the name you want to save in the prompt that is loaded... like this
then click save... now it should be saved in the appropriate folder (whichever one is specified)... one thing to remember,
currently when you save an effect out you cannot reload it back in with "Load" until you restart T2D... just a simple
quirk...
well this should get you started... and probably get your imagination going... the names are pretty self explanitory once you
understand these basics... enjoy and don't forget to post your progress pics in the "Show Off!" forum !!! can't wait to see
the results... hope you enjoyed
- Matthew "King BoB" Langley
About the author
I Manage Tool Development for Torque at InstantAction
#2
04/02/2005 (2:22 am)
glad you enjoy :) The editor is a bit rough around the edges, but it works for now... the editors in the future will get more friendly I'm sure, though still all the power you get is still a bit amazing, I love the key system :)
#4
04/02/2005 (6:40 pm)
Clarifies a lot about the Particle Editor. Obviously, it's not a reference guide, but it covers the basic idea -- the rest of the way is pretty simple.
#5
04/09/2005 (9:38 am)
Thanks for the tut! It sure sped up my getting a grip on the editor. Very much appreciated.
#6
04/12/2005 (11:36 am)
Like your approach and style; this was a whole lot of fun!:) Thanks Matthew!:)
#8
04/20/2005 (6:08 pm)
Many thanks to "King BoB". Now it's time to explore and create some fun!!!
#10
09/09/2005 (9:26 am)
You can now get this tutorial along with 9 others in a T2D "Tutorial Pack"... in this pack each tutorial is an external html file so you can use them offline :)
#11
tdn.garagegames.com/wiki/Torque_2D/Getting_Started/T2DParticleEditor1
07/05/2006 (4:57 am)
You can find a more up-to-date version of this tutorial (and the others in the T2D tutorial pack) at TDN. Here is the link to the particle editor tutorial:tdn.garagegames.com/wiki/Torque_2D/Getting_Started/T2DParticleEditor1
Torque Owner bentgarney
Default Studio Name
-Rob