16
$\begingroup$

I am trying to do a water simulation. I have a small cup that I have created in blender (as an obstacle) and my water source (just an oval). My domain box is large enough to encompass both the glass and the water source:

my scene

Here are my settings for my domain:

domain settings

I am using the default blender renderer. I have the cup setup as a collision for a water simulation and I have the sphere inside of the cup set as a fluid in a fluid simulation. When I bake the scene, here is what I get:

My cup

As you can see, the water is going through the cup, but the cup is having an effect on the water. Here is the rendered view:

render

How can I keep the water in the cup??

$\endgroup$
  • 2
    $\begingroup$ Consider adding some lights to the render so it's easier to see the problem. $\endgroup$ – wchargin Jun 9 '13 at 20:17
10
$\begingroup$

As others have mentioned, it's the resolution that's key here. However, I see that you've baked at two separate resolutions: 120 for final and 45 for preview.

You can see from the render view that the "final" quality bake has less "escaping" water. To preview that in your viewport without rendering, change the "Viewport display" dropdown to "Final." The downside of this is that it may slow down your viewport.

If you want even better quality, you could either:

  • increase the resolution, or:
  • Alt-D to linked-duplicate the cup object, then scale it down a tad (maybe 95%) and position it inside the real cup. Turn off the viewport and render visibility. Set its parent to the "real" cup, but mark both as collision targets (PhysicsFluidObstacle). This will essentially shrink the bounds of your cup and may or may not completely solve the problem.
$\endgroup$
2
$\begingroup$

A follow up on 00Ghz answer, I would recommend turning up the resolution of the fluid mesh. It looks like some of the water is coming through, simply because it's so low res(it'll also improve collision detection).

$\endgroup$
1
$\begingroup$

Another technique that I overheard on IRC is to augment the scene with a collison object that is thicker than the rendered object. Just adjust the hide_render property in the outliner (looks like a camera icon) or maybe the layer so it doesn't show up as a rendered object.

$\endgroup$
-3
$\begingroup$

You should make the cup a collider object so the water respects the walls. If you don't do that water will just pass through. Choose the cup go to physics tab and choose collision.

It should work fine now.

Check here http://wiki.blender.org/index.php/Doc:2.4/Manual/Physics/Fluid

P.S. Agree with CharlesL, but make sure your current pc configuration can handle it.

$\endgroup$
  • $\begingroup$ Can you add some more information to this. A link perhaps? One liners can be vague.. $\endgroup$ – iKlsR Jun 9 '13 at 17:55
  • $\begingroup$ 3 lines actually :) . Well just check the manual. It gives a very detailed explanation wiki.blender.org/index.php/Doc:2.4/Manual/Physics/Fluid $\endgroup$ – 00Ghz Jun 9 '13 at 18:03
  • $\begingroup$ Your answer was edited, also post the link in the answer, not here. :) $\endgroup$ – iKlsR Jun 9 '13 at 18:04
  • 1
    $\begingroup$ "go to Physics tab and choose collision" don't you have to do Fluid > Obstacle? $\endgroup$ – wchargin Jun 9 '13 at 20:11
  • 1
    $\begingroup$ @00Ghz, Setting the Collision property directly from the Physics panel does not make it collide with fluid objects. Also the OP said that the cup is a fluid collision object. please read the question before answering. $\endgroup$ – gandalf3 Aug 2 '13 at 19: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.