Animated texture using UVs

Hello everyone,

I am trying to set a simple animated shader using UV offset, just like it can be done in Unity using texture offset (over time) or Panner node in Unreal Engine.

I am taking this example as a reference:

If I modify the code like this, can see the texture just moving through the mesh (this is exactly what I need)
water.waveHeight = 0;
water.bumpHeight = 1;

The problem is that I have set the whole scene using the baked lights from the 3D software, and this animated shader seems to require a babylon light to work.

Is there any way I can set this shader to a specific mesh without affecting the whole scene because of the need of Babylon lights?

Thanks!!!

It seems to require or really requires it?
Is it possible to see your shader?
Is it possible to create the same effect without shader?

What has this waterMaterial PG to do with your shader? Can you share your shader version?
If your shader requires light to work, what about creating a node material (from scratch or from an existing base)?

Thanks for your answer, the thing is, I am really new to these Babylon aspects, I just dont know how to do this. Could you please help me? :slight_smile:

I dont know how to achieve this, could you please give me some help? :slight_smile:

Here is one of examples with animated textures - Lava Fun - https://www.babylonjs-playground.com/#B6M2DD#2

1 Like

Do you mean setting-up a playground or creating a node material with the node material editor?
@labris already gave you a base of a liquid animated type of node material. Here is another one from the doc that could be relevant to you. The rest is basically knowledge about how nodes and materials work. I believe watching a video could help. You’ll find some pretty comprehensive ones on the bottom of the link I shared above.

For setting-up a PG, simply follow the instructions in the doc.

Once you have either set-up a PG or the base of node material in the NME, you can share that snippet with us along with your questions/problems and, of course, we’ll try to help (if we can) :wink:
Meanwhile, have a great day :sunglasses:

My example is even simpler, there is no Node material, just usual textures.

Here is another nice example - https://playground.babylonjs.com/#27Y5SJ#4 from this thread - Texture UV animation is very slow