Archived

This topic is now archived and is closed to further replies.

Hammer2k2

Stealth Tank/Sonic Tank Stealth Effect

Recommended Posts

I''ve been giving this some thought recently too. I figured out two ways:

One is reasonably fast to do - simply get the frame buffer after rendering the frame and copy/paste a few small lines of pixels so they are offset to the normal positions. This will create a crude, but fast shimmering effect. Might want to update it so only the tank pixels get copied not the background.

Second method would look nicer but run much slower. Create a black mask of an area with ripple shapes (animate it ideally). Now render a copy of your tank off screen and place the mask over it so that certain areas are visible still. You should now have small rippled sections of the tank image. You can now render this on top of your rendered tank with a small offset to make a more detailed rippling effect that can be animated.

With both of these methods, simply blend the tank out while doing them to get a reasonable effect.

Share this post


Link to post
Share on other sites
I can''t seem to get a screen shot of the game. The palette keeps coming out wrong when I use print screen. To give you a clearer example, how about in starcraft if he/she attacks you with dark templars, you will see a certain blurring in the map whenever they pass by. I think that might be it. Thanks.

Share this post


Link to post
Share on other sites
To all who don''t know what Hammer2k2 is referring to: Where you would ordinarily see the unit, you instead see a slight, very localized distortion in the image that would be underneath it, like the unit has been swapped out and replaced with a lens (made of turbulent fluid). Right, hammer? You don''t actually see any parts of the unit, do you? (If you do, then just animate the alpha channel / mask)

If you''re going for the distortion effect I think you are, you could mess with the framebuffer; I can''t think of how else you could achieve the effect.

Share this post


Link to post
Share on other sites
Ok. In that case, what you might be able to do is this:

Render your object to a texture. Then instead of rendering your object to the screen, render a quad grid with that texture on (very similar to impostors technique), while shifting the grid''s vertices around to get the ripple effect. You could also figure out where on the screen the object will be. Then you can render the sceene whithout the object, and copy that area of the screen to the texture. This will give you the same effect with the object "cloaked". Or you can alpha blend the two (the object and whatever''s behind it to get the in-between stage.

I think this should work, although my guess is that it might get a bit slow...

Another option (inspired by a thread in the OpenGL forum) is to use pixel shaders for a customized refraction effect.

Hope this helps.

Michael K.,
Designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

Share this post


Link to post
Share on other sites
Thanks for the reply everyone. I haven''t implemented them yet but at least I now have an I idea or two on what to do. Don''t know OpenGL yet though. Can you give me links on a complete beginner''s tutorial to OpenGL? Thank you.

Share this post


Link to post
Share on other sites