Download

4.26 Water body Ocean - creating foam on the wave peaks


Hello i’ve been doing some tests with the new water that came with 4.26, i’ve been trying to make my own foam that i want to form on the peaks of the waves, i usually used the heightmap of the waves but the way the new water system works doesn’t seem to use heightmap but only a Normal and World position offset?

Am i blind or is there a height map of sorts hidden somewhere? or can i find the information some other way and convert it to something looking like this displacement map.

](filedata/fetch?id=1856757&d=1611704630)

I want to use the information to have foam form only on the peaks of the waves. atm i’ve created something out of the normal map by using only the RG channels but the problem is that with this system the foam will never be exactly at the peaks. the result

I’ve been able to generate something looking like the heightmap for the peaks using the Water Z Height from the WaterBodyData and subtracting the Absolute world position and adding it to the world position offset and after breaking it and only using the blue channel.

Giving me something looking like what i want but its not sharp nor well defined. the falloff is also extreamly sharp with some transitions i think comes from the mesh lods lenghts same with the artifacts seen as the squares on the edges.


Anyone with any ideas what i could do differently?

Hi did you ever find a solution?