Silly hack: Aamu tunnelissa at Instanssi 2018 (4k intro)

After so many years of waiting, I decided finally decided to create my first 4k and publish it at Instanssi 2018. It ended up doing well and getting 3rd place (out of 9 entries), most likely due to being possibly first Pikkiriikkinen (4k) entry ever to utilize the programmable party place lightning at Instanssi.

I’m very glad I got this thing over the finish line, but this project ended up being quite silly. There’s a lot of amazing intros that have managed to pack huge audiovisual scenes to tiny spaces. With these graphics and after seeing under the hood there’s not much magic needed.

During last 10+ years I have came up with many things I would require from my entry. I decided to forget them all here and get something actually submitted.

I knew beforehand well that setting up a project takes almost all of the effort first time. My previous attempts at utilizing GLSL shader language have not ended well.

After exploring several options, I was luckily pointed towards armak’s Leviathan 2.0 project template which sets up a C++ Visual Studio project with GLSL, crinkler, shader minifier and 4klang targetting Windows platform (obviously).

These tools are just magnificent. 4klang is a miniature software synthesizer that can be used as a VST plugin for composing.

Crinkler is an executable file compressor. Using it feels like cheating.

It’s not like I was completely free of boiler plate debugging, though. Several mysterious symbols missing and a crash that occurred with multiple versions of crinkler. Targetting Windows 8.1 instead of Windows 10 solved a crash on gdi32.lib.

Eventually, I was able to compile the project to under 4k. This was actually happening!

Next biggest challenge was to come up with anything that would pass as graphics.

The shader code ended up being embarrassingly close to a tutorial at YouTube: ShaderToy Raymarch Tutorial. I feel like the graphics are crap and are not carrying the piece, so I haven’t reported myself to the police. I had previously studied some excellent materials such as Iñigo Quilez’s stuff such as this, but had forgotten a lot. Having an entry looks still possible.

Next up is the song. I had an idea of a familiar beat I wanted to have on 4k, so I quickly created a song with Reaper.

Let’s put this together:

Holy crap, first executable that actually would pass as an entry!

This is the key to everything: to be able to control parameters based on audio information so that we have visual in sync with audio. 4klang makes this easy.

The main effort in 4k goes to graphics (or music), but I had so much learning debt too close to the event I decided to try to incorporate light controlling with UDP to a 4k for enhancing the viewing experience. I found a suitable starting point on sending UDP with WinSock from here.

After revisiting linker settings, it looked like UDP sending took only few hundred bytes. I had way more than that to spend due to having medium sized song(?) and almost non-existent shaders. I still left implementing DNS query for later and went with hardcoded IP.

Wireshark showed my executable was actually sending packets. My graphics are ultra lightweight, so I decided to guess a suitable throttle for limiting UDP flood to ~20 updates/sec.

I was running almost without any visual content content so the main idea was to have two scenes: the first part sets up very low expectations (first 17 seconds) and the second (30 seconds?) then exceeds them by flashing party hall lights to the beat. Voilà!

Links:

I published this product under a new group. Keski-Suomen Havainne-esitys is alive!