How to simulate water fluctuations with panner?

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:


In blueprint I can just use timeline to solve that problem, but how to do it in material editor?

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.

Yes, it’s work. Thank you. Can I additionally randomize directions for different meshes? Or I need to create material instances for that?

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:

You can create custom data by creating a scalar node, converting it to a parameter, and then checking the box labelled custom data.


You can then simply randomize that direction by using the set custom primitive data float node on your water component.

If you want to know more about the topic, there’s a great video by PrismaticaDev on the subject:

Thank you very much! It’s very helpful.

1 Like