The 'Kinetic Art' Room - Fun with maths
The next two exhibits - "DNA of a Cuboid" and "Gyro" - were taken directly from Antichamber. The former is a stack of flat cuboids which rotate at faster rates the higher up the stack they are. What starts as a normal cuboid quickly twists into a helix-like structure before eventually wrapping back around into a cuboid. It's quite a nice effect. The latter is a series of concentric tori rotating at different rates around a sphere. Similarly to the cuboid structure the tori will occasionally all line up, producing a flat disc around the sphere.
For "Flow" I started off by making a bed of tall, thin cuboids which I could then produce movement in by changing the y coordinates of the pins, similar to this cool MIT project. This then evolved into having a central pin which moved up and down, with all other pins following it at a delay based on how far apart they were. I refined this slightly and shortened the pins down, then stacked several atop each other and alternated the direction of movement. This created a really nice flowing movement similar to jellyfish, with the additional illusion of the bodies seeming to move through each other.
The last piece - "sin() and Bones" - was inspired by two projects by ART+COM, the kinetic sculpture in the BMW museum and the Kinetic Rain installation in the Changi airport in Singapore. It consists of a bed of spheres with delayed sin waves passing through each row while another sin wave passes through the entire thing as it all rotates around the z axis. Depending on where you look at it from this can produce a helix, a cylinder, a rippling flag or just a mess of moving points.
The Robot Room - Hierarchical modelling and contextual controls
At this point I was running out of buttons so I decided to change how the control scheme worked. The general camera movement and toggles for things would always be active, but the specific controls for interactive exhibits would only be active when you were in that room. This freed things up so I could use the same controls for different purposes. This is also when I added the bottom line of the HUD text which tells you which room you're currently in.
The Room of Reflection - Imposters and the stencil buffer
By first rendering the reflection plane into the stencil buffer, then using that to render the 'reflection', it is confined to be within the bounds of the plane. This became a bit more difficult when I decided I wanted the reflection plane to be semi-transparent. The problem was a combination of the fact that you have to render everything which is behind a transparent object before you render the object itself; and the fact that the height of the 'reflection' and the floor coincided, resulting in the floor cutting off most of the model below the wing tips.
The way I got around this was by rendering the floor with the plane in the stencil buffer, then clearing the depth buffer and rendering the 'reflection'. I then invert the stencil buffer and render the floor again. The rest of the room can then be rendered as normal. What this is effectively doing is rendering the patch of floor visible through the plane, clearing the depth buffer so that the 'reflection' is then rendered in front of that patch of floor, then rendering the rest of the floor around the patch.