
Making graphics in 4 kilobytes (2008) [pdf] - Tomte
http://iquilezles.org/www/articles/proceduralgfx/inspire2008.pdf
======
fpgaminer
I've loved these kinds of demos since I first discovered them. For those not
in the know, this is _the_ site for finding them:
[http://www.pouet.net/](http://www.pouet.net/)

Though it didn't end up involving any procedural generation, I was tasked with
cramming an OSD into an FPGA that was already using the majority of its
resources. The device was processing an HDMI video stream and needed to
display a menu and various other information to the user, for control and
settings. All this at up to 1080p60. I ended up using about 16 KB of on-chip
SRAM, if I recall correctly, and designed an old-school inspired GPU ala
NES/SNES, with perfect alpha blending even! It was palette based, of course,
and the memory is used to store sprites and a "command buffer". While pixels
are flying through the GPU it reads the command buffer sequentially, which
instructs it which sprites to draw in-order. Space between sprites is handled
by rendering a fully transparent 1x1 sprite, repeated however many times. I
was able to draw the framing for the menus and displays with fancy drop-
shadows, logos, text, etc. It worked quite well! The only major limitation was
my inability to handle exotic languages like Chinese, simply because there
wasn't enough room for all the necessary sprites.

While the FPGA handled real-time, on-the-fly rendering, the on-board MCU was
the one uploading sprites and configuring the command buffer over SPI. I had
to build up all the software to not only drive the GPU but also handle the
OSD. If you think coding up GUIs on a desktop is bad, just wait until you try
to design a GUI system completely from scratch on an MCU!

I can only imagine what demoscene artists would be able to accomplish if they
could design their own GPUs on an FPGA!

~~~
blevin
Sounds like you might appreciate LFT's Parallelogram fpga demo:

[http://www.linusakesson.net/scene/parallelogram/](http://www.linusakesson.net/scene/parallelogram/)

------
iverjo
It's also inspiring to see how much you can do with only 140 characters of
code (so it fits in a tweet). Here are some examples:

[https://www.dwitter.net/d/104](https://www.dwitter.net/d/104) (tunnel)

[https://www.dwitter.net/d/302](https://www.dwitter.net/d/302) (old school
effect)

[https://www.dwitter.net/d/406](https://www.dwitter.net/d/406) (rotating
cylinder)

~~~
pjmlp
So cool! Thanks for posting them.

------
M4v3R
Obligatory link to Elevated - a 4 kilobytes animated 3D demo with music by
rgba (authors of PDF in the OP) & TBC:
[https://www.youtube.com/watch?v=jB0vBmiTr6o](https://www.youtube.com/watch?v=jB0vBmiTr6o)

For me, achieving something like this in 4k is just mindblowing.

------
wyldfire
The eye was pretty interesting. These primitives, what are they? smoothstep()
is apparently "Hermite interpolation" but colsca() - col-scale? collerp - col-
linear interpolation?

~~~
kretash
found an implementation here.
[http://fingswotidun.com/code/index.php/Eye](http://fingswotidun.com/code/index.php/Eye)

Don't know if it's the same one but it all it seems to do is scaling and
clamping.

~~~
Lerc
I did that. It's a fairly direct conversion from the paper.

I'm guessing SmoothStep got converted for size or performance seasons, but it
doesn't really do the same thing.

One of the tricky bits of procedural generation like this is that bugs get
entrenched easily, because 'fixing' things can dramatically change the
generated result. Perhaps that is what happened in this instance.

------
dharma1
still the favourite -
[https://www.youtube.com/watch?v=SzW0ammfUAQ](https://www.youtube.com/watch?v=SzW0ammfUAQ)

~~~
sigvef
Here is how it was made:
[http://m.imgur.com/t0rxWqH](http://m.imgur.com/t0rxWqH)

~~~
dharma1
awesome - thanks!

------
agumonkey
Reminds me of these
[https://www.youtube.com/watch?v=Tfh0ytz8S0k](https://www.youtube.com/watch?v=Tfh0ytz8S0k)

------
Keyframe
Kind of related. I've stumbled upon someone making an old school demo of sorts
in asm on amiga on youtube:
[https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmii...](https://www.youtube.com/watch?v=p83QUZ1-P10&list=PLc3ltHgmiidpK-s0eP5hTKJnjdTHz0_bW)

------
atesti
If this is from 2008, does anybody know what's up with one of the last slides
which states "There was an interesting procedural full 3d image in this slide.
After some explanations on it, speech attendees were flashed and their short
term visual memory erased."?

~~~
fractallyte
Probably referring to the 'neuralyzer' gadget from the movie Men In Black
([https://en.wikipedia.org/wiki/Neuralyzer](https://en.wikipedia.org/wiki/Neuralyzer)).

But could also be a reference to the 'visual knock-out capsules' from Alfred
Bester's SF novel 'The Demolished Man':

 _" They were cubes of copper, half the size of fulminating caps, but twice as
deadly. When they were broken open, they erupted a dazzling blue flare that
ionized the Rhodopsin - the visual purple in the retina of the eye - blinding
the victim and abolishing his perception of time and space."_

