How to selectively render part of an ocean which is inside a round object? Once you see the image of the problem I'm having, it makes it much more sense what my problem is.



How do I make it so the ocean doesn't render outside of the cup object? You can see it towards the bottom left of the image
Try using a boolean modifier:

Create a cylinder the same size of the inside of your cup:


Add a boolean modifier and an edge-split modifier to the ocean object, with the cylinder object set as the target:



Make sure the cylinder is set to be hidden in the render, so it doesn't get in the way: