What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Smooth displacement effect


qwerty123

Active Member
Messages
38
Likes
1
I am quite impressed with the help I got for my last post. Way to go Gurus! Let me try something harder:
Filter > Distort > Displace is undervalued gem, yet it has significant drawback - the displacement does not interpolate between adjustment pixels. This shortcoming in combination with the fact that Photoshop uses very fine noise to smooth transitions between gradations in 8-bit channels and therefore creates very unsightly, jugged effect even when displacement source is a gradient. Unfortunately the filter does not work with 16-bit channels and its closest relative - Liquify uses meshes instead of images for input.
So here is my question: does any of you aware of a way, in Photoshop or otherwise to create silky smooth displacements within 2D imagery (there are bunch of software to accomplish it in 3D) using interpolated 8 bit or original 16-bit (or higher) images as source?

The attached image was produced by displacing perfectly smooth word "test" with plain black to white gradient at 999% displacement strength.
attach.png
 

Attachments

  • Displacement.jpg
    Displacement.jpg
    119.6 KB · Views: 4
Really can't figure out what is the problem. Could you post original image, gradient image and all the displacement options you used?
 
Really can't figure out what is the problem. Could you post original image, gradient image and all the displacement options you used?

Here we go. Please note the aliasing artifacts in the distorted image. I am looking for the way to produce image-based displacements with smooth edges.
 

Attachments

  • Displacement1.jpg
    Displacement1.jpg
    47.6 KB · Views: 4
Well, some thoughts by now:

1. Displacement filter is just what the name implies - displacement. Not streching, where it should fill the pixels in between.

2. PS uses noise for gradients only if you choose the Dither option.

3. PS does not make mathematically precise gradients. To every gradient PS creates it applies S curve. You can see it by historgam. As a result there are missed and doubled values along the gradient. Adobe thinks this is just what you want:cheesygrin: Looks good, but for Displacement filter it's not good at all.

4. Easy does it. Apply Displacement filter several times by small scales. That is: not 100 pixel at a time but 10 times by 10 pixels. May be you'll have to displace the displacement map itself along the way...

5. I don't use Displacement filter. I don' like the idea when you have no clue as to where and how the pixels would move. Some use this filter just to displace something somehow.
Liquify can very helpfull. By using masks in Liquify it is quite easy to make just the distortions you want.
Sometimes Transform warp can do a nice job. You can use it on Smart Object and lately reuse it by changing the contents of Smart Object.
 
Thank you SCTRWD.
1. Well, I realize that displacement filter just does it job and the issue is the absence of intermediary values in 8 bit channels, so 16-bit channels would significantly reduce the problem... but the darn thing does not work in 16 bit.
2. Without dithering the situation will be even worse - the abrupt transition between gray-scale values will produce aliased look.
4. Applying Displacement filter multiple times is not the same as applying it once with higher values - the next pass will displace different pixels rather than displacing them to different distances and the 8-bit problem will creep in multiple passes as smudging - it can actually look a bit like oil paint and has its own uses, but it does not solve the problem.
5. You can have pretty good idea where the pixels will move by using gray-scale values of R and G channels for color displacement map and R channel for grey-scale displacement map - and once you find the displacement map you like - the result will be the same for different size images once you account for new ratio. About 15 years ago the author of KPT filters Kai wrote pretty good article on it. I avoid Liquify because neither actions nor scripts can see it. I guess if you paint a lot it is cool, yet if you process a lot of images, it is not. But you are right about the Transform - you can work on tiny Smart Object images and later rebuild them to any scale you want preserving the distortion, you can even up-sample rasterize and down-sample it to avoid vectorization artifacts. It is nice to hear your opinion, there is always something new to learn in Photoshop.
 
Well, I realize that displacement filter just does it job and the issue is the absence of intermediary values in 8 bit channels, so 16-bit channels would significantly reduce the problem... but the darn thing does not work in 16 bit.

I doubt it would solve the problem. IMHO, the whole idea of Displacement map is wrong...

Applying Displacement filter multiple times is not the same as applying it once with higher values - the next pass will displace different pixels rather than displacing them to different distances

Well, I thought if you displace the Displacement map itself by itself with every step then multiple small displacements should amount to one big.

Apparently it's not so....

Apparently there is much more to Displacement filter math then Adobe tells us. They don't tell us what is gonna happen if two or more pixels should end up in one place, according to Displacement map. Which pixel wins in the end? And why?

And this is in part why I say you can't be sure what Displacement filter does. It's a Russian roulette of a kind. We are supposed to play the game without knowing the rules...

About 15 years ago the author of KPT filters Kai wrote pretty good article on it.

I would be very gratefull if you post the link to this article. After all Krouse was the one who invented Liquid graphics:cheesygrin:
 
Ok here is the link to Kai's article.

I think the main issue with the displacement filter is its unintuitive approach in 2D - when used in 3D it is extremely popular, just think of Zbrush...

One of interesting aspects of the filter is its somewhat fractal nature once it is used with plasma fractals. Render > Clouds will do as a map, displace screen size image at 100-200% and you will see what I mean - by selecting the area, enlarging it and displacing it again - the result is not noise, blur or blank (typical result of other filters) but rather stable self-similar pattern...
 

Back
Top