Q:

How to make a fluid animation / transformation of a simple cube?

I recently try to get into shape keys and I wonder if I can animate something like which is shown in the gif below (just a random example, it does not have to be exactly like that). Whatever I try, I can’t get past key1, otherwise the mesh will act strange. Basically I just want to insert and extrude from one step to the next.
Is this even possible with shape keys or do I have to stick to another method?

A:

This is difficult to achieve with just shapekeys. I'd highy advise you to use multiple cubes, which are keyframed in scale and location. The way your preview image is rendered, there won't be a visual difference.
Because shapekeys store the relative positions, adding and removing vertices is tricky. Nevertheless, this is possible with shapekeys.
compulsory gif to indicate a highend answer

Prepare the first extrusion, by moving insetting a face at the correct position in the Basis shapekey.

Add a key and perform an extrusion.

Prepare the next extrusion, by insetting again in Key 1.
Then, with Key1 at a value of 1 use the Create new shape from mix functionality.
Select the new shape Key 2 and choose Key 1 as the basis for blending. This way Key 2 will be relative to Key 1.

Perform the next extrusion. Note that Key 2 can now be layered on top of Key 1yay but will not be correct if we use it without Key 1nay. I don't think we can easily surpass this limitations will relative shapekeys.

