(An αξ product.)
Refract re-re-surfaces; some folks have been asking if this plug-in runs under GIMP 2.x. Now it does. In the process, I've moved parts of it in to Python, out of the belief that will make it easier to maintain.
Uses a grayscale image for a height field as a lens of specified refraction index to distort an image.
The source is released on SourceForge. I'm using a local subversion repository for version control for the time being.
Inspired by a request for a "sneeze" plug-in to mimic water drops on the screen... Sure, you can get pretty good effects with displace and bump map and what have you, but for an alpha xi AP Physics student like myself, that just ain't good enough.
Note: You'll need to write your own plug-in that actually calculates what the height field for a sneeze-lens looks like... Density of the droplets affected by distance and the "spray" factor, their height and shape determined by their cohesion and adhesion to the screen, how fast they hit the screen, and if any droplet is such a critical mass that it will begin sliding down the screen, possibly leaving a slight trail behind...
You should probably also add a checkbox asking the user if they've brushed their teeth since they last ate, in case small particles of food need to be factored in to the cohesion-equation and added as a seperate partially opaque layer...
This will only reflect/refract once per surface... So even if you make a really bizzare shaped lens, don't expect me to know or care that the ray left and re-entered the lens or anything odd like that... At that point, you need to go and get yourself a raytracer like POV-Ray.
This lens has a flat side right up against your image, like the spittle on your screen. Two-sided lenses could be on the TO DO list, but that could get messy...
We're assuming we're far enough away from the lens that the only rays we see from the lens are, for all practical intents and purposes, parallel to each other and perpendicular to the image.
Not everything planned works, but everything that the average user can see appears to be working relatively smoothly. I hereby deem refract to have progressed to "beta" stage. Three cheers for refract!
#warningsare gone, Refract moves from Distorts to Glass Effects.
Many thanks to . . .
pixel_fetcherfunctions I borrowed from his whirlpinch plug-in.
(For yellow sodium light, wavelength 589 nm)
Refract has re-surfaced. For the past few years, I considered it dead, as I wasn't getting much feedback on it, and Tom Bech and I agreed that if it was going to exist, it would be folded back into his Lighting Effects plug-in, where it was in 0.54. But that never happened, and I heard of a few people who like the plug-in, so I decided it was finally time to bring it back to life for GIMP 1.1.x. The dialog has been entirely rewritten to be more compact, less buggy, and more compliant with new plug-in features and standards (i.e. no more megawidgets).
[ GIMP homepage | Plug-ins at SourceForge | Plug-in registry ]