pouët.net

Go to bottom

farbrausch demo tools open source

category: code [glöplog]
Preacher:

Almost all animations are done in vertex shaders (sin/cos). This allows me to run the demo once every 10-20 mins and just play with the shaders by reloading on the fly. Some other more complex animations (the tiger running) are just multiple instances stored in a big .obj. The particles are the same - in "the butterfly effect" for example, all logic and movement (for all parts) is done in a shader.

The supporting code is trivial - nothing that can't be done in a day from scratch. There is just code for loading a mesh (you can do this now through assimp - although it is a bit slower for objs), shaders/FBO manipulation and that's all.

The look of total chaos is justified since, these days, I only have 2-3 weeks a year for making demos and so every minute saved is precious.
added on the 2012-04-16 15:10:55 by Navis Navis
navis demomaking ways keep amazing me :D
added on the 2012-04-16 15:23:38 by psenough psenough
Quote:
navis: i know its good to protect your fx etc, but it was still a bit mean of you to run the file through a code obfuscator before uploading it


*drumroll*
added on the 2012-04-16 15:24:29 by psenough psenough
plek knows his shit
Quote:
#define BALLS_LICK_AMOUNT 0.0005f
added on the 2012-04-16 15:26:52 by psenough psenough
Navis: cool, thanks for the info. I might want to reconsider some of my demomaking ways...
added on the 2012-04-16 15:27:45 by Preacher Preacher
I'm also amused by "the Navis method", in a positive way.

sag: ^_^, but today's shader terror obliterates my sse2 implementation anyway :)

Quote:
camera.fieldOfView = PI / 35; // gaia's nasty homo trick


And now back to more important matters.
added on the 2012-04-16 15:39:20 by superplek superplek
very illuminating. wow.

And maybe moderately hope-inducing.

(among them, hoping for more code drops in this thread)

Actually laughed out loud at "(which I'm going to use for the next 30 years regardless of any advancements in technology! \o/)"

Now I'm wondering what the code for the spoof in the 64K compo at Revision looks like. Seriously that was so spot on I almost fell out of my chair.
Guys, you are real angels! :3
added on the 2012-04-16 18:32:42 by closed closed
Great. But it does inspire me to write my own tool-set.
added on the 2012-04-16 19:43:02 by pista pista
For everyone that is using vim and want to make the navis code indented just select everything and press =%
added on the 2012-04-17 00:01:29 by emoon emoon
meaty: You asked for it, more code. God, this is nasty code. A 10 year old software rendered demo ;-)
added on the 2012-04-17 00:27:02 by kusma kusma
Oh, and of course: I already released a bunch of demo-sources a while ago.
added on the 2012-04-17 00:35:15 by kusma kusma
For everyone that is using emacs and want to make the navis code indented just select everything and press TAB

SCNR. :-)
added on the 2012-04-17 00:37:41 by xyz xyz
@kusma: did you release any GBA stuff? :3
Quote:
God, this is nasty code. A 10 year old software rendered demo ;-)

nasty? come on, just admit it: navis won. that ship has sailed. this contest is over. time to move on.
added on the 2012-04-17 04:55:29 by ryg ryg
there's no shame in retreating if someone brings a nuke to a knife fight!
added on the 2012-04-17 05:01:56 by ryg ryg
Someone's gotta have an H-bomb somewhere on an old HD.
added on the 2012-04-17 07:52:56 by tomaes tomaes
Graga: Nope.

ryg: Oh, sure. That's not where I was going with that comment :)
added on the 2012-04-17 08:51:06 by kusma kusma
I find it fascinating that V2's FM waveform is actually sin(at + saw(bt)). Non-antialiased. If I read the source right, that is :-)
added on the 2012-04-17 12:20:12 by Sesse Sesse
Yeah, thought about some oversampling (2x should do in theory) but tried it and it simply was good enough :)

That's basically the whole design principle:
algo = cheapest_possible;
while (sound(algo)==shit) improve(algo);

:)
added on the 2012-04-17 12:36:09 by kb_ kb_
Yeah, I saw more surprised it was sin-of-saw and not sin-of-sin.
added on the 2012-04-17 12:41:49 by Sesse Sesse
Sesse, actually it's sin(at+last_output). If you need sin-of-sin, set the preceding osc to sin. Less code, more flexibility :)
added on the 2012-04-17 12:44:41 by kb_ kb_
kb: Then I misread the source (it looked like you were doing a sawtooth by letting the register wrap around, then shift it to the right a bit, and OR in some bits to convert fixedpoint-to-float).
added on the 2012-04-17 13:00:26 by Sesse Sesse
Sesse: The osc counter is a 32bit integer value that can wrap around and I use some int2float hackery because on the target platform (Pentium2) this was actually faster than fild and scale. The code does something like (minus optimisations and ring modulation)

for (idx=0; idx<fame; idx++, counter+=freq)
buffer[idx] = gain*sin(i2norm(counter)*2*pi + maxfm*buffer[idx]);

Same for the other oscs - at the beginning a buffer is cleared and the osc code either adds, ringmods or FMs in place. :)


added on the 2012-04-17 13:52:50 by kb_ kb_

login

Go to top