Things about particles

Post your own tutorials, guides and demos.

Post » Wed Nov 26, 2008 9:55 am

[url:2rti809h]http://www.ilmc.pl/shinkan/particle_cannon_nofx.cap[/url:2rti809h]

[url:2rti809h]http://www.ilmc.pl/shinkan/particle_cannon_fx.cap[/url:2rti809h]

particle_cannon_nofx - small file - very simple
particle_cannon_fx - big file - bit more complex with explosions sprites
(just don't comment that awesome cannon lol)

ok then
i'm just playing with particles to make some kind of missile effect
What i want to achieve is to make the missile fly to mouse direction with smoke behind it, and i want this smoke to stay on screen, and randomly fade out - to create random fog effect (just for screen look more like battlefiled).

Here's the few problem i can't solve

- There is no option to set something like "random fade out" - now particles starts to fade out after some time in a very linear way (dissapearing one by one) and it looks hm....bad.

- I can't see how can i interact with particles that have been allready created.
I mean, i can control how they will look before they are born, but when they on screen i cannot do anything with them - or mayby i dont know how.

- motion blur - don't work at all - it just makes objects very brigth

- and the particles one more time (in big file) - explosion are set to display sprites in front by order
(closer to bottom are allways in front) same with particles. but particles are let's sey jumping in z order. When you run abig file you'll see right a way what's going on.

and if there's a much simple way for that "missile effect" please let my know :D

and again...don't say anything about that cannon sprite ;>
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Nov 26, 2008 3:17 pm

[quote="shinkan":1a80wbwg]- There is no option to set something like "random fade out" - now particles starts to fade out after some time in a very linear way (dissapearing one by one) and it looks hm....bad.[/quote:1a80wbwg]
There isn't an option for this, but you could try using the speed to randomise destruction. I put Creation \ Speed randomizer to 50, Simulation settings \ Acceleration to -75 and Simulation randomizer \ speed randomiser to 0, then it looks a bit better. The trail is a bit more random, because it's set to destroy particles when they're stopped, and with a random speed, that comes at a random time. Not sure if that's what you want.

[quote:1a80wbwg]- I can't see how can i interact with particles that have been allready created.
I mean, i can control how they will look before they are born, but when they on screen i cannot do anything with them - or mayby i dont know how.[/quote:1a80wbwg]
You can't gain this fine control over the particles object. If you want that much control, spawn lots of sprite objects instead of using the Particles object, then you can use the normal event system to control your sprite-particles. (This'd allow you randomised opacity/fade-outs too)

[quote:1a80wbwg]- motion blur - don't work at all - it just makes objects very brigth[/quote:1a80wbwg]
Works fine here, was fixed in the latest build 0.97.7. Are you using that? Besides, nothing is moving quickly, so motion blur will do pretty much nothing.

[quote:1a80wbwg]- and the particles one more time (in big file) - explosion are set to display sprites in front by order
(closer to bottom are allways in front) same with particles.[/quote:1a80wbwg]
When you set the Particles object to front, all particles go to front. It's just how the particles object works. Again, if you want per-particle control over this, use sprites and make your own particles engine. If you delete the 'Particles: send to front' action in event 7, it goes behind the explosion. It doesn't make any sense for that action to be there, because it's effectively saying "Send all the particles in front of everything, once for each 'explo' that exists", and it's interspersed with other send-to-fronts.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Wed Nov 26, 2008 5:06 pm

[quote:1vsstced]You can't gain this fine control over the particles object. If you want that much control, spawn lots of sprite objects instead of using the Particles object, then you can use the normal event system to control your sprite-particles. (This'd allow you randomised opacity/fade-outs too)[/quote:1vsstced]

Actually i'm doing it right now, but i was just thinking that kind of control would be nice addon to particles system.


[quote:1vsstced]Works fine here, was fixed in the latest build 0.97.7. Are you using that? Besides, nothing is moving quickly, so motion blur will do pretty much nothing.[/quote:1vsstced]

Yes i know there is not many moving objects, but i just check it for tests and I have 0.97.7 but still every time when adding motion blur (any value) it still makes all objects brigther instead of "smoothing movement of objects". I thought maybe something is wrong with my pc but i have remove 97.7 and install older 97.6 and it works just fine!


[quote:1vsstced]When you set the Particles object to front, all particles go to front. It's just how the particles object works. Again, if you want per-particle control over this, use sprites and make your own particles engine. If you delete the 'Particles: send to front' action in event 7, it goes behind the explosion. It doesn't make any sense for that action to be there, because it's effectively saying "Send all the particles in front of everything, once for each 'explo' that exists", and it's interspersed with other send-to-fronts.[/quote:1vsstced]

I kwon that my code is a biy messy, but after 5 hours of playing around i'm glad that i made it work...


What about that combination of bullet and rts behavior?
can it be done other way?

thakns for all Ashley :D
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Nov 26, 2008 9:53 pm

[quote="shinkan":47j6quuo]Actually i'm doing it right now, but i was just thinking that kind of control would be nice addon to particles system.[/quote:47j6quuo]
The particles object is designed to be a quick and easy alternative to using sprites. I don't see any point in keeping adding on more buttons and levers - it'll never be as flexible as using your own evented particle system. Still, I'm sure we could get away with an opacity randomiser.

[quote:47j6quuo]Yes i know there is not many moving objects, but i just check it for tests and I have 0.97.7 but still every time when adding motion blur (any value) it still makes all objects brigther instead of "smoothing movement of objects".[/quote:47j6quuo]
My mistake, I got confused: I broke motion blur in 0.97.7, but it's fixed in the next build! (As you say 0.97.6 will work as well)

[quote:47j6quuo]What about that combination of bullet and rts behavior?
can it be done other way?[/quote:47j6quuo]
Yeah, you could do it with some maths. How's your trigonometry? Seriously though, you can do it by moving a 'shadow' sprite directly towards the target, then have the real projectile move up and down over the journey giving the impression of an arc.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu Nov 27, 2008 8:20 am

[quote:z1gfxkkb]Yeah, you could do it with some maths. How's your trigonometry? Seriously though, you can do it by moving a 'shadow' sprite directly towards the target, then have the real projectile move up and down over the journey giving the impression of an arc.[/quote:z1gfxkkb]

my math is bad, but moving a shadow...sounds like a very good idea

thanks for help.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sat Dec 06, 2008 12:02 am

may i ask where you got that beautiful explosion animation?
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Dec 06, 2008 8:45 am

sure you can. I made them by myself.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Dec 10, 2008 6:43 pm

[quote="shinkan":1dktt4xk]sure you can. I made them by myself.[/quote:1dktt4xk]

s**t how?
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Dec 11, 2008 8:50 am

i'm happy to have 3d studio max at work :wink:
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest