"Undo displacement" after compositing, why is it not working?

Hi there! First time posting here so I hope I am not doing something wrong. If so, please forgive me :slight_smile:

I am quite new to touch designer and I am encountering an issue with the displace TOP.
I am trying to replicate the effect I saw being done in Photoshop. Where it is possible to stack different effects on top of one another, resetting eventually the original effect, by applying the same effect in reverse.
EDIT:
Here is the video example:

The idea is simple, I want to build a network that would allow me to :

  1. Add an image/video
  2. Displace it using Displace TOP and a noise texture
  3. Apply compositing to the displaced image, for example composite in a textures or other effects…
  4. De-Displace the image/video to it’s initial condition using the “negative” of the initial noise texture, used to displace the image in the first place.

Now, in order to do this I created the following network:

As you can see I am doing as described. In my (surely faulty) logic, the inverted noise should “reset” the initial displacement but instead it displaces the image even further.

I have banged my head against this for a while and I don’t seem to find a solution.

So I am wondering, do you think this is even possible?
And if yes, how would you go about doing something like this?

Thank you so much for any help and or feedback.

Cheers!

Hello @sundftig,

welcome to the community!

It’d be great to see what effect you have in mind - would be fun to help you recreate it.
For what you are showing in your network, there are a few issues: mainly that with the displacement you are loosing information on the original image. Maybe the same network with a simplified displace makes that clear:

In here the displacement is just done by 2 values (like a super simplified noise) One “pixel” has no displacement, the other has a horizontal displacement value of approx. 0.1. The result is just a horizontal displacement but what is already apparent, is that we loose some of the original pixels and there is no way of getting them back. When we try, we see that the image can’t be reconstructed.

For you idea though, would it not be enough to displace the effect layer first and then composite?

cheers
Markus

1 Like

Hi @snaut !

Thank you so much for you reply!
Yes, I was afraid of that… it makes sense. Thank you for your explanation.

I was expecting at least an approximation of the original image, and instead it seemed to really displace it even further in the opposite direction.

And yes, I also had this brain fart earlier, thinking “why don’t I just displace my texture/effect and then composite”, as you are mentioning as well. And that makes also total sense xD
HOWEVER, I managed to find the video I am taking inspiration from and indeed it seems like the process is desctructive but at the end the original image sort of comes back in a more convincing way than what my network does.

Here is the link: (I will also edit my orignal post)

Here you can see how the layer is first displaced in one direction, then a filter is applied, and then displaced in the opposite direction.
That destroys data but the skull comes back at a later stage, more than my beans did :smiling_face_with_tear:.

Maybe the pixellated effect will mitigate the loss of data and the displacement will work? I need to test with a pixelate effect. Assuming I will figure out how to create it. :slight_smile:

Any thoughts after watching the video? I am curious on your take here!

Thank you again for the speedy reply!

Cheers!

Hi @sundftig,

ah - that is a nice effect.

You can find the Twirl and Pixelate Components in the Palette under ImageFilters.

Best
Markus

1 Like

Hey @sundftig,

an idea initially was that just reversing the noise is not enough - rather you need to know how much to move a pixel back from it’s new position. So I did give it a try by displacing a UV Map and then using the result as a lookup into the noise to be able to invert the original noise values at their new position.

But with the fact that pixels are being overwritten, this just seems not possible (or I’m thinking about it wrong)

cheers
Markus

1 Like

Oh wow, then it was much easier than I thought to replicate. It is literally the second time that I try to tackle TouchDesigner so I am still not familiar with all the features. Thank you so much for the examples and the effort!

I love it here! x)

1 Like

Interesting, and it’s pretty cool to see your approach! A lot to learn I see…:sweat_smile:
I saw this UV map being used in many tutorial, still trying to figure out what that is actually all about. Even tho I am quite experienced with Node Shaders in Blender, I don’t seem to be able to carry a lot of that knowledge over to TD… yet.

Btw, I also tried to replicate the network there in Blender, working with textures. I ended up having similar result and the setup seemed to be even more finicky.

Maybe, although the logic would make sense (in my head anyway) this just cannot work.
I think the nature of noise displacement is somehow different form the concept of twirling an image?
I am not sure.

Once again, thank you for all your help!
At the end of the day I learned how to achieve the desired result, and that’s what I was after.

Thank you!

Paolo

Hi @sundftig,

what’s useful about a uv map is that every pixel has its coordinate described in it’s color. The x position of a pixel is described by it’s red value and the y position by it’s green value.
Now since you want to do this independent from resolution, you use a normalized value range from 0 to 1 in each direction which then is referred to as a UV Map.
Now when warping an UV map, while the pixels move, they retain their color value and hence you can still retrieve their original position from them.

Great to come with knowledge from other packages and try to rebuild things here. It really gets you to understand the platform and also allows to bring criticism on how things could perhaps be improved.

Cheers
Markus