PDA

View Full Version : PS Glass Distort filter for Gimp?



Gidde
07-13-2010, 08:31 PM
(the Distort - Glass filter on the river gives it away but I don't know if GIMP has something similar or not)
It does not, much to my dismay. I've been experimenting for days trying to find something in GIMP that will even approximately reproduce the effect.

RobA
07-13-2010, 10:42 PM
It does not, much to my dismay. I've been experimenting for days trying to find something in GIMP that will even approximately reproduce the effect.

I have this in my notes from way back....

* Duplicate your layer, run a Sobel edge-detect on the duplicate, and then add a touch of Gaussian blur.
* Create a new white layer (Xoffset) and Bump Map it against the duplicate with darkness compensation disabled, an Azimuth of "0", and an elevation of about "30".
* Create a new white layer (Yoffset) and do a Bump Map against the duplicate with darkness compensation disabled, an Azimuth of "270", and an elevation of about "30".
* Perform a Displacement Map on the original layer, using the Xoffset and Yoffset layers as the corresponding displacement maps and adjusting the amount of displace to suit.

Can someone with PS and Gimp compare, and if it works I can script it up, OK?

-Rob A>

Gidde
07-13-2010, 11:06 PM
Hmm. I just tried this, and with a noisy ocean layer the sobel edge-detect gives me a completely transparent layer; dead in the water. Then I tried it with a black and white land-mask type image, and got very little distortion (even with displace values > 100). It looks like the distortion it does give is on the right track though. Could be that it needs something more defined than solid-noise colored clouds (with light coastal area - same as I started with for my glass-ified ocean in my last map) and less defined than black/white stark image. I'll keep playing with it.

// Edit: Here are some comparison images in case they help. The blue image is just original and photoshop versions. The B/W is following the instructions you gave with a 200 displace.

RobA
07-14-2010, 10:31 AM
Hmm. I just tried this, and with a noisy ocean layer the sobel edge-detect gives me a completely transparent layer; dead in the water. Then I tried it with a black and white land-mask type image, and got very little distortion (even with displace values > 100). It looks like the distortion it does give is on the right track though. Could be that it needs something more defined than solid-noise colored clouds (with light coastal area - same as I started with for my glass-ified ocean in my last map) and less defined than black/white stark image. I'll keep playing with it.

// Edit: Here are some comparison images in case they help. The blue image is just original and photoshop versions. The B/W is following the instructions you gave with a 200 displace.

Playing a bit more.

I tried Filter->Edge Detect->Edge (Sobel, value 10) (Not Filter-->Edge Detect->Sobel)
Gaussian blur 5
Duplicate the blurred layer.
Filter->Distort->Emboss (emboss, 0,30,30) on one (used as X displacement)
Filter->Distort->Emboss (emboss, 270,30,30) on the other (used as Y displacement)
Filter->Map->Dispace (20,20, edges smear)

The blur changes the size of the ripples and the displace amount controls the sharpness?

Here is the result:
26987


-Rob A>

RobA
07-14-2010, 10:35 AM
I moved these posts to the how-to? forum...

-Rob A>

Jaxilon
07-14-2010, 10:42 AM
Look great RobA.

hohum
07-14-2010, 10:57 AM
Here is what I got:

26988

You need to run Filters>Edge Detect>Edge with a sobel setting. Then the displacement map with setting of 50 for both. If you do Filters>Edge Detect>Sobel you get a transparent layer.

This is with lighting effects with a Yoffset layer bump mapped.
26989

And then the two combined with the light effects layer at 25% opacity.
26990

Not perfect, but perhaps on the right track. I had tried a beaten metal effect with felimage galvanized noise and lighting effects that also did something similar.

RobA
07-14-2010, 11:43 AM
It looks like sobel of the source is just an option (ripples will be harsher where there are larger transitions, and the ripples parallel the transients).

Here is the same, but starting with a high turbulence plasma cloud that was blurred 3px sobel edge detected, plurred 3 px again, then the rest of the steps followed (displace of 10 in the last step):

26993

-Rob A>

hohum
07-14-2010, 12:57 PM
I'm just stealing you guys's stuff to see it side by side.

Gidde's: RobA's:
26995 26996

Pretty darn close. Perhaps just a little more blur to the final image and they would be identical.

Gidde
07-14-2010, 04:52 PM
Good call on the move! We had totally hijacked that poor thread ;)


I tried Filter->Edge Detect->Edge (Sobel, value 10) (Not Filter-->Edge Detect->Sobel)

Aha! That was my problem.

Thanks for helping test this out, Hohum, your test looks absolutely fantastic. In fact, the difference between yours and mine looks almost exactly like the differences if you play with the settings in the PS filter.

I can't wait to try this on my current WIP. Rob, you are, as ever, my hero.

RobA
07-14-2010, 05:37 PM
Try this script and play with the sliders.

-Rob A>

Ascension
07-14-2010, 05:42 PM
I'm so glad that I just have to click one button and move some sliders in PS instead of all of this :)

hohum
07-14-2010, 11:03 PM
Sweet script RobA. Here is what I got with settings of Ripple Size:2, Ripple Spread: 20, Ripple Intensity: 60.
27008

I noticed some artifacts along the edges. I think it occurs in the sobel edge detect step.

Ascension
07-14-2010, 11:11 PM
That sort of thing happens to me in PS when using displacement maps.

Seretur
07-15-2010, 12:37 AM
Awesome! Time to add another script to your signature. :)

Gidde
07-15-2010, 07:32 AM
That edge stuff happens in PS, too, don't worry about it Rob.

RobA
07-15-2010, 09:35 AM
Sweet script RobA. Here is what I got with settings of Ripple Size:2, Ripple Spread: 20, Ripple Intensity: 60.

It was a bug in the displace filter function call documentation (I've submitted a bug report). This version should work now:
27029

EDIT: Updated one again to allow plasma, cloud noise, or source image edge rippling, plus an option to keep the original layer, and create the ripple layer as "new".

-Rob A>

hohum
07-16-2010, 09:43 AM
That's the ticket, worked like a charm.

27139

Thanks RobA. I'm still going to try and tackle a few script fu's just because I want to understand the code, but this script rocks.

[EDIT- I think that this image was with v.2 of the script, I just downloaded v.3]