2
$\begingroup$

I am trying to make one of those animation videos where an apparently heavy object is falling on a fragile object. But rather that heavy or rigid object turns out to break or be fluid.

So I made a hammer's head, and a glass. I turned the hammer [head] to fluid and kept it on a height. So when I bake the fluid, on the first frame only it's shape is distorted and it starts looking that its actually fluid. I want it to keep its original shape and act as fluid at the same time.

Preview In this image, the glass is kept aside because I wanted to run a try first.

$\endgroup$
6
$\begingroup$

One way to do this:

fluid hammer animation

You will need two hammer head objects. One of them is simulated as fluid, one of them is not. I will call these the "hammer fluid" and "hammer static" objects for short.

Your "hammer fluid" object should be located in the position where you want the fluid simulation to start (i.e., the first frame where the hammer head touches an object / the floor). For convenience let's call this Frame 100. Using keyframes, the viewport and render visibility of the hammer fluid object should be set to OFF from frames 1-99, then ON starting at frame 100. Once you have added the object to your fluid sim (as type "Fluid"), you will want to give it an "Initial Velocity" that is appropriate to whatever the hammer head was doing at the moment (e.g. falling straight down, moving side to side, etc.).

Your "hammer static" object should be visible from frames 1-99, then invisible starting at frame 100, again using keyframes.

From the viewer's perspective, the object will seamlessly transition from the static object to the dynamic object on frame 100.

In terms of the fluid domain, obviously it should be given the fluid material. It should also be invisible from frames 1-99, visible starting on frame 100. You would give the simulation an "offset" (Physics tab, Fluid section, under Time) equal to the transition frame times -1. So in this case the "offset" would be -100.

Quick tip: you won't be able to bake your fluid sim unless you're on a frame where the fluid domain object is visible!

$\endgroup$
  • $\begingroup$ I think rather than animating the fluid hammer to appear in between, we should animate the Domain to do so. Because whatever object we set to 'fluid', it never becomes fluid on its own. But the domain turns into actual liquid. Also I tried doing it in both the ways. But when the frame (32nd frame in my case) comes up, the fluid is already on the ground; not in the position ready to fall. Does initial velocity has to do anything in this? I don't know what it does. Thankyou. $\endgroup$ – Bits168 Jan 17 '18 at 8:13
  • $\begingroup$ As mentioned, you do need to keyframe the domain visibility. Or do you mean animating the position of the domain as the sim runs? That may not work as you expect, the sim won't incorporate those motions into the simulation. The initial velocity tells the sim that "at the time the sim starts, this mass of fluid was already moving in this direction/velocity," but there's no direct way to set the velocity after the sim starts. As to the fluid already on the ground, did you set the time offset to -32? That's necessary, otherwise the fluid sim will have already been going on since frame 1. $\endgroup$ – risingfall Jan 17 '18 at 8:51
0
$\begingroup$

I think the first frame of the fluid simulation is always directly after the first simulation frame.

You could try swapping out the material on the hammer for the fluid material for 1 frame before the fluid simulation takes over.

Plug both your materials into a mix shader and simply keyframe the value from 0 to 1 to switch shaders on the frame your collision occurs, then keyframe the "restrict view" property in the inspector to make it disappear, whilst making your fluid simulation appear on the next frame.

Either that, or you could try keyframing gravity and other forces on the fluid sim so they don't affect it until the second frame.

$\endgroup$

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.