Page 1 of 1

Particle Studio

Posted: Sat Dec 13, 2008 9:15 am
by Kaelis
Heres a little particle app for you guys to have fun with.

http://filesmelt.com/Filehosting2/downl ... PSv0.9.rar

Keyboard controls:

LMB - spawn bullet
RMB - attract bullets
Space - spawn explosion

C - clear bullets
X - pause simulation
O - open parameters
S - save parameters

Detailed parameter instructions will come at a later date. For now, ive provided some examples.

Oh, and i know that it crashes in Vista. Not much i can do about it, unfortunately :(



Here are some samples of what effects can be achieved:

http://i275.photobucket.com/albums/jj31 ... ullets.png
http://i275.photobucket.com/albums/jj31 ... osions.png
http://i275.photobucket.com/albums/jj31 ... spread.png



Should you find some fun/good looking setup, be sure to save it and post/send to me. Ill need them.

Posted: Tue Dec 16, 2008 4:16 am
by Kaelis
UPDATE
PS v0.91

http://filesmelt.com/Filehosting2/downl ... =PS091.rar





Particle Types
They specify what kinds of particles will be emitted by bullets and explosions.

Particle shape- A particle has a shape. This shape is indicated by a sprite. You can use any sprite you like for your particles but there are 15 built-in sprites. These are all 64x64 in size and have alpha values set such that they nicely blend with the background.

Sprite- Sets your own sprite for the particle type. Particle shape needs to be set to 'Custom sprite' for this to take effect.

Color- Particles will have a color. You can specify three colors between which the color of the particle is interpolated during its life time. For example, the particle can start white and become more and more black over its lifetime.

Alpha- Besides the color you can also give an alpha transparency value. The built-in particle shapes already have some alpha transparency but you can use these settings to e.g. make the particle vanish over its life time.

Add. blending - Normally particles are blended with the background in the same way as sprites. But it is also possible to use additive blending. This gives in particular a great effect for explosion.

Life - Particles live for a limited amount of time, their lifetime. After this they disappear. Lifetime is measured in frames. Min is the minimal lifetime of a particle, Max is the maximal. Upon creation, particle lifetimes will be randomized between these two values.

Size - You can indicate the size of a particle. A size of 1 indicates the normal size of the sprite. A particle type can be defined such that all particles have the same size (both Min and Max set to the same number) or have different sizes. You can indicate a range of sizes. Also, you can indicate whether the size should change over the lifetime of the particle (Incr, positive for growing particle, negative for shrinking) and whether some wiggling in the size will happen (Wiggle), giving a blinking effect.

Orientation - The particles also have an orientation. Again the orientation can be the same for all particles, can be different, and can change over the lifetime of the sprite. The angles specify counter-clockwise rotations, in degrees.

Speed and Direction - Particles can move during their lifetime. They can get an initial speed (or range of speeds) and direction, and the speed and direction can change over time.

Relative angle - You can also indicate whether the given orientation angle should be relative (1) to the current direction of motion or absolute (0). E.g. by setting all values to 0 but ang_relative to 1, the particle orientation will precisely follow the path of the particle.


Bullet Emitters
They specify what particles will bullets emit, how often, and in what pattern.

System - In what system the emitted particles will be created and by what attractors they will be affected. Particles created in system A will be affected by attractors that are in system A as well, but attractors from system B will have no effect on them. Systems with the 'Surf' Prefix mean that they particles in them will be drawn on the surface, giving them an 'afterimage'; a blurry trail.

P. Type - What types of particles the emitter creates.

Frequency - How often does the emitter create particles. Positive number indicates how many particles will be generated every frame. If you indicate a number smaller than 0 in each step a particle is generated with a chance of -1/number. So for example with a value of -5 a particle is generated on average once every 5 steps.

Spread - Indicates the extend of the region in which the particles are generated.

Shape - Indicates the shape of the region.

Distribution - Indicates the distribution used to generate the particles. It can have the following values:
ps_distr_linear: indicates a linear distribution, that is everywhere in the region the chance is equal
ps_distr_gaussian: indicates a Gaussian distribution in which more particles are generated in the center than at the sides of the region
ps_distr_invgaussian: indicates an inverse Gaussian distribution in which more particles are generated at the sides of the region than in the center


Explosion Emitters
They specify what particles will explosions emit, how many, and in what pattern. Each emitter has 4 bursts, so that you can emit different particles in different patters with one emitter.

System - In what system the emitted particles will be created. This setting is shared between all the burst of an emitter.

P. Type - What types of particles the burst creates.

Quantity - How many particles will be generated.

Spread - Indicates the extend of the region in which the particles are generated.

Shape - Indicates the shape of the region.

Distribution - Indicates the distribution used to generate the particles.


Explosion Attractor
An attractor attracts the particles or pushes them away.

System - What system will the attractor affect.

Life - How long will the attractor persist, in frames.

Force - Indicates the attracting (or pushing, with negative values) force of the attractor.

Distance - Indicates the maximal distance at which the attractor has effect. Only particles closer that this distance to the attractor will be attracted.

Kind - Indicates the kind of attractor. The following values exist
ps_force_constant: indicates that the force is constant independent of the distance.
ps_force_linear: indicates a linearly growing force. At the maximal distance the force is 0 while at the position of the attractor it attains the given value.
ps_force_quadratic: indicates that the force grows quadratic.

Additive - Indicates whether the force is added to the speed and direction in each step (true) or only applied to the position of the particle (false). When additive the particle will accelerate towards the attractor while with a non-additive force it will move there with constant speed.

Posted: Tue Dec 16, 2008 8:34 pm
by Kaelis
Still no comments?

Heres a "vista-friendly" (that sounds so wrong...) version for those of you who are dumb enough to run vista: http://filesmelt.com/Filehosting2/downl ... PS091v.rar

EDIT: No access to explosion settings, but at least it works...

Posted: Tue Dec 16, 2008 8:38 pm
by Chiiro
Lots of fun to play around with. :'3
I made some pretty nice effects so far but I haven't gotten everything down yet. xD

Posted: Wed Dec 17, 2008 2:05 am
by TheBlueEcho
Thanks a bunch kae! I'll try it now.

Posted: Wed Dec 17, 2008 8:05 am
by Lord-General Thunder
Kaelis wrote:Still no comments?

Heres a "vista-friendly" (that sounds so wrong...) version for those of you who are dumb enough to run vista: http://filesmelt.com/Filehosting2/downl ... PS091v.rar

EDIT: No access to explosion settings, but at least it works...
The regular version works fine in Vista. Has anybody else actually tried it?

Posted: Wed Dec 17, 2008 8:50 am
by derekiv
Yeah... Worked once. Then died..... And Vista blames the .dll

But from what I saw it was... AWESOME :D

Kaelis, you are a genuis.

Posted: Thu Dec 18, 2008 9:42 pm
by TheBlueEcho
I thought this looked nice.

Code: Select all

//PARTICLE APP SAVE

pt,0,9,0,0,15,20,0.60,0.40,0.10,1,16746560,12548096,8417280,0.30,0.80,-0.01,0.10,0,360,0,0,0.30,0.50,0.05,0.50,0,360,0,0,0
pt,1,6,0,,20,25,0.40,0.20,0,1,16746560,12876109,0,0.15,0.25,0.01,0,0,360,0,0,0.25,0.35,0.05,0,0,360,0,0,0
pt,2,9,0,,25,45,0.60,0.30,0,1,16756608,16746560,16746560,0.45,0.45,0,0,0,360,0,0,0,0,0,0,0,360,0,0,0
pt,3,10,0,,12,17,0.50,0.25,0,1,16746560,16748320,14679808,0.05,0.25,0.01,0,0,360,0,0,0,0.20,0,0.10,0,360,0,0,0
bv,5,2,250,1,16760704,1,1,1
be,0,1,0,0,0,1,1,0
be,1,1,0,1,0,1,1,0
be,2,0,1,2,3,-2,1,0
be,3,1,1,3,0,1,3,0
ea,1,2,2,-4,2,2,1
ees,0,3
eeb,0,0,1,5,1,0,40,15
eeb,0,1,1,1,0,1,30,15
eeb,0,2,0,5,0,2,50,1
eeb,0,3,1,11,0,3,30,20
ees,1,2
eeb,1,0,1,5,0,2,150,2
eeb,1,1,1,1,0,3,25,25
eeb,1,2,0,1,0,1,30,20
eeb,1,3,0,1,0,1,30,20
ees,2,2
eeb,2,0,0,1,0,2,10,20
eeb,2,1,0,1,0,3,10,15
eeb,2,2,0,1,0,1,10,25
eeb,2,3,0,1,0,2,10,20
ees,3,2
eeb,3,0,0,1,0,3,10,15
eeb,3,1,0,1,0,3,10,15
eeb,3,2,0,1,0,3,10,15
eeb,3,3,0,1,0,3,10,15
tv,18
Do what you will.

Also, the custom sprites thing acts funny. Example, when you import a sprite, then save your work and load it again, all your particles reset to custom sprite, and your sprite is not even being used. :| Other than that everything seems normal, except for the whole vista issues everybody else is having.

Posted: Sat Dec 27, 2008 11:04 am
by Ixranin
For some reason I can't seem to get the Relative Angle to work with the custom sprites; my bullets are all stuck facing their default direction.