Introduction – a futuristic apartment
The project is a depth analysis, if not the natural evolution of the studio work. The apartments unit form the residential complex are “always moving”: it means they combine movable walls and foldable furniture. The concept behind these apartments is to render more efficient every space. The practical thought is “if somebody lives alone and it is in the bedroom, they are definitely not using and do not need the living room, so in that moment it is a wasted space, and vice versa”. With the two features already mentioned, we can find a solution.
First picture: residential complex;
Second picture: apartment unit


This tutorial explains how to automate these transitions for a professional animation video.
I’m going to explain more deeply as I can the procedure for one furniture: for the others the steps are the same.
Step 0: Asset preparation
Before opening Grasshopper, we have to have our room and furniture ready in Rhino. These are the two main assets of the apartment. The base is a living room, where the sofa, the table, and the chairs fold on the wall; when the middle wall slides, the room, thanks to a foldable bed, will transform into a bedroom.

Step 1
First of all, you have to keep clearly in mind how you want the furniture to move. In this case, we have a sofa that has to fold into the wall (open – close). So the parts have to reach a vertical position through a rotation and everything moves into the wall hole.

The different parts consist of: front legs, back legs, upper part, and lower part. We use a different “geometry” item for every part, making sure to label them clearly. The other important component to mark and label is the axis of rotation “curve”.
Tips: when the geometry item is connect is good to hide the rhino model because it would be doubled. The “double thing” happen even every time we add a rotate, motion component, so “preview off” all of them but the last one, so you will see just one figure.

A. We rotate these components one by one with “Rotate 3D,” connecting all the “angle” inputs to the same slider to ensure all the rotations happen at the same time. The “sofa upper part” is already vertical, so we don’t have to rotate it.

B. To avoid the problem of “legs up,” they have to rotate even on themselves. It is not enough to just add another rotation; we have to add even the specific rotation axis component and make it rotate too on the same axis of the component. Once that is done, we can use the rotated geometry as the base for the second rotation; since the angle is the same, the movement will be simultaneous.

C. At this point, to move everything together, we connect all the rotated geometry to one “Move” component. The slider is specific because it depends on how much we want to move it.

D. To have these two movements (rotation and move) happen at the same time, we need to be able to control them with just one slider (TIME S: 0.00 to 1.00). Since they are in different scales, we need to “remap” them and connect the “mapped” output, replacing the old sliders (“rotation angle” and “motion”)

E. Last but not least, combine “Color Swatch,” “Merge,” and “Custom Preview” to give color and customize your geometry. The “geometry” output has all the geometry combined; in the “Merge” command, D1 will correspond to the first “Closed Brep” in the list that appears when you stay still with your cursor on the “geometry” output.

The result will be this sequence: at the extreme left, we have the ultimate slider that commands the animation (TIME S), followed by the remapping (D), the whole part of rotation (A) and the second rotation (B), the move part (C), and finally the custom section (E).
Step 1.a
Repeat Step 1 for all the furniture that needs it, such as the table and bed. In this part, I’ll only mention the part that has strong differences from Step 1.

Table: Regarding the Mapped values, there are two different types for degrees because the table legs fold in opposite directions.
Step 2
To make the wall move with every component, we have to combine them with a “Merge” component. The move part is similar to Step 1, following the C / D / E steps.

So at the end of this step we have 4 slider that set up the animation: TIME S, for the sofa – TIME T, for the table – TIME B, for the bed – TIME W, for the wall
Step 3
To create a fluid animation, which means passing between the different assets of the room, we need to be able to control it by one slider.

A. Create Panels for as many poses as you want; the number list correspond to the value of each slider (TIME S – TIME T – TIME B – TIME W) that give the desired pose. I put “POSE 1” two times so the animation can be perpetual. We “Merge” them in order and connect it to a “Partition List” where the size value is 4 because I have 4 sliders, that will convert all this separate lists in one. Connect the output to “Flip Matrix,” which transforms the list from 6 poses with 4 values to 4 data fluxes with 6 values each, allowing for the simultaneous calculation of the 4 parameters.

B. We place an “ANIMATION” slider from 0.00 to the number of poses minus 1, that will be our final slider which rule the animation. To change the pose, we have to know where the “ANIMATION” slider is related to integers. The three values we need are:
– “Pose A index”, which is the starting pose: to have theright integer and not be effected by the rounding up, we do a subtraction between the point in the “ANIMATION” and 0.49 (ex: if we are at 1.74 our starting pose is the POSE 1 but it will rounded up at 2; with “minus 0.49” our result will be 1.25 round to 1);
– “Pose B index”, which is the net pose: from the result of “Pose A index” we add 1 to have the destination pose.
< Now we know the start and the end, but to not have the animation running in spruts, we need to have the decimal. (ex: 1.74 will have 26% of the POSE 1 and 74% of POSE 2)
– “Factor T”, where the decimal represent how much the pose are changing: we subtract from the point in the “ANIMATION” and the integer from the starting pose (ex: 1.74, “ANIMATION” point minus 1, “Pose A index”, result 0.74)

C. To interpolate the results, we can use the math formula A * ( 1 – T ) + B * T, where the A and B value, starting and destination pose, are multiplied for the T factor, for how much we are close to the destination pose, and the remaining part, for how much of the starting pose is left. We need to apply this formula to each variabiles of our pose (TIME S – TIME T – TIME B – TIME W).
To use the right values and not all of them together, we set up 2 different “list item”, both listed by the “Flip Matrix”: one indexed from “pose A index” to have the starting pose values, the other one from “pose B index” to have the destination ones.
With the base math operation components, we recreate the formula. The results are how we have to place the TIME sliders to have our desire specific position.
To not have to do it because is a little time consuming and not very efficient, we can place a “list item” and ad items (“i”) as many we need and replace every outpot to the respective “TIME” slider.


Step 4
A right-click on the “ANIMATION” slider will open a menu where you can click on “Animate”. This will open a dialog to put the desired parameters like frame number or resolution, and it will generate every frame in .bmp format.

Step 5
A. Use a video editing program with the function to animate frame by frame. I used Shotcut, which is a free and intuitive program; download here. https://www.shotcut.org/download/

B. You just need to import the numbered frames and give them timing based on how slow or fast you want the animation. In this case, the pose frames have a 0.6-second duration, while the others have a 0.2-second duration.
C. Export the file in .mp4 format.
D.one
