Resolved: How could I paint a texture on a mesh and make it flow in a certain direction?

Hey all,

I was wondering something. How does one go about painting a texture on a mesh and make it flow in a certain direction? Think of it as a Flowmap or something similar. I have tried the method using 3rd party software and it doesn’t seem to work right. I saw some videos like this:

And I would love a tutorial or some idea on how to create something like this, without needing to use outside programs.

Hi Nednarb1986,

Here is the material overview for flow map textures:

Here you can download the complete package:
[CLICK HERE TO DOWNLOAD THE COMPLETE PACKAGE][2]

This is a cool technique, Valve and Naughty Dog wrote some cool articles about it.
Valve:
http://www.valvesoftware.com/publications/2010/siggraph2010_vlachos_waterflow.pdf

Naughty Dog:

Here is a cool flow map painter you can use:
http://teckartist.com/?page_id=107

You can import the texture and use it in the material when you turn on the static parameter switch “Use Flow Texture” in a material instance of the Flow material. If you want to use vertex colors instead, which sometimes gives better results, Unreal allows you to import a texture in the vertex color painter. The material uses the vertex colors when “Use Flow Texture” is off.

When using vertex colors painter inside Unreal, be aware that R moves it on the X axis and G moves it on the Y axis. 0.5 means it does not move, 1 means it moves right, 0 means it moves left. For Y that means up and down.

Good luck and have fun with it!

P.S. Let me know what kind of crazy stuff you did with it in the end :wink:

Thanks I’ll give this a try and get back to you!

I’m getting an error, I’m pretty sure I plugged these in right:

He Nednarb1986,

There is a download link with the complete package that you can just drop in your content folder.

The mistake in your graph is that you plugged your noise RGB in Multiply (the one connected to Noise Strength). This means later on, the multiply that is giving the error, is trying to multiply a float2 with a float3, you can’t do that. Since noise is black and white you can just get the R channel.

Okay it seems to flow right, but when I go to paint on it. The direction of the flow doesn’t alter, is that something I would need to set up with the material?

“When using vertex colors painter inside Unreal, be aware that R moves it on the X axis and G moves it on the Y axis. 0.5 means it does not move, 1 means it moves right, 0 means it moves left. For Y that means up and down.”

So to clarify, a panning texture just changes the uv offset over time. UV = XY = RG. So you can change the panning direction to go left by painting (R → 0, G → 0.5). Unreal does not have any feature to calculate the mouse direction while paainting the vertex colors.

That is why I recommended the following:
"Here is a cool flow map painter you can use: FlowMap Painter – teckArtist "

Yeah okay, sorry to waste your time lol. I did download that very same program you mentioned a few days ago and it works wonders, I was just hoping for more control over the direction of the flow within the editor itself like in the video I posted above, perhaps this could be a feature the could be implemented into UE4 in the future?

You have exactly the control you see in the video, because in the video the guy changes colors as well to change the direction. it is exactly the same, change the R/G colors to change X/Y direction accordingly, it’s a bit strange, but you can get used to it.

That is why I also have the toggle for flow maps, just so you can use a program that is actually made for it.

Make sure you put the answer on “Resolved” if you feel your question was answered well enough.

Ah okay, I guess I never made that connection. Thanks for taking the time to look into this for me. I feel that this has been resolved.