Keyframe breaks fluid process!

Hi all,

I’m working with Blender 2.68a and loving it but while working with a fluid simulation I have run into what I believe is a bug. The scene is fairly complex so to evaluate the problem I created a bare bones simulation. One fluid domain, one fluid inflow and one fluid outflow.

Now with that simulation I set the inflow at the top corner of the domain and set the inflow velocity to z -1. When the simulation stops baking it works just as I have seen it work in countless tutorials. Thanks for all of those great tutorials by the way. Any how the flow is nice and smooth, a solid stream.

Now when I set some keyframes on the inflow properties - it does not matter if it is the velocity settings or the enable checkbox. When a keyframe is set and the fluid simulation re-baked the flow generated by the inflow object (regardless of the mesh type or the initialization parameter) breaks. Its difficult to describe! If I’m working on a small stream, always a good idea with fluid simulations, then the stream becomes large drops that even when the velocity is set to crazy heights (tried 20 or -20) it still fails to form a stream. When dealing with large inflow objects the single stream before the keyframe is set becomes multiple smaller streams spread out, though headed in the same general direction. In general this looks terrible and is impossible for me to predict ahead of time and unfortunately not usable for my scene.

I want to make it clear that the keyframes work exactly as designed when the timeline hits the keyframe whatever the property it activates the requested change. You can see the change in the stream but again the stream is so distorted that it is not usable.

So my questions are 1) is this a bug? 2) is there a work-around? 3) am I doing something wrong?

I would greatly appreciate any input on this issue.


How about a .blend file to demonstrate the problem if you’re having trouble describing it?

Hi K, good idea. How do I upload a .blend file?


Hi K,

Never mind I see what people have been doing. The link to the .blend file is -

The scene has two inflow elements. One with keyframes the other without. As you can see they are quite different. For some reason the inflow with keyframes is always more chaotic. If you can get it to behave otherwise please let me know how you accomplished it.

Much thanks.

Apply the scale and rotation on all your fluid related objects. Ctrl-A in object mode. And from now on the only scaling or rotating you do in object mode should be scaling or rotating that you specifically plan to keyframe for animation. For just editing the shape or size of your objects, do it in edit mode.

After doing that, the keyframed inflow then produces a little bit more fluid than the non-keyframed for some reason, but the result isn’t anything I’d call chaotic. The flows are both vertical streams right down into the outflow, and the keyframed inflow cuts off its flow just as it should at the end. You can also get greater precision by increasing the resolution. 65 is too low for…just about anything.

Note: where you shared your file from is fine because it’s not some spammy megaupload-type site, but in general (and for anyone else reading this) it’s preferred to use for .blend files.

Thanks K, I’m not sure that I know what you mean by ‘Apply the scale and rotation on all your fluid related objects.’

Also do not understand ‘And from now on the only scaling or rotating you do in object mode should be scaling or rotating that you specifically plan to keyframe for animation.’

As far as I know and this could be so wrong, you can set keyframes on most of the properties associated with objects and mesh. As you can see in the example I’m applying keyframes to velocity and the enable checkbox. Not sure what this has to do with scale and rotation?

I scale and rotate still objects for my scene’s all the time? And most of the tutorials I’ve watched don’t seem to make the distinction between edit and object mode with regard to scaling and rotation.

I knew that the keyframes were working as documented but the smaller the inflow mesh the worst the disruption in the fluid flow becomes and if you have say a faucet and you want to place the inflow within the throat of the faucet you’re pretty much out of luck. It generally really looks terrible.

I’ll noodle over what you have said and try and incorporate it into my project.

Much thanks.

In general, your objects should always have a rotation value of 0,0,0, and a scale value of 1,1,1 (values in x,y,z). When you scale things or rotate them in Object mode, you change these values. That’s not how you’re supposed to edit meshes, but it’s very common for new users to do this, especially with primitives like cubes and planes. Edit things in edit mode. Object mode transforms like this are meant for animation, such as animating an object spinning around or something like that, which you’re not doing. Since you’re not animating those values, there is no reason to change them in Object Mode as you have. Just because you do it all the time doesn’t mean it’s correct. If you’re just trying to define the shape of a rectangular solid to use as a fluid domain, do it in Edit Mode. Since you’ve already done all that in Object Mode, you need to apply those scales and rotations, that is reset them to 0,0,0 and 1,1,1. This is done by selecting the objects in Object Mode and hitting Ctrl-A.

For the purposes of simulation, unapplied scales and rotations are sort of fake values, and they screw up the calculations, causing unpredictable results.

Hi K, I see your point. I can see how it would be easier to follow the changes to an animated object if you have re-set the origin once you have it in its final start position (or just used the edit mode to set it to that start position). And you’re right I was not doing that or at this point even thinking about that. Thanks.

Also your comment about resolution has surprised me. Now I know that rendering and view will vary based on the resolutions set but for some reason I never thought of this being the difference between seeing a solid stream and a series of drops but that is indeed the case. Setting the resolution higher for the render display has really helped me to fine tune the fluid simulation.

I’m starting to see some positive results.

Thanks much.