email sol follow sol rss feed of the blog wishlist Sol::Breakdown

tAAt 2015 new year demo breakdown writeup

Yet another year, another new year's demo.

Here's a capture on youtube..

This one started off a desire to simulate a tornado. It didn't quite work out, but there's something interesting to show anyway, so it's not a total loss.

The original vision was to have the scroller as 3d objects, much like in the shadowy-forest thingy a couple years back, each letter contained in a box with springs connecting the corner vertices, and the tornado tugging the spring-vertices, making things fly around. The collision physics would have been a nightmare, and the whole idea was a bit too complex for a quick new year's thingy.

Anyhoo.

I started off with a plane and some dots on it, and started modelling how I think the forces should work. (Actual research? Who has time for that?)

(Graph based on the general idea, not to scale, does not represent actual algorithm, your mileage may vary, contents may be hot, to be used under adult supervision, no purchase necessary, blah blah)

So the basic idea was to have a tube (a hollow cylinder that's infinitely tall) within the walls of which the forces push any particles upwards, inwards and around the center. There's calm area in the center.

As one might expect (assuming you've played with physics simulations), that didn't work out too well. I spent some time tweaking the parameters, but never really got the particles to form a real tornado. The result did look pretty neat though, so I figured I might as well use it. I added another of these particle displacers, and changed the randomly-placed particles into text which slowly gravitates to the center of the scene. The oldest particles are removed and new ones are placed to write the text.

A few final touches included rotating the particles so that the text looks decent, bouncing the text on beat. The bounce is stronger near the center, but this is faked by simply making the Y coordinates scale bigger there. Having the actual bounce be stronger near the center caused the physics simulation to look hilariously bad, with parts of the letters bouncing out of sync.

The dim grid lines also pulse a bit by the beat. Only particles pretty close to Y=0 bounce by the beat, meaning that the particles that are being displaced by our little storm don't bounce - if this check wasn't done, it would just look like a screen shake.

The shadows are simply the particles re-drawn at Y=0, as you'd expect.

This is all OpenGL 1.0 stuff, on top of SDL. Sound played with SoLoud.

Speaking of audio, this is one of the rare cases where I wrote the effect first and audio came later. !Cube was too busy with other projects, but john peeba stepped in. The only spec I gave for the music was that it should loop and "here's what the effect looks like". I re-synced the beat to the music, but that's all.

I think that's about it.

Comments, questions, etc. appreciated.

Site design & Copyright © 2017 Jari Komppa
Possibly modified around: January 28 2015