Hello everyone, I have a quick question for you because i’m learning UE4 (4.25). I did a river for a school project. I just applied a water shader that I created on a Spline.
There is many rocks and I wanted to create a “collision” btw water and rocks.
Here’s a picture, the water go straight through the rock.
Is there a solution for the water to be diverted by the rocks?
(Sorry for my bad english I’m french, I hope you will understand my question).
A common technique is called “flow mapping”. I’m not very familiar with Unreal specifically, but it looks like there are a couple of tutorials out there. Maybe someone else can recommend a specific one better than the rest.
So Flowmaps are basically UV coordinates, that, due to how they are colored, distort the texture. If multiplied with time, they will “move” according to their direction (which is represented through the color value of the flowmap texture).
The first video that aarku postet, shows how you set up a Tool, to paint on the mesh to create a texture that you can use in your water shader. And then you can save it and use it as a regular textureobject/texture sample in the water shader. Though, I like this video from Simon more than the one from Lous: https://www.youtube.com/watch?v=tEr3NE_XLbc
Personally I think the flow map can yield great visual results, but are pretty finicky to use and set up.
I recommend trying to blend between the “flow speed” with vertex color. It is probably not the perfect result you want, but imo gives enough illusion for it to work. Especially if you also use it for some other effects like WPO or a foam layer, which sells it mostly.
Here are some examples that I threw together right now, though I recommend giving the mesh higher vertex resolution, for a more smoother effect.
You can do to things in the material, Lerp it or multiply it. Here are to node setups I used in the example above: