Dynamicly working water foam texture material
I want to make water with a foam texture around its edges and I would like it to be dynamically changing with the environment, not necessarily with any other actor like the player character. I've been trying to figure this out for quite a while now and I've tried doing it with the depthfade node without any success.
This looks like a promising start but it might just look like it. The depthfade affects the z direction also, which is something I don't need.
I was wondering if there was maybe a way to make the depthfade only in x and y directions and somehow use it as a mask to then apply some textures on to? There's probably a better way to do it though, thanks for any help.
asked Nov 20 '15 at 11:32 PM in Rendering
So essentially what you want to do is take the Depth Fade you are using to create the waters edge, and Lerp your foam into the Alpha of the channel of the Lerp to create the edge foam look you are going for. There are a lot of different ways to do this, and there is a community project as a work in progress that implements a lot of commonly requested water features that add to its realism.
You can download this project and reverse engineer their Materials to get a better understanding of how to create a realistic and dynamic water shader. I will warn you, some of the things they are doing are fairly advanced, so take your time when going through it.
Ocean Shader [WIP]
If you have questions, DotCam and the others who contributed to the shader are more than willing to help. They are great community members and have provided this as a free open source project to help anyone who is interested. Let me know if you have questions!
answered Nov 25 '15 at 05:38 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here