UE4 - How to z pann lava textures from up to down?

Hi, i´m having this issue with a lava texture, it always pans to a certain direction, in the case of a volcano, it moves down from one side, but at the other side is moving up, because it is not moving up or down, just right-left,

¿Is there a way to allow panning to calculate where is up and down, so, when creating a landscape volcano for example, it Will pann the texture always from up to down in z direction? this way it will auto calculate lava direction depending on Z height.

Please help.

either flow maps, or use different meshes with proper UV layout

Panning works on the concept of moving based on UV math which is basically two gradients representing a sort of horizontal and vertical layout. If you think of these as they would relate to a mound like a mountain, the top of the mountain would be white and the base would be black. This is the height and as such represents up and down… then another gradient would wrap around that which would produce a seam where black and white meet again running down the side of this mound. (See the image I’ve attached)

This would control the mapping and moving of your lava texture. Your regular texture would be mapped using the regular means… you would just need a black and white mask to control where your moving lava is. (white being lava, black being ground)

In this way, you don’t have to modify your mesh’s UVs… just use these gradients to control them in the Images UV layout.

I made a video a while back explaining how to use UV math to make shapes… if you watch to about half way, I show how to use the math nodes to make both gradients I show in the images. Otherwise there are other ways you can make these maps using the height map of your mountain (if you used world machine or Gaea to make it) and then you have to come up with an alternate method for your second gradient to wrap around. I have a few ideas there… anyway, if you want to watch it, it’s here.

Hope that gives you some ideas :slight_smile:

It looks cool, but, i´m not that advanced, so i have no idea how to make it work into a BP, so i can make a material to move from up to down, based on landscape height, aldo i do understand the concept of gradients, the video never showed how the resoult looked, after been applied into a landscape or mesh, just inside the BP, wich also makes it harder to understand.

please, If you find a way to Flow a lava texture from up to down, maybe with the Flow control idea, please share a BP pic