Author Topic: 3D Shockwaves  (Read 4496 times)

0 Members and 1 Guest are viewing this topic.

I know this has been brought up before, but I'm posting about it now because I finally had an idea on how it can be implemented.

Essentially if you shot out particles on one particlar plane in 3D around 360 degrees, then the effect is that they form a shockwave that gradually fades if you ramp down its alpha value enough. You can achieve the effect of bits trailing behind by randomly knocking down the speed of some of the particles or by programmatically ensuring some particles have certain speeds or are delayed in their generation.

How do I know this works you ask? Because I got it implemented in my own game and it looks very cool:

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
well, if you can code that... :)
pb is I rather imagine a "flat" shockwave, if you know what I mean... unless you can set a normal that the particles will align to ( and then the particles would have to scale up as they get away from the core of the shockwave ), it will always look like a ring...
SCREW CANON!

 

Offline Ulala

  • 29
  • Groooove Evening, viewers!
So no spherical shockwaves then, eh? :nervous:
I am a revolutionary.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Spherical shockwaves done that way would look like that 3D exploding ball screensaver...
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline vyper

  • 210
  • The Sexy Scotsman
Oh I can see it now - you fire off your load of Helios bombs and they smash into the hull of the Sathanas... and wow, all those particle based explosions make you ooohhh..... and then you think, why is nothing happening? Then yuo think - oh no, its trying to render too many of these fancy explosions and putting the frame rate down to about 3fps! :nervous:

Sorry, it IS a nice idea but I don't think it'd work well.


oooh - when did this guy get added: :hopping:
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline J3Vr6

  • 28
Quote
Originally posted by vyper
Oh I can see it now - you fire off your load of Helios bombs and they smash into the hull of the Sathanas... and wow, all those particle based explosions make you ooohhh..... and then you think, why is nothing happening? Then yuo think - oh no, its trying to render too many of these fancy explosions and putting the frame rate down to about 3fps! :nervous:

Sorry, it IS a nice idea but I don't think it'd work well.


Even with todays computer capabilities?  I mean, c'mon... I don't think it would take that much...
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by vyper
Oh I can see it now - you fire off your load of Helios bombs and they smash into the hull of the Sathanas... and wow, all those particle based explosions make you ooohhh..... and then you think, why is nothing happening? Then yuo think - oh no, its trying to render too many of these fancy explosions and putting the frame rate down to about 3fps! :nervous:
 


you're still playing on a 486 dx400?:eek2:
SCREW CANON!

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
shock combo from UT2K3 would also be a good example
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
yeah, or like the Deus Ex EMP grenade explosion.

This might be a good idea but will it be displayed from the same angle every time? Since in that case you could just modify the shockwave graphic without making any source changes.

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
What I'd like to see is another normal set in the pof for explosions (possibly one for each split subsystem), where if no normal is present, a random (or default) one is used.

Takers?

 
With the system I've got programmed in my game, you just set the direction of the particle system and that determines the 'plane' on which the shockwave propagates. Interestingly though, I've been thinking that a similar concept could be applied to create a more solid looking shockwave - if we had a 3D model of a curved wave front or whatever and applied the same logic as I've got going for the particles to each of its vertices, then you could draw that with an alpha blended texture and have it expand outwards luminescently as a shockwave. What's more, unlike the particles which eventually dissociate with each other (i.e. no longer look like a contiguous circle) this would maintain its solidity. Best of all to, it could very easily be scaled up and down using the LOD system so it would cater to both high and low end systems.

EDIT:
For the record, my particle system in that example uses D3D point sprites - in that graphic there are about 500 particles and it runs quite well even on my laptop which doesn't have any sort of 3D acceleration.
« Last Edit: May 15, 2003, 01:26:19 am by 383 »

 

Offline J3Vr6

  • 28
But could that be made into a sphere-type of explosion, semi-transparent or something maybe?  It looks cool now, but it seems as if now a shockwave like this could be flown over before it hits you.

If at all possible, and thats if even one can make 3d spherical shockwaves, it would be cool if that shockwave was semi-transparent (with whatver color), but shimmery.  If you were facing the shockwave and looking at an object that was caught in the blast or behind it the object wouldn't look completely crisp and clear, but distorted (i guess kinda like looking at something thru heat vapor rising off a hot road).
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline pyro-manic

  • Flambé
  • 210
What about just having an explosion.pof, like for the subspace vortex? Just make a sort of ragged rough-spherical shape, give it a good animated texture (like the subspace one), and have it replace the flat 2D ani that's there at the moment. It could grow in the same way as the subspace vortex as well.

I dunno, I'm no coder, but if you can do it for the subspace opening, then surely you can do it for this as well?
Any fool can pull a trigger...

 

Offline Ulala

  • 29
  • Groooove Evening, viewers!
Quote
Originally posted by J3Vr6
But could that be made into a sphere-type of explosion, semi-transparent or something maybe?  It looks cool now, but it seems as if now a shockwave like this could be flown over before it hits you.


Yeah, reminds me of the Death Star blast. Although, a spherical explosion off of a spherical station... :shaking:
But yeah anyway, spherical explosions would be cool. ;7
I am a revolutionary.

 
: pokes head out :
no *****es\complaints about GeoMod®©™??? :nervous:

/me whispers "explosions by selectable .pof file...!"

Bob
Hippie. n. a long-haired unconventionally dressed young person

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Well, a shockwave animation mapped onto a shockwave model would work rather well in my opinion.  Explosion blasts can still be handled the same too, so you wouldn't be able to fly over a wave without being hit by the "blast", but you could fly over a wave.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
there is code for scaleing a model already for the warp model
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Shrike

  • Postadmin
  • 211
    • http://www.3dap.com/hlp
Oh no!  The Ring of Doom!
WE ARE HARD LIGHT PRODUCTIONS. YOU WILL LOWER YOUR FIREWALLS AND SURRENDER YOUR KEYBOARDS. WE WILL ADD YOUR INTELLECTUAL AND VERNACULAR DISTINCTIVENESS TO OUR OWN. YOUR FORUMS WILL ADAPT TO SERVICE US. RESISTANCE IS FUTILE.

 
I'd just like to point out that in the first iteration of that code I actually had a spherical particle shockwave going off, but it doesn't look nearly as cool as a ring expanding on one plane.

 

Offline J3Vr6

  • 28
No chance of having both in really big explosions?  With the ring blast growing larger than the sphere?
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy