Sign in to follow this  

the best way to make an explosion?

This topic is 4838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, the game i'm currently working on is some kind of a flight sim. you can control your spacefighter (or whatever it is) with mouse and keyboard and the enemy is controlled by another human via network. my problem is: when i hit the enemy with my missile/shot (not sure what it will be when i'm finished. so far its only a colored box) it just disappears. but i would like to make something like an explosion when i hit it. what would be the best (fool-/n00bproof) approach to do this? should i take all the polygons of the spaceship explode them and just let them fly around for a while? but the textures are only visible on the outside so if i would take the ship apart i would have some pieces invisible and some visible. how do you ppl make explosions in 3d games? it doesnt have to look good because the whole game doesnt look very good so far but one should be able to identify it as an explosion. thx BiGFooT

Share this post


Link to post
Share on other sites
flightsim?

Have it give off some smoke (take a look at particle systems) and then just fall. Don't do an explosion. Overused. Just falling out of the sky is more original.

Share this post


Link to post
Share on other sites
It'd be quite hard to "break" apart the polygons, especially if you're going to be using a mesh, as I suspect you might.

The easiest thing that would produce good results would be to make a particle system that would mimic the explosion: it would shoot off debris in all directions, then you could fade the alpha- and diffuse- values of your mesh materials to reddish-clear quickly to remove it from the screen when it's masked by the particles.

Search for "particle system", "materials" "alpha blending"... I believe the DX SDK has an entry on "explosions and effects" if you want to read that too.

But I agree with the smoke.... *ideally* you'd have some smokers and some exploders, but that may be beyond your ability. Try and see what works.


Mushu - trying to help those he doesn't know, with things he doesn't know.
Why won't he just go away? An question the universe may never have an answer to...

Share this post


Link to post
Share on other sites
Quote:

Have it give off some smoke (take a look at particle systems) and then just fall. Don't do an explosion. Overused. Just falling out of the sky is more original.

sounds nice :) thx. i'll see if its within my abilities or if i should just let it fall down w/o smoke which would look stupid.
Quote:

that may be beyond your ability

yes, you are right :P
i'm really proud of what i finished but i should go for the simple stuff because i'm still a n00b in 3d stuff.
Quote:

DX SDK

OGL here :/ i decided to use ogl this time because... ummm... there was no reason to do it. i just felt like using something else this time. i used dx for some 2d stuff and it was very nice. but i wanted to try ogl as well.

thx for all the answers. i'll read some tutorials about particle systems.
BiGF00T

Share this post


Link to post
Share on other sites
:( i just realized that falling to the ground might need something like gravity. i cant just let it fall straight onto the ground. it should have the velocity from the moment when it was destroyed and it should fly into the ground like a parabola. i could just let it fly in the direction it was facing when it was destroyed set the y vector straight and decrease the height every few milliseconds until the ship hits the ground. then (assuming i have the ability to create smoke) i cover the whole thing in smoke and let it vanish into thin air.
do i need gravity? i already thought i could explain the physics of the ship with the excuse that it is a spaceship and not an ordinary plane :) you can stand still in the air like a helicopter or fly like a plane. vertical take-off is impossible though.

Share this post


Link to post
Share on other sites
If your 'dead' ship falls to the ground with a constant acceleration (eg: -y velocity increases at the same rate) then you will have effectively simulated gravity for that sequence. I am assuming you are asking if you need to simulate it within the game play itself?

You can also use the smoke particle system to simulate basic fire, throw in a load of rapidly moving particles with fairly small lifespans that fade from yellow to red (using additive blending) and you can make a decent looking explosion that would go well with the smoke. For added visuals you could throw in a shockwave - essentially a billboarded polygon or a basic flat ellipical shape with a shockwave texture and add a nice rapidly expanding/fading sphere at the explosion centre. Couple this with the smoke and particles flying off so the explosion envelops your model and you can hide the fact that you've just removed it from the scene.

Share this post


Link to post
Share on other sites
making it super noobproof, why not just make the ship disappear like you're doing now, but add a few/many of the boxes you're currently using for your bullet/missle replace the now missing ship, moving in different directions until they leave the screen?

It won't look fantastic or anything, but it should symbolize an explosion to the player.

Share this post


Link to post
Share on other sites
Quote:

You can also use the smoke particle system to simulate basic fire, throw in a load of rapidly moving particles with fairly small lifespans that fade from yellow to red (using additive blending) and you can make a decent looking explosion that would go well with the smoke. For added visuals you could throw in a shockwave - essentially a billboarded polygon or a basic flat ellipical shape with a shockwave texture and add a nice rapidly expanding/fading sphere at the explosion centre. Couple this with the smoke and particles flying off so the explosion envelops your model and you can hide the fact that you've just removed it from the scene.

yes, that was what i tried to explain with my crappy english.
Quote:

I am assuming you are asking if you need to simulate it within the game play itself?

exactly... i'm sure it would be better and more realistic if i would have the gravity all the time but i think its ok if i only simulate it when someone dies. the game is only a test for 3d programming and my first try with ogl. i dont expect it to look perfect. if i would simulate gravity all the time then the player would have to point the nose of the spaceship into the sky all the time only that he wouldnt crash. you couldnt fly through a canyon (i liked flying through canyons in comanche) and shoot on stuff in front of you because you'd crash. i think it'll be better to leave the game as it is and go with the simulate when someone is dead idea. the explanation would be that the antigrav generator fails when the spaceship is hit :) (i love science fiction. every unrealistic thing can be explained with advanced technology :))

Quote:

billboarded polygon or a basic flat ellipical shape with a shockwave texture and add a nice rapidly expanding/fading sphere at the explosion centre

...? i think i have to read lots of tutorials until i can do something like this. i'll be lucky if i can do some smoke. after i finished the smoke i'll try the explosion/shockwave etc stuff.
thanks for your ideas
Quote:

making it super noobproof, why not just make the ship disappear like you're doing now, but add a few/many of the boxes you're currently using for your bullet/missle replace the now missing ship, moving in different directions until they leave the screen?

that will be the option if i fail to make smoke :)
i'll first try to make some smoke and if i realize i'm too n00bish for it then i'll go with your idea. thx

BiGFooT

Share this post


Link to post
Share on other sites
ok, now i have something like a particle system running :)
the only problem is that the particles are 2d and only visible from one side :/
what is the solution to this problem? should i rotate them or should i make particle boxes?

Share this post


Link to post
Share on other sites
Make sure you rotate them so they're facing the viewpoint and not the player, that's always good practice, even if they are often the same thing.

In CounterStrike their smoke effect faces the player, rather than the camera, so you get strange effects when using a surveillance camera.

Hmmmm, I don't suppose this is too much of an issue. Another idea would be a flash. Just turn the whole screen white for a fraction of a second. Missile hits ship, flash, ship gone. Simple but could be quite effective

Or keep on rendering the ship, but make it a dead model, perhaps a different colour for now.

Share this post


Link to post
Share on other sites
I think rendering the model with a different skin (for dead) would be good - obviously combine that with physics which cause it to fall out of the sky and some particle effects and possibly billboarded explosion effects.

You could also have a different model for a "dead" ship - either lower poly count, or just trim bits off the wings, tail etc, as if they'd been sheared off.

Perhaps have small pieces of debris (Either prerendered animated billboards, or very small rendered models) fall off the burning hulk occasionally as it's falling. Those pieces of debris would have a lower terminal velocity so they would appear to fall "up" from the dead ship.

If you prerender a tumbling piece of junk, it doesn't matter what angle the player is looking at it from, as it's tumbling anyway (Look at the pickup objects in Descent)

When it hits the ground you can just make an almighty particle effect or billboarded explosion. Ideally for added effect, then have some smoke come out of the crater, which you can render by either putting an extra texture on to the ground, or rendering the ground differently in the first place.

Of course all of the above might be too complicated, so just do some of them perhaps :)

Mark

Share this post


Link to post
Share on other sites

This topic is 4838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this