What time is it

Rotation: what is  it?

The window’s rotation mechanism made it too easy for players to get their hands crossed up. So, I altered the form of the mechanism. Now it is a circular disc with only one handle.

newMechanism.png

But, I was running into a bug where, when rotating the window, sometimes the window camera itself would become jittery. I arrived at the conclusion that this was because of the sharp variance in values caused by allowing the user to manually rotate the window – since even though it snaps to a right angle once they let go, they have full control while grabbing the handle.

rotate_Bug.gif

So, I decided to restrict the player’s direct control to only rotating the disc, then smoothly Slerp the window’s rotation to match the disc’s rotation once the player releases the handle.

rotate_Fix.gif

Next, I decided to prototype some visual effects for the tunnel interaction. We knew we wanted to use live-action video, so I first took a look at playing video files in Unity. I heard that Unity recently released a newly revamped VideoPlayer system in the 5.6 beta, but for now I’m just using the old MovieTexture system (since we’re using 5.5).

If you try to import a video file into Unity (with 5.5 and below, at least – not sure about 5.6), it will try to convert it into an OggVorbis video file (.ogv) using Apple Quicktime. Not a big deal if you’re on a Mac and have QuickTime, but the Windows version of Quicktime has been unsupported for 2 years now (most recent version was released in 2014). I’m working on Windows currently, and even if I wasn’t, I’d prefer to not use Quicktime if I don’t have to.

Fortunately, if you convert the video file to an .ogv yourself, you don’t have to deal with any Quicktime shenanigans. So, I found some stock footage of a bird, converted it to an .ogv, and brought it into Unity. The movie texture was very easy to set up.

I wanted to apply some effects to the video. Drew suggested that I use a convolution filter and showed me an example of such a filter in glsl. A convolution filter works by taking a pixel in an image, finding the surrounding pixels, and then averaging the colors of the pixels into one color in accordance with specified weights. By adjusting the weights you can get common image editor effects like edge-detect and emboss, and beyond.

Convolution filters can also work with fragments in a fragment shader.

After converting the example to Unity Cg with the help of Drew and John, I was able to apply some cool effects to the video.

vid2.gif

I found this playlist of simulated mechanisms created in Autodesk Inventor. Feeling inspired, I worked on a little mechanism as part of the window interaction that ended up becoming a clock interaction. (in the below gif you can also see a convolution filter effect applied to the window pane)

clock.gif

Before, the building in the desert was a train station. We decided that we should change it, to make the optional trainwreck interaction in the desert more out-of-place. Now it will be a clock tower.

I also made a little robot with Unity primitives and animated a dance for it.

dance.gif

-wednesday-david

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s