I'm looking for an image filter that produces similar results to this one: http://www.jhlabs.com/ip/filters/WaterFilter.html that will work in Paint.COM. All i'm looking for is the source code.
Looks like i might be able to use the photoshop plugin...
The mentioned site also has the source codes (in Java, but does not differ much from C++).
RW Photos has almost the similar thing in Effect->More effect->Displace...
The same operation can be added to Paint.COM via script. It is not there by default, because it needs a height map and there are no sample files distributed with Paint.COM.
Can the script also be found in the SDK? i cant use rw photos here (no admin privileges)
var amount = 50; var displacemap = Application.OpenDocument("C:\\folder\\heightmap.png"); var dispcanvas = displacemap.RasterImage; var image = Document.RasterImage; Blender.Compose(Document, 0, 0, image.SizeX, image.SizeY, dispcanvas, 0, 0, null, Blender.OpHeightDisplace, amount);
so my code looks like this right now:
var amount = 50; var displacemap = Application.OpenDocument("H:\\RWPaint.com\\ripple.png"); var dispcanvas = displacemap.RasterImage; var image = Document.RasterImage; Blender.Compose(Document, 0, 0, image.SizeX, image.SizeY, dispcanvas, 0, 0, null, Blender.OpHeightDisplace, amount);
Ok thats in configuration what do i put in execution?
I have two heightmaps prepared.
im using these:
http://read.pudn.com/downloads104/sourcecode/windows/opengl/425603/Application%20Nature/Data/Water/water.png http://daedalus.f2s.com/HW2B5TC/TestBox1_height.png <renamed to 'ripple.png'
both require a little editing but that can come later.
Okay there are no errors with this code in Configuration and Execution but nothing happens.
var amount = 50; var displacemap = Application.OpenDocument("C:\\Program Files\\RealWorld Paint.COM\\ripple.png"); var dispcanvas = displacemap.RasterImage; var image = Document.RasterImage; Blender.Compose(Document, 0, 0, image.SizeX, image.SizeY, dispcanvas, 0, 0, null, Blender.OpHeightDisplace, amount);
P.S. i now have admin privileges
The code should be in Execution box. The second image looks good.
Allright so i want the filter to be treated like a rectangle with perspective transformation. how would i get that effect?
If you still do not see any ripple effect it might be because your image is too small and the heightmap is uniformly black black in the upper left corner. The first mentioned file was a normal-map and Blender.OpNormalDisplace should be used instead of Blender.OpHeightDisplace with that (bluish) file.
I do not understand what you mean be the last sentence with the perspective transformation.
Oh god sorry i completely failed there. I didn't know i had to have my image already selected and then hit custom operation.
And one more thing, how can i save the custom operation for use later?
If you work with the custom operation, then just saving the code in a text file is OK. But you can also right-click on the toolbar and then duplicate the custom operation or another of them and re-configure it. It is also possible to export them from the configuration window.
Alright i got it working go check out the flickr page for the result.
The distorted reflection looks very good. Now I understand what you meant by the perspective. It would be hard to get a proper perspective correct water wave distortion effect - that would be a task more easily done with a 3D scene.
Look at this example of ripples, it's a link to download a private p2p programme, and once installed, click the info button & run the pointer accross the RetroShare logo.
p.s., apart from good ripples & tetris, RetroShare's a really good private sharing network You can also get sourcecode. Hope this is of some help
I have a neat little water filter custom operation button in my program now