Hi, I know this is a stupid question, but how can I add some type of collision to a game object (island) so that foam forms on the “beach” (around the island) and water doesn’t flow through the island mesh? (I work with default HDRP water system)
Thanks for any reply
water flow through the island mesh:
Download the Water sample from HDRP package manager samples tab.
And open the scene called “Island”, you should find what you are looking for 
Open the ocean gameobject and inside the ocean shader graph you should see this pack on nodes that adds foam on the side based on comparison of the water surface height and the depth buffer (basically when the water is shallow)
2 Likes
And how can i add collisions to the island so the water doesn’t leak throught the mesh? like in images I added
Multiple solutions :
Either use a water excluder there or just a water deformers (now called water decal in U6) to push the water a little below the geometry so that it cannot be seen.
Also, a water mask can also help tone down the lowest frequency (the swell) so that there’s no waves there going above your island.
There’s discussions for this exact problem already in the water system thread.
1 Like
I can’t find the water mask anywhere in the ocean settings
If this is checked in your graphics settings :
Then the water mask won’t appear in the water surface setting anymore but should be available as an output in the shader graph master stack of a water decal !
There’s two workflows.
1 Like