I would like to create an animation of a cubic trefoil knot. It is a very interesting 3D structure. Use Google images to see what one looks like. I would like to do an animation where I start with 1 block and either extrude or stack blocks to create one, one block at a time. It would look something like one block then another block next to it in the Y axis, repeat to three, then start adding blocks in the Z direction until you have a stack, then start adding blocks in the X direction, etc.
You can do this with DupliFrames.
Starting with a cube, and a path for the knot. (I made my path by duplicating selected edges from a 4x4x4 array of cubes and then AltC converting the mesh to a curve)
- In the cube Object Properties > Duplication panel, set duplication to 'Frames', the Start to 1, and the End to 36. Uncheck 'Speed'.
- In the path's Data > 'Path Animation' panel, check 'Path Animation' and set the Frames to 36, uncheck 'Follow'.
- In object mode, with the cube and path selected, (path last), CtrlP parent the cube to the path, with 'Follow Path' selected.
You may have to hit AltO to clear the origin of the cube and make it sit on the path. You may also have to alter the orientation / scale of the cube in Edit Mode to get the overall look you want.
Now you can animate the build block by block, Keyframing the cube's Duplication > 'End' field.
There must be an intelligent way to do it, like Animation nodes, but anyway here is a way with the Boolean modifier:
- Create your Knot.
- Create one cube per section and scale them so that they encompass each section of the Knot.
- Make them transparent and invisible in Properties > Object > Display and Cycles Settings (see screenshot).
- Give your Knot as many Boolean modifier as you have cubes, and in each modifier chose one of the cube as Object.
- Now in the Dopesheet window, go to frame 1, select all your cubes in the 3D view and press i > LocRotScale.
- Move the green bar in the Dopesheet window, come back to your 3D view, move up the first cube and press i > LocRotScale. You've created a second keyframe for this cube and Blender will interpolate the movement from position 1 to 2. It will reveal the part of the Knot that was contained in this cube.
- Maybe sometimes you'll have to scale down the cube instead of moving it.