3

I'm trying to create a shader that creates a sea foam around an island, is there a way to make it with just the shader?, i'm using an ocean modifier for the sea, and I want to make a factor in the mix shader that mixes by considering the intersecting line between the sea mesh and the islands.

1 Answers1

2

I achieved the following result. Apologies for the "before" shot, it's the only thing I have:

enter image description here

I have this "gulf" scene where my beaches are just planes sticking into the "ocean". That's a plane with a big Ocean modifier and a 20m Solidify modifier.

enter image description here

What I found was that in your ocean's node tree you can use an Ambient Occlusion node set to Inside and that appears to make it aware of intersections through the final mesh after all the modifiers are calculated.

enter image description here

I used various methods to add noise to this and used it as the factor of a Mix Shader for the surface material.

enter image description here

Allen Simpson
  • 13,493
  • 2
  • 15
  • 57