ring explosion

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Edwart
Posts: 46
Joined: Fri Dec 30, 2005 12:29 pm

ring explosion

Post by Edwart »

hi,

i created a few explosions with the IParticleSystemSceneNode but i have no idea how to create a ring-explosion.
the ring should get bigger.
like an explosion of a spaceship in the space.

i have no idea how to create it.
can you help me please?

Thank You
Edwart
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

I have a animated bill board series that I can zip up that has an explosion ring, available as a sequence of 48 pngs:


Image

If you are interested, send me a PM and I'll put it up on a website.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

here is particle coordinates calculation:
x=cos(angle)*radius+xcenter;
z=sin(angle)*radius+zcenter;

xcenter,zcenter is your explosion center.
radius is distance from center.you should add to radius every frame(with timer).
angle(in radians, degree*(PI/180)) is in what direction particle will move,make it random.
It is plane movement,if you want to create sphere explosion add y:
y=sin(angle)*radius+ycenter;
thats all.. :)
Guest

Post by Guest »

hi!

to dhenton:
isnt it more efficient to scale the "explosion ring" bigger in a loop instead of having 48 pictures of an explosion ring where each one is a little bigger? just a suggestion.

bye!
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

GFXstyLER wrote:hi!

to dhenton:
isnt it more efficient to scale the "explosion ring" bigger in a loop instead of having 48 pictures of an explosion ring where each one is a little bigger? just a suggestion.

bye!
its only more efficient if you know how to do it, which I don't. I go for cheap. I got the animation off the Blender site, output it as pngs (for transparency) and was blowing things up within 30 minutes.

As they say in the trade, get it fast, get it cheap, get it right, choose 1 of 3.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

hey dhenton, i'd certainly be interested in peeking at your stuff!
Image Image Image
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

The animation is at:

http://www.s-fonline.com/webhosting/dhe ... ssdemo.zip

Inside this zip is a folder called assets\explosions. Thats where the images are. If you run the exe you can see it working (sort of things bounce around so you won't get a good look at it)
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Took a few attempts to download, about 5 times i tried it didnt fully download and ended up corrupt, but got it now, i'll try it out sometime soon, cheers!
Image Image Image
Edwart
Posts: 46
Joined: Fri Dec 30, 2005 12:29 pm

Post by Edwart »

i cant download the file too.
it breaks after 5 minutes... .

is it possible to upload the specific source-code and the pics of the animation?
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

try

http://s-fonline.com/webhosting/dhenton ... xplode.zip

The source is scattered all over the other zip, but its just a texture animator, which should be in the demos.
Guest

Post by Guest »

Pazystamo wrote:here is particle coordinates calculation:
x=cos(angle)*radius+xcenter;
z=sin(angle)*radius+zcenter;

xcenter,zcenter is your explosion center.
radius is distance from center.you should add to radius every frame(with timer).
angle(in radians, degree*(PI/180)) is in what direction particle will move,make it random.
It is plane movement,if you want to create sphere explosion add y:
y=sin(angle)*radius+ycenter;
thats all.. :)

what type of particlescenenode would you use with that? or would you need to put that into a custom scene node to make it work?

thanks
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

well Guest, i havent work with particles and i havent found how to set individual particle pos. But this code works for bilboards. That was only basicaly formula to find pos when you have angle and distance.
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

I use a ring-mesh for that, which gets scaled.

Regards - Xaron
Post Reply