VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Distortion Field

Jotaf98  (9 Submissions)   Graphics   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This function basically mixes all the pixels in an area of an image, defined by a mask image. The result is much like the invisibility effect used in the movie "The Predator", very cool if you want a small, quick function for that effect in your games! (It looks like the Predator is made of water or something)
The image doesn't quite reproduce the effect, I just used PrintScreen 3 times, that's all. It has about 100 frames per second in the real code ;)

Inputs
All you need to give is an image, the mask image, the coordinates where the effect will appear, and the height/width of the image (basically ScaleHeight and ScaleWidth of the form or picturebox).

Assumes
You don't need to know anything at all. Just add the .bas file and call the function.

Side Effects
If you use this function too much (large mask image or used many times), it may slow down because of the calculations it must do.

Rate Distortion Field (6(6 Vote))

Download Distortion Field

Distortion Field Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters