I made an ocean using the ocean modifier, and placed into the ocean a floating object - basin, using this lesson: https://www.youtube.com/watch?v=11F1NRpqrzY
How to make water not pass through the bottom of the basin?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
You can create an object of a shape similar to your floating object (bowl, boat, whatever) but lower-poly. Then select your ocean object and add a Boolean Modifier. The Operation mode should be set to Difference, and the Object slot should of course be set to your low-poly boolean object. Normals must be facing the correct directions or you'll get unexpected results.
Here is a screen shot of my test doing this with a simple cylinder:
Now there are just a few more things to do.
You can do this by finding the object in the Outliner and turning off visibility for the render, and for the viewport if you like (although this makes it no longer selectable).
In my screen shot I have set the Maximum Draw Type to Wire, and that's why I can still see and select my boolean object. However this leaves it visible during viewport rendering, so to fix that I simply gave it a material with a Transparent shader (with the color set to white for full transparency).
Pretty straightforward. Select your boolean object, then select your floating object and press [Ctrl P]. Set Parent to Object.
With your ocean object selected, navigate to the Mesh Tab. Check the box for "Auto Smooth". Also, in the Tools panel set the object's Shading to Smooth.