Wave Effect

BlitzMax Forums/BlitzMax Beginners Area/Wave Effect

Ked(Posted 2007) [#1]
I am working on a project that a special kind of shockwave is needed. I need it to scale out from the starting points and also wave the pixels underneath the shockwave. Can anyone help me?

Thanks


tonyg(Posted 2007) [#2]
There is some water ripple code somewhere from Beaker which you might use but it could be too slow. Might not need the same 'quality' for a shockwave effect. There is some B3D code somewhere as well which be easy to convert. Search for Ripple.
<edit> There might be some source for the Bmax Geometry wars clone which might have a similar effect and you could also search for magnifying glass effects which would be a similar principle.
<edit2> THIS might be it but none of the zips are still available.


Grey Alien(Posted 2007) [#3]
Be interested to see what you turn up with as I believe that this effect is NOT simple.


tonyg(Posted 2007) [#4]
The effect is simple but making it realtime over a screen without shaders is VERY difficult.


Ked(Posted 2007) [#5]
Thanks! I'll see what I come up with. I'll post back here if I find/discover anything.


Grey Alien(Posted 2007) [#6]
making it realtime over a screen without shaders is VERY difficult.
That's what I meant. These fancy effects in realtime are just not really possible unless you make some kind of fake ripple effect.


DavidDC(Posted 2007) [#7]
Could you perhaps render the underlying area to texture and overlay that texture on a 3d "ripple" model and then blend the model with texture over your standard explosion texture, scaling both model and texture-area-applied-to-model as required? Phew, that was a mouthful!

- David


Mortiis(Posted 2007) [#8]
I think he wants it in 2d.


Jesse(Posted 2007) [#9]
check out this thread I posted some code a while a go. I warn you don't run in debug mode.
you'll need a decent computer. and a 640x480 image.

http://www.blitzmax.com/Community/posts.php?topic=63609#710366


DavidDC(Posted 2007) [#10]
>I think he wants it in 2d.

Ah, well... unless the effect is very small and fairly rare then I doubt there's a practical real-time per-pixel solution.

Unless, of course, you know what your background is going to be, as then you'd be able to pre-record the effect.


Ked(Posted 2007) [#11]
Jesse: Thats excellent; exactly what I was looking for!

But I really need it to work in multiple resolutions and be fast.


Jesse(Posted 2007) [#12]
the code itself is too advanced for me. there is not much I can tell you about speeding it up. but there is an article on water effect in gamedev net. look for the demo and source code at the end of the article. I hope you understand pascal.
http://www.gamedev.net/reference/programming/features/water/default.asp


xlsior(Posted 2007) [#13]
But I really need it to work in multiple resolutions and be fast


You can specify the detail levels in jesse's code snippet by pressing 1-4. Lower detail gives much higher FPS.
You probably need to adjust the pressure too, though (left/right cursor)