Hello. I’m trying to simulate water in sink, so it should move very slow in forward direction and after a little time in opposite direction (like in old JRPG games). I think I can do it with panner but I can’t understand how. I’ve tried to use a sine function, but seems I can’t use it right:
There are quite a few extra nodes in your graph, but you’re on the right track.
TexCoord and Panner are UV nodes. Meaning they are normally meant to be plugged into a UV channel. TexCoord is raw, and Panner will modify that to make it move around.
Make sure to read the pins on the panner node- they’re very helpful. Time is how the panner node actually pans- stick a constant value in there and you’ll see the texture has moved. Speed, on the other hand, is probably something you want static. It just determines how fast it will pan when it does so.
You’ll want to plug the resulting UV (from panner) into the UV channel of a texture sample. That texture sample should be your water texture (I used a noise texture since I didn’t have any water laying around). If you just directly us the result of the panner as a color, it’ll just be a bunch of seemingly random ones.
The easiest way to randomize directions without having entirely separate material instances is to use custom data. We can do the actual direction changing through the CustomRotator node: