EnglishРусскийTürkçeDeutschFrançais About · RSS
WebInterface.org
WebInterface.org

Notes on drawing, print, photographs, and pictures made by computer.

Home · Computer graphics · Flat pictures: pixels, sprites, and vectors

Flat pictures: pixels, sprites, and vectors

Two-dimensional computer graphics is the computer making of digital images, mostly from models of a flat kind, and by techniques that belong to those models. The main uses grew out of printing and drawing, typography included. In that work the flat image is not a stand-in for a solid object sitting in a room. It is its own artifact, and it carries meaning of its own. A letterform is the clearest case. Nobody asks what a capital R looks like from the side.

That is why flat models are often preferred to 3D ones for this work. They give more direct control of the image. Three-dimensional graphics behaves more like photography than like typography: you place objects and lights, you choose a viewpoint, and the picture is a consequence. Typography does not want a consequence. It wants the mark you specified. Three-dimensional work starts from the other preference, and it is right to. The choice is about the job.

Pixel art and sprites

Pixel art is a large branch of digital art made in raster software, edited at the level of the single pixel. Graphics in most older or tightly limited games, in games on graphing calculators, and in many phone games, are pixel art. The limitation is the style. Once you can see the pixels, pretending they are not there makes a worse picture than deciding where each one goes.

A sprite is a two-dimensional image or animation integrated into a larger scene. At first the word meant a graphical object handled separately from the memory bitmap of the display. It has widened to cover various kinds of overlay. The original trick was to combine unrelated bitmaps so that they looked like part of the normal screen: an animated character that moves without you rewriting the data for the whole frame. Hardware can do this. A hardware sprite uses custom DMA channels to superimpose a second video source on the main one. Software can imitate the trick with specialised drawing. Players rarely know which they are looking at. They know whether the character moved cleanly.

Raster and vector

Vector graphics and raster graphics are complementary, not rivals that one of them is going to win. A raster represents an image as an array of pixels, and it is the usual way to store a photograph. A vector encoding stores information about the shapes and colours that make up the image, which leaves more freedom at the moment the picture is drawn. There are jobs where the vector tool is the right one, jobs where the raster tool is the right one, and jobs where both are in the file. Knowing the limits of each, and how they meet, is what makes the choice boring and correct.

Vectors stay sharp when you scale them, because the shape is redrawn. A raster, scaled past the pixels it has, shows the grid. Rasters are the natural home of photographs, of paint, of anything whose edges were never a curve you could write down. Vectors are the natural home of logos, diagrams, type, and interface marks. A complex vector can be slow to draw and can produce a larger file than a raster of the same picture. A simple one is smaller and clearer. SVG is the form of this idea most often met on a web page. Working drawings met it earlier, under a different name.

A picture written from a sentence

Since the middle of the 2010s, neural networks have been trained that take a written description and return an image. The general shape is a language model, which turns the text into an internal representation, and a generative image model, which produces a picture conditioned on that representation. The strongest of these systems have been trained on very large collections of images and text taken from the web. By 2022, models such as DALL·E 2 and Stable Diffusion could produce a range of styles, from a pastiche of a named artist to something near a photograph, in seconds, given enough hardware.

That is computer graphics in the wide sense: a picture made by a machine. It is not a model you can walk around. A generator that returns only a flat image keeps no geometry for a second viewpoint to share, even when the picture looks deep. Methods that keep a scene are a different job. The older route still starts from a model.

Earlier: When computer pictures became ordinaryLater: From a model to a pixel