A few words about procedural graphics

Among the numerous demoscenery competitions that are traditionally included in the program of various demo partyundeservedly underestimated, in my opinion, is the procedural graphics competition (procedural graphics). The point of this specific type of computer creativity is to form a static image using a short program. Standard size limits are 4kb, 1kb, 256 bytes.

I think the underestimation is connected with the fact that the contest is not entirely clear to both those who like demos (since procedural graphics are static) and those who like pictures (since procedural graphics do not allow you to draw whatever you want). And yet, its popularity is growing, albeit slowly.

The first works were largely caused by interest in the topic of ray tracing (raytracing). The algorithm itself is quite simple, but it requires a lot of calculations, so the work became possible when computers with, firstly, sufficiently high performance and, secondly, with a sufficient number of displayable colors (or, at least, shades of gray) became widespread. I dug around on pouet and found one of the first works in the category “procedural graphics” – Digital Phantasy by EG:

Digital Phantasy by EG

This 1kb work for DOS was released in 1997. I remember that in the same year my friends and I were having fun writing simple programs for raytracing shiny balls on an IBM PS/2 Model 30 286 with a monochrome MCGA monitor. The timing is not accidental, raytracing was in fashion at the time – such images could often be seen in computer and monitor ads.

Another topic that began to grow in popularity a little later was fractals. Let's say, here 2-Million-Polys-and-some-Moonlight by Apocalypse Inc (4kb, 2005, PC/Windows):

2-Million-Polys-and-some-Moonlight by Apocalypse Inc

or Versus 4k by Fulcrum (4kb, 2008, PC/Windows):

Versus 4k by Fulcrum

Quite impressive, albeit schematic images can be obtained even with just curves – Blacklines by Calodox (4kb, 2007, PC/Windows):

Blacklines by Calodox

And of course, convenient objects for visualization are those that contain repeating elements. Klava by Quite & Youth Uprising (4kb, 2008, PC/Windows):

Klava by Quite & Youth Uprising

Due to the low speed of calculations, the formation of complex realistic images initially had to wait quite a long time. However, with the growth of computer performance and video card capabilities, much more complex and realistic works began to appear. For example, in 2022, 4kb work Orders of Magnitude by Bitshifters Collective (PC, Windows) looked like this (pay attention to the textures and small details):

Orders of Magnitude by Bitshifters Collective

You can combine several approaches at once – different geometric primitives, their repetition, distortion. And then also apply raymarching. Hoody by Rgba (4kb, 2020, PC/Windows):

Hoody by Rgba

Or this one I felt the earth breathing by Quitealso 4kb for PC/Windows (2009):

I felt the earth breathing by Quite

In fact, works that take up a few kilobytes become indistinguishable from photographs – RiverScape by Razor 1911 (4kb, 2023, PC/Windows):

RiverScape by Razor 1911

There are a lot of algorithms that can be used to create interesting images – in addition to those mentioned, these are l-systems, genetic algorithms, metaballs, Perlin noise, Voronoi diagrams and others.

As with demos, in procedural graphics, in parallel with progress in terms of realism and image quality, one can also observe another trend, when people tried and are trying to depict something with very limited means and on computers that were already outdated at the time of creation of the work (and are not even always designed to display images). For example, a relatively recent (2022) work Necropolis 3071 ad by Haujobb under PC/DOS, taking up only 256 bytes:

Necropolis 3071 ad by Haujobb

And here is a work for ZX Spectrum (Northern sunset s!lence by bfox), also taking up 256 bytes. As we can see, if there are few colors, you can, firstly, simulate a larger number than there is, and secondly, show only the silhouette:

Northern sunset s!lence by bfox

Another approach is to use the characters of the character generator already present in the ROM, as for example in the 4kb work Unfall at Bügeln by Metalvotze for Commodore 64 (using PETSCII characters):

Northern sunset s!lence by bfox

In progress Inanna by DreamWeb (4kb, Commodore Amiga, 2023) we see not just a schematic drawing, but the schematic itself became an idea – the flying triangles emphasize the “normality” of the fact that the image itself consists of polygons:

Inanna by DreamWeb

What can be crammed into 256 bytes (work) Planet by Desire) on an Apple II with extremely primitive graphics? Well, definitely space – it's mostly black:

Planet by Desire

In general, the point is to play on hardware features – on one computer you will benefit from a large number of colors or their imitation by a gradient (Commodore Amiga, C64). On another you can draw perfectly smooth curves without any sines (Vectrex). On a third – use the video processor to draw polygons (Sony Playstation 1), etc.

Still from 1kb intro Christmas tree goes to a party for Vectrex by Frog
1kb C'2024 Invtitation gfx for Sony Playstation 1 (PSX) by Frog

At the same time, each of these platforms also has its own disadvantages – for example, for RISC processors it is a large volume of code, for ZX Spectrum or old PCs it is the lack of hardware support for drawing primitives, for computers with a vector display device it is the difficulty of solid filling of an area, etc.

Everywhere it turns out to be a game with possibilities and limitations. For old platforms, the size limit in the procedural graphics contest is usually no more than 1kb, since in 4kb on some platforms you can easily fit a finished image even without compression – i.e. the meaning of the contest is lost. By the way, a couple of the works shown above were presented at Chaos Constructions in St. Petersburg. This year it is being held again (August 24-25 at the Kirov Palace of Culture) and I, as the author of one of the two applications already submitted there (specifically on procedural graphics) works, I want more competition. I invite you to participate!

The big question in the whole story with procedural graphics is where is the line drawn between it and the usual unpacking of a compressed image? Why can't a combination of jpeg + unpacker be considered procedural graphics? Of course, there is no clear line. On the one hand, the authors simply don't have much reason to deceive (and anyway, sooner or later, if the work becomes famous, someone will dig it up), on the other hand, packing a high-quality realistic high-resolution image into 4kb is very problematic. In many ways, the situation here is similar to the ban on pure animation in demos.

As an illustration – work for Atari XE/XL, what is called “on the edge” with unpacking – Mona by Ilmenit. Here, the Mona Lisa is crammed into 256 bytes. The initial data for the “smears” were selected, in fact, by enumeration – over several days of work on a powerful computer:

Mona by Ilmenit

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *