13
$\begingroup$

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?

enter image description here

$\endgroup$
  • $\begingroup$ see this answer $\endgroup$ – Chebhou May 1 '15 at 18:11
  • $\begingroup$ Thank you very much, @Chebhou it would be just what i need but I faced a strange problem using this method. For some reason, if the object have "no cap,", if there is no plane above the surface of the water - it draws bad indinamic paint mode . Why is this happening and how to fix it? $\endgroup$ – Rumata May 1 '15 at 21:07
  • $\begingroup$ @Chebhou I found this problem after I chenged dinamic paint mode from "displace" to "paint". I did it, because I could not understand, why does this method works bad in my case. $\endgroup$ – Rumata May 1 '15 at 21:17
  • $\begingroup$ @Chebhou Here are two screenshots to make clear what i mean. In the first screenshot the sphere has a polygon on top: pixentral.com/show.php?picture=1GXnjmTMWSLhJQtfedxzjvFPeSPIoe In the second screenshot the sphere has no polygon on top: pixentral.com/show.php?picture=13HgzaxI4ziBIyHfVU7xJhD4zDRsi $\endgroup$ – Rumata May 1 '15 at 21:23
  • 1
    $\begingroup$ the dynamic paint modifier should be under the Ocean modifier, and you should check "dissolve" option and set small number $\endgroup$ – Chebhou May 2 '15 at 12:45
2
$\begingroup$

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:

Object with a subtractive boolean on an ocean

Now there are just a few more things to do.

  1. Prevent this boolean object from being rendered.

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).

  1. Parent it to your original floating object, so it moves with it.

Pretty straightforward. Select your boolean object, then select your floating object and press [Ctrl P]. Set Parent to Object.

  1. Fix possible issues with ugly shading on the geometry of your ocean where it touches the boolean 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.

$\endgroup$
  • $\begingroup$ I tried this solution, it's not practical for me. The rendering time jumped from 0.6s to 15s for a frame (for a 1200 frames animation this would be going from 12mn to 5h), just by adding the boolean to the Ocean object. $\endgroup$ – mins Oct 19 '15 at 20:26
  • $\begingroup$ I see. This is because the Boolean has to calculate all the verts of the Ocean object in each frame and remove some of them. A couple of things you can try: 1. Reducing the Boolean shape to a simple cube. 2. Lowering your Ocean resolution. 3. Take a compositing-based approach instead. 4. Use a Shrinkwrap Modifier on the Ocean instead - if carving out of the ocean takes too much time, instead just suck the ocean down in that spot. This is the alternative I would try first. Add a low-poly object like a Cube under the Ocean, make it the Target of the Shrinkwrap, and set the direction to Negative. $\endgroup$ – Mentalist Oct 20 '15 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.