A new algorithm can transform diagonally connected single pixels into smooth, curved contours, turning retro video game art into Disneyfied cartoon characters. The method allows images to be magnified without distorting their appearance.
Johannes Kopf of Microsoft and Dani Lischinski of the Hebrew University built the algorithm and used it to modify the Super Mario World dolphin seen below, among other characters. Yoshi’s rounded eyes make him look drowsy, and the curvy Space Invaders somehow appear more angry.
The algorithm uses a combination of pixel analysis and spline curves to smooth out the drawings, the researchers explain. Other software programs can do this — Adobe Illustrator has its own vectorization process, as the blog Extreme Tech points out, and previous researchers have tried to smooth out pixel art.
But this algorithm works with 8-bit art, so it can be more specific, and the result is a more accurate portrayal. It figures out where the important connections lie between pixels, and then reshapes the pixel cells themselves so that they are connected to their neighbors via the cardinal (up and down, side to side) and diagonal edges. In the diagram below, you can see how the pixel cells around the ghost are reshaped from squares into asymmetric shapes.
The algorithm also minimizes spline curves as they pass through several points — rounding out the edges where the squares meet. As a result, staircasing artifacts that show up as blobs or weird halos in Adobe Trace are eliminated, and you get a shape that remains true to the artists’ original form, but without the characteristic blocky pixels.
“The best pixel art from the golden age of video games are masterpieces, many of which have become cultural icons that are instantly recognized by a whole generation, e.g. ‘Space Invaders’ or the 3-color Super Mario Bros. sprite,” Kopf and Lischinski write.
This algorithm casts them in a new light.
Practically speaking, this technology could improve inputs for modern display screens, which have a much higher refresh rate than older hardware for which these games were developed. Then browser-based video games would be even more fun.