Page 1 of 2

A Configurable ShockWave class for space explosions

Posted: Wed Mar 09, 2005 7:00 pm
by mohaps
Hi All,

This is a demo of a shockwave generated in space when something explodes


Image
CLICK HERE TO DOWNLOAD MPEG MOVIE / HIRES IMAGE


In this shot the shockwave is generated from the asteroid.. i am right now working with the code for collision detection with the shockwave... thempeg movieshould give you an idea as to how the stuff looks in realtime :)

the class is configurable enough to allow any kind of skin colour or orientation of the shockwave.. you can also control the starting / end size of the shockwave and the speed of the shockwave..

this is being done as a part of the Blaze : Proving Ground project

Posted: Wed Mar 09, 2005 7:43 pm
by jox
Nice. I'd add some motion blur to the wave so it looks more dynamic. You use alpha channel anyway so it should be easy. You could make a transition from the texture to transparent inside and outside the ring (blur the edges generously). If the texture structure would be destorted towards the center it would be even better.

jox

Posted: Wed Mar 09, 2005 8:17 pm
by mohaps
hi jox,

i am planning to do that with shaders in the final cut anyway.. i believe vertex / pixel shader / HLSL is designed just to do such tasks and efficiently at that...

this should squeeze out a few extra cycles

for older cards i am thiking about using a reflection 2 layer material for the shockwave base texture and the sheen

Posted: Wed Mar 09, 2005 9:34 pm
by jox
ah ok. But creating a blurred texture wouldn't cost any cycle.

Posted: Wed Mar 09, 2005 10:00 pm
by mohaps
hi jox,

can you write out in psuedocode what you mean.. i can implement it if i get a handle on what you are suggesting :)

i think i misunderstood at first...

Posted: Wed Mar 09, 2005 10:09 pm
by cmoibenlepro
wow it looks definitively good! :D

Posted: Wed Mar 09, 2005 10:17 pm
by jox
What I mean needs no code but a graphics software like photoshop. :) Its the texture that has to be modified before it gets loaded into the engine.

Posted: Wed Mar 09, 2005 10:32 pm
by jox
Here is an example that I quickly created with the "radial blur" flter in photoshop:

Image

Of course it needs a proper alpha channel.

I think best would be to have the texture (radially) distorted and the alpha channel blurred (gaussian would be sufficient I guess).

Posted: Wed Mar 09, 2005 11:09 pm
by mohaps
did some tinkering with the textures...got some alpha stuff working

using an inverted color version of jox's texture


Image


I still have not gotten the UV mapping correct


now these are using some GIMP tinkering with a texture of mine


Image


Image

Posted: Wed Mar 09, 2005 11:27 pm
by TheRLG

Posted: Thu Mar 10, 2005 12:12 am
by jox
Try this one:

http://www.mindfloaters.de/irrlicht/dow ... kwave1.zip

it's a 32 bit TGA with an alpha channel. Here is an example on how it should look in irrlicht:

Image

:)

Posted: Thu Mar 10, 2005 12:18 am
by jox
Oh, it looks that you are using a mesh in form of a ring for that.. Is that so?

You can save some polygons when you just take a square plane (2 tris) and map the texture on it. The aplha channel creates the ring for ya, so no need of a ring mesh. its also more flexible.

for testing you could use a TestSceneNode and scale one axis to 0. Easy.

jox

Posted: Thu Mar 10, 2005 1:17 am
by mohaps
yes i am using a torus mesh...

i shall give the test node a try...

i am switching to a sphere for the explosion body and shockwave for the blast effect... i think the blast wave can be the test node scaling thingie

Posted: Thu Mar 10, 2005 1:58 pm
by mohaps
this is a shot of the sphere blast plus a disc shockwave combo explosion..

Image

Posted: Thu Mar 10, 2005 9:31 pm
by mohaps
Hey Jox,

your idea works like a charm... :)

i got the shockwave looking cool as you can see from the screenshot...
and i updated the MPEG movie of that




Image
CLICK HERE TO DOWNLOAD MPEG MOVIE / HIRES IMAGE