I am trying to create a flying flag using a vertex displacement shader. I did it with the simple gradient noise node. But I read somewhere these nodes are expensive to use. So I try to figure out how to use a custom grayscale gradient png instead. But I don’t make it work until.
If I use SimpleNoise output to offset the Y of the current position and feed PBR master, it works perfectly. But with the external gradient image, I could not get it done. What am I doing wrong?
If you are using a grayscale image there is no need to add the rgb values and then divide them and clamping them. They are all the same value between 0 and 1. I will try to recreate your effect and see if i find what was happening.
so here is how i have done it, i used object space, and i multiplyed the tiling uv with a small number then used fraction and combine the position with the object position and feed that into the pbr master node. You should reiterate on this if it isnt distorting in the right direction, also i added the distortion onto the y-object position you might want to feed it without that part. The thing that i found that might have been your problem is that the position uv-s did cover a small part of the texture so the flag was moving up and down as a whole thats why i addad all the above mentioned part.
I edited my last post to explain it but i will do it again in more detail. The problem was that the uv-s that you feed to the sampler werent covering your whole texture. So the flag mostly got the same value for all of it vertices. The multiplier and the fraction part makes it so that you expand the values in the uv-s. Fraction is also useful if you want to tile your uv coordinates so than you multiply your uv-s with a large number instead of a small one.