There is a key you can press while this demo runs. f puts a strip of coloured bars across the picture, one row per processor core, and you watch the work being handed out while the water in front of you keeps moving. The yellow bars are the fluid. They are yellow because somebody typed 0xffffff00 on line 894 of a file called fr063_sph.cpp, and that file has been public since 2012, so you can go and look.
Watch it first: Magellan on YouTube, a little over four minutes. It opens on a ship above a planet and ends somewhere else entirely.
That openness is the unusual thing here. Demos are normally closed: you get a binary and a capture, plus whatever the authors felt like writing in a text file. This one has its code on GitHub under a BSD licence, named after the production number rather than the title. The group catalogues everything it puts out, and this is number 63, which is why the files are called fr063_ and why searching that repository for magellan returns nothing at all. Fourteen files beginning with fr063_, around two hundred and forty kilobytes of C++ sitting in the open with the debug switches still in them. They sit in the same repository as werkkzeug, the tool chain the group builds its productions in, and which this one was made with.
What it asks of the machine
The readme states the requirement plainly. A quad-core processor or better, and a fast graphics card, because the production moves a great deal of data between the two. Then it says what happens if you ignore that, and the wording is worth keeping. On a slower machine, the readme warns, the demo will "break apart terribly", since many scenes are physical simulations and a simulation cannot skip a step and carry on as though nothing had happened.
This was December 2010. The scene had spent several years moving everything it could onto the graphics card, where a thousand small identical jobs run at once and the processor sits and waits. Multi-core desktop processors had been ordinary for about four years by then, and in most software they idled.
The group's reasoning, as they put it themselves, runs the other way round: there is little point in building a multi-threading engine and then writing a demo for machines that cannot use it. So the fluid and the soft bodies are computed on the processor, in parallel, and the result goes across to the card for drawing.
It is a demanding position to take at a party where anybody in the hall might have brought a laptop.
What the source says
The simulation is smoothed particle hydrodynamics, the method that treats a liquid as a crowd of particles which each ask their neighbours what they are doing. The expensive part is finding the neighbours, and the file does it with spatial hashing, with a comment above the loop admitting cheerfully that this is everyone checked against everyone, optimised.
The threading is a few lines and reads like nothing at all. There is a flag called Multithreading; when it is set, the frame's work is wrapped in a task, handed to a scheduler and split into pieces sized max/256. Two hundred and fifty-six pieces, so that a machine with four cores and a machine with twelve both keep all of them busy, without the quick ones standing about. The Mandelbulb sequence uses the same machinery with a different granularity, count/64, because its pieces are larger and fewer.
Around that sit the numbers you would expect of a fluid and a few you might not: viscosity, gravity, a central gravity that pulls everything towards a point, base pressure, an outer force. They are parameters in a tool, which means somebody sat there and turned them until the water looked right.
The coder described the memory side on Pouët afterwards. The heap holding the blob geometry runs to several hundred megabytes of vertex data at sixteen bytes each, replaced continuously, and he had to write his own memory management because DirectX came apart under it. That is the sort of detail which usually stays inside a group.
Karlsruhe, between the years
The Ultimate Meeting happens in the Festhalle in Karlsruhe-Durlach in the days between Christmas and New Year, and 2010 was the tenth of them. The high-end demo competition took five entries and scored them by audience vote.
Magellan won with 340 points. Rumours And Facts by Rebels took second with 308, which is a margin of about a tenth and not a comfortable evening for anybody. Behind them came a third demo, then a 64K intro by Ctrl-Alt-Test, then a production running on a Nintendo DS. It is a small field and a mixed one, which is the character of that party rather than a weakness of it.
At the Scene.org Awards for 2010 the production won Best Graphics, with further nominations for Best Effects and the Public Choice.
The parts you have to go looking for
Before the demo starts there is a settings window, the ordinary sort with resolution and quality. One of its dropdowns is labelled hidden parts, and one of the graphicians had to tell people on Pouët that it was there: a free flight over the Mandelbulb, and an ambient section, neither of which appears in the four minutes everybody watched at the party.
They have their own music. The readme credits it to two other members of the group and marks it, in brackets, as recycled.
Neither of them was needed to win anything.
The limit
The production has edges and the people who made it named most of them first.
The Mandelbulb sequence stalls the pipeline. The coder said so directly: the outside surface is built from an octree filled with meshes, generated by marching cubes and pushed across to a graphics interface of 2009 vintage, and the whole thing waits. He mentioned having a later version that ran smoothly and it was never the one that shipped.
When somebody compared the fluid to implementations running on the graphics card, his answer was that this was a processor implementation and a different question, and that doing it on the card would have been the cleverer route. The demo exists because the group wanted the other thing, and the trade is stated rather than hidden.
There were crashes. Cards with less than a gigabyte of video memory ran out during the Mandelbulb, and a version 1.02 followed the party release to settle the worst of it. The greetings section is limited by fill rate, and one of the other coders remarked in the thread that the scene simply is not optimised, which is the kind of sentence a group only writes in public when it is comfortable with itself.
And the demand at the top of the readme has aged in an odd direction. A machine from 2010 with four cores now sits in a drawer, and a current one has rather more, which means the production is no longer difficult to run and has quietly become easy. What it asked for arrived.
Two hundred and forty kilobytes of source, and a row of yellow bars that shows you the work being shared out while the water falls.