3

I'm looking forward to make this exact textured glass effect over any image, in Photoshop and Affinity both. My search returned different type of textured glass effects made by distortion filter. But I need exactly this one in example and this should be achievable in both Photoshop and Affinity.

The effect basically distorts an underlyng image with vertical stripes, as if looking through a textured glass. Similar to this cupboard https://kavehome.com/en/en/p/trixie-glass-cabinet-70-x-143-cm?utm_source=google&utm_medium=cpc&utm_campaign=14581814603&utm_term=&utm_content=544595259574&gclid=CjwKCAjw-IWkBhBTEiwA2exyO_ztgmGU-NM6twwZz-lX-_lsZO01P3TjmxMA6i9xc4-6ohT7EdQUIBoCMJsQAvD_BwE

enter image description here

3
  • If you expect an effect you should also show the image without the wanted effect or make otherwise clear what the wanted effect causes. Now only guesses are possible . It looks obscuring glass, maybe the reeded one like in this ad ukglasscentre.co.uk/reeded-pilkington-glass Right? Here's one old attempt to make it in GIMP graphicdesign.stackexchange.com/questions/157893/…
    – kexxgem
    Jun 8, 2023 at 21:19
  • 1
    @kexxgem Hi, I could not find the image without the texture, but I added more details. Hope that helps. The GIMP tutorial is lacking certain finesse. Each of the vertical stripe not only divides the subject but each segment is also slightly distorted than the next, if you notice closely.
    – Bluebug
    Jun 8, 2023 at 21:36
  • 1
    @Bluebug - I wrote the other answer for using tGIMPs displacement map for a similar effect. You could perhaps blur the displacement map just a little to get a more distorted effect, or simply start with a pattern of vertical solid lines and then blur it a little. Some experimentation may be required. Results will of course depend on the actual image file being distorted. BTW the same can be done in Photoshop, it also has a displacement map filter.
    – Billy Kerr
    Jun 10, 2023 at 12:26

1 Answer 1

4

Something resembling can be got by inserting a periodic (stripe width) geometric distortion which affects only horizontally. In addition to emulate "it's made of glass, which causes also gloss and light variations" you must add a blended layer or a masked adjustment layer which generates the light variations. It must have the same repeating period as the distortion stripes.

Affinity Designer doesn't process photos, but its brother Affinity Photo has "Deformation with equations". It can create the distortion. Quite the same is available in the G'MIC filter pack which is freely available for GIMP, Krita, Paint.NET and Photoshop. In G'MIC it's named "Cartesian Transform". I have it in Krita. An example of the final result:

enter image description here

It has the repeating geometric distortion and light variations The image was originally an espresso cup set advertisement in a randomly found webshop.

To create just the same periodic horizontal distortion as used in your examples needs some serious knowledge and math talent. I am unfortunately only able to handle some elementaries, so I make something simple. Here's my filtering dialog:

enter image description here

The parameter W means the image width in pixels. The X-expression presents where the result pixel is picked from. Y=Y means no vertical changes.

The result is this:

enter image description here

It has no light variations. They are inserted later.

The periodic distortion is based on the simplest commonly available periodic function "sin()". Someone who knows something maybe can write a formula which approximates better your examples. Python language math expressions are available.

One thing is sure: No math distortion formula will be 100% perfect. Why? Because the effect of the glass depends radically on how far behind the glass the watched objects are. Cannot believe it? Then take an ordinary looking glass and try. That distance dependent refraction result is true for all convex lenses.

A photo contains no depth information, so there's no way to distort differently objects at different distances. Photorealistic 3D-rendering can do it if the composition is a 3D model. Forget it in Photoshop and Affinity.

Different results can be got by changing the distortion formula. Here's only for a comparison a version with increased horizontal scattering. The scattering amplitude W/30 is increased to W/20. One stripe gathers light now from 50% wider area:

enter image description here

The result may be good enough even without the light variations caused by the gloss of the glass. To check what the glossiness give I added the light variations as a top layer pattern of stripes which have blending mode soft light and reduced opacity. The pattern was this:

enter image description here

The right period was got by painting it only a little in the left and by adding the next Cartesian transform:

enter image description here

I only removed the +x from the expression for the x. The result was smoothed by blurring and the contrast was increased to compensate. The result after reducing the opacity and changing the blending mode to soft light the result became the same as shown in my starting image.

EDIT: The periodic distortion based on function sin() creates quite round effect. Your example and the Pilkington reed glass in my comment maybe have more prism-like stripes. The sharp step edges in the result hint to that direction. To approximate it the periodic function must have a clear discontinuity. A simple way to get it is to use the fractional part of integer division. In the next example it's (X * W/40 - int(X * W/40)). It drops to zero after every W/40 pixels:

enter image description here

6
  • you can quite easily estimate the distance from the image to introduce some distance based distortion. Or then just render it in 3D
    – joojaa
    Jun 11, 2023 at 20:14
  • Distance estimation from a single image needs a substantial amount of knowledge of our world. I wouldn't call it easy. AI programmers may handle it. Rendering in 3D is useless if the target behind the glass is a 2D photo.
    – kexxgem
    Jun 11, 2023 at 20:26
  • You dont need to do the work, there is a GUI version of stable diffusion (automatic 1111, would be one) with control net that comes with 3 decent one image depth estimators. All you really need is to install it and say you want a depth estimation of this image. So what your saying is a bit outdated, it was hard to do this a year ago agreed. But now you can easily find it nearly eveywhere and its nolonger even entirely bleeding edge.
    – joojaa
    Jun 12, 2023 at 6:33
  • It might be more effectivel to ask the AI system to show the wanted scene like there's a reeded glass plate in front of it. Unfortunately "A set of espresso cups seen through reeded glass" doesn't work. Or actually it works, but the result is not the expected one.
    – kexxgem
    Jun 12, 2023 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.