Gimp-Forum.net
how to deform a layer according to another one? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: how to deform a layer according to another one? (/Thread-how-to-deform-a-layer-according-to-another-one)



how to deform a layer according to another one? - DanielMalaga - 07-04-2022

Hello,

I would like to deform one layer according to the information in another layer.
For example:

I have a photo of a lake, that I want t deform, and a photo of a face in an other layer that I want to use as the shape.
Now I want the water in the lake to be deformed in the shape of the face. Similar effect like using the warp tool but according to the shape in the other layer.

or

I have a photo and in another layer an image of crumbled paper. I want to "crumple" the photo according to the paper layer. Not just combine the layers somehow, but really deform the photo layer, so that it actually looks like crumbled.

I haven't found anything in google, but this might be because I am not able to express the right question...

Is there a tool, a filter, a script... that can do that?

Thanks for your help!


RE: how to deform a layer according to another one? - sallyanne - 07-04-2022

What you need to do is 'map' it to the layer. or bump map it
Here is a example of bump mapping.
https://www.youtube.com/watch?v=2ot6I7frxZA&t=7s
I just did a quick one
[attachment=8234]


RE: how to deform a layer according to another one? - rich2005 - 07-04-2022

Face in a Lake: Same as previous post use Filters -> Map -> Bunp Map

Goes like this: https://i.imgur.com/GSHuO65.mp4

Crumpled paper: You use the Displace filter Filters -> Map -> Displace  but even more than the bump map, all depends on the source image(s)

Goes like this: https://i.imgur.com/7KmzsqR.mp4


RE: how to deform a layer according to another one? - DanielMalaga - 07-07-2022

(07-04-2022, 05:34 PM)rich2005 Wrote: Face in a Lake: Same as previous post use Filters -> Map -> Bunp Map

Goes like this: https://i.imgur.com/GSHuO65.mp4

Crumpled paper: You use the Displace filter Filters -> Map -> Displace  but even more than the bump map, all depends on the source image(s)

Goes like this: https://i.imgur.com/7KmzsqR.mp4

Thank you for the hints. I already experimented a bit with displace, but I get very "pixelated" results, instead of a smooth distortion, as in the video, my sample-image seems to get burst into sand...

[Image: nzz_displace_.jpeg]

ok, I used high levels for this sample to show the effect.

But how can I achieve a smoother effect?

The bum-map filter I don't really understand, I don't know what it actually does, in my eyes it just overlays one layer over the other but doesn't give that distortion effect I want to achieve. Also in the video the water doesn't actually take the shape of the face (which would be what I would like) but just adds the shades...


RE: how to deform a layer according to another one? - rich2005 - 07-07-2022

Quote:...But how can I achieve a smoother effect?

Yes, looks a bit excessive. It might not be possible to easily get what you require.

This is about as crumpled as I would go.

[attachment=8240]

1. Add a new layer and fill with Solid Noise Filters -> Render -> Noise -> Solid Noise. Do not make it too extreme. https://i.imgur.com/3stXZmM.jpg

2. Use it in the Displacement filter as the Inputs. If you set the Abyss policy to Black you get a bit of a deformed border. Again do not make it too extreme. https://i.imgur.com/y5vNPUe.jpg

3. To add a bit of depth use the bump-map filter. The solid noise layer again the input. https://i.imgur.com/xN6rP1p.jpg

You are moving pixels about, so expect degradation. Also depends on the size of the image.

Quote:The bump-map filter I don't really understand, I don't know what it actually does, in my eyes it just overlays one layer over the other but doesn't give that distortion effect I want to achieve.

It provides light and shadow to give an illusion of depth.
see: https://docs.gimp.org/2.10/en/gimp-filter-bump-map.html

Quote:....the water doesn't actually take the shape of the face (which would be what I would like) but just adds the shades...

Again the bump-map provides a semblance of depth, all depends on the surface of the water.


RE: how to deform a layer according to another one? - DanielMalaga - 07-07-2022

Thank you very much for your helpful tutorial and for taking your time!

I did many trials now and I found out that the "pixelate/sand-effect" was because of my error/stupidity... I had the crumbled paper file open in a window, copied/pasted it as a layer to the newspaper-file. Here I applied some gaussian blur to "erase" the paper structure.

But then, in the displacement filter instead of the blurred layer I clicked on the original paper file which has this grain structure that then produced the "sand-effect". Using the right layer I now got a similar effect as in your sample. :-)

Now my next task is how to add hard crinkles.

What I achieved until now is some wavy effect (similar to your sample) due to the softened/blurred paper-layer. As I now understood the basics of those two filters thanks to your help, I guess with trial and error I'll find out. If you have a hint at hand I'd be grateful, of course, but in general my problem of this thread is solved.

Thanks again.


RE: how to deform a layer according to another one? - sallyanne - 07-08-2022

Keep practicing. You'll get it