Message Boards Message Boards

Retrieving the original pixel size for digital arts and NFTs

Posted 2 years ago

Dear reader, in this notebook, we recover the original Pixel Art after it is been shared by third-party software which changes the resolution of the original art introducing artifacts. It was another fruitful challenge at the Wolfram Hackathon Brazil 2021!

Everyone is familiar with pixel art. It has become a deep part of our entire global culture since the launch of PONG, Pac-Man, Mario Brothers, Donkey Kong, etc. At this point in time Pong was released in 1972, meaning that 49 years have gone by where pixel art has represented our connection to the digital, and no matter how complex graphics get somehow we cannot seem to escape the friendly aesthetic of this work.enter image description here

Recently with the emergence of NFT art, this has presented itself again with sales of "crypto punks" for millions of dollars. When many of the works on NFT platforms are rendered at the highest quality level with complex 3D simulation work, why is "crypto punks", which is often made of a grid of 24x24 pixels, so emblematic of our emotional investment in the digital space? enter image description here

The clear answer to me (Andrew), as a former pixel artist in my youth, is very simple: YOU DON'T HAVE TO KNOW HOW TO DRAW to be a pixel artist. If you can organize a small group of pixels on your screen to look like a panda bear, it will be hard to not be charmed by your creation.

In the current NFT space where relatively unknown artists who were often held back by huge gatekeepers in the art market can create and sell works for thousands if not millions of dollars from their very own laptop, the generative pixel art NFT's are taking over as a new form of "street" art and culture, filling up a similar space to graffiti.

In my dealings with this space, the tools are very simple, however, there are many innovations coming in as people get more and more excited by not only pixel art but also VOXEL art which is becoming a quick favorite in the Metaverse. This work is being seen in entertainment and blockchain-related projects such as Minecraft and Sandbox.enter image description here

Since the launch of the Web, pixel art is mostly found being presented online in a scaled-up format. The reason this is often done is that web browsers have anti-aliasing which will keep the pixel-accurate work from being seen properly. It is often blurry and hard to see what the image looks like.enter image description here

This presents a problem for pixel and voxel artists. What if we want to take some pixel art off of the internet and bring it back into our software to keep playing with the image, but all that is to be found is the upscaled image? At this point begins a very time-consuming process of re-doing the work pixel by pixel, or going into Photoshop and counting the pixel count of 1 pixel and shrinking the image by that amount.

This however is completely unnecessary to do if we are sitting at a computer, which should be a tool to help us take care of such problems. Here are steps in Wolfram to the rescue, where we decided to find a way to batch this process by doing an analysis of these upscaled pixel art images off of the web in order to find the size and shrink them back down to size accurately.enter image description here

There were several challenges presented in this process that had to be dealt with. If the pixel art is scaled up new colors are added to the edges of each pixel due to the antialiasing and interpolation of the data. This creates irregular positioning for each pixel.enter image description here

There were a few approaches to this project, there was a path by using "find corners" and then searching for "nearest neighbors" to find the shortest path that would reveal the pixel length, as well as using the Fourier transform method, and a third and very interesting option whereby an analysis of the scaling of the image was conducted at all sizes below its original size under the assumption that the correct version would contain the LEAST amount of colors due to the lack of any aliasing.

Below are all the findings, enjoy!

POSTED BY: Antonio Neves
4 Replies

Congrats on #1 Antonio.

POSTED BY: Brad Klee

enter image description here

Congratulations!! Your team gets first place in the Wolfram Brazilian Hackathon 2021:

https://community.wolfram.com/groups/-/m/t/2410442

POSTED BY: Daniel Carvalho

The clear answer to me (Andrew), as a former pixel artist in my youth, is very simple: YOU DON'T HAVE TO KNOW HOW TO DRAW to be a pixel artist.

Disagree. My experience dabbling in pixel art is that, even if you have an entirely digital workflow without a stylus, you need a feedback loop with either drawing or painting or ink markers etc. to learn techniques that transfer between mediums.

Pixel Art is a technical skill. You may not need to know how to draw to start, but eventually you need to know how to draw if you want your work to have value. Very high standards were set in the 90s and continue today, for example:

https://www.youtube.com/watch?v=upe2EzebE9I

https://arthur.io/art/hiro-isono

In the current NFT space where relatively unknown artists who were often held back by huge gatekeepers in the art market can create and sell works for thousands if not millions of dollars from their very own laptop, the generative pixel art NFT's are taking over as a new form of "street" art and culture, filling up a similar space to graffiti.

Somewhat agree, but view that plenty of people involved in the "decentralization movement" are selling snake oil, and may actually be working on behalf of "recentralization" or worse.

In my dealings with this space, the tools are very simple, however, there are many innovations coming in as people get more and more excited by not only pixel art but also VOXEL art which is becoming a quick favorite in the Metaverse. This work is being seen in entertainment and blockchain-related projects such as Minecraft and Sandbox.

Yep, isometric 2D pixel art, such as this example, meets a minimum standard for what I think could be used in a Metaverse. Voxel design will probably be easier in terms of asset creation and user interaction, for example this temple scene. With all videogame development through the last thirty years, it should really be a buyer's market at this point.

As for the code... Yea, it makes sense that Fourier Transform works as it does, and that algorithm has been optimized over the years. Be careful when subtracting background. I don't think fitting a polynomial is a good idea. It causes an error on the curious George example, should be square $48 \times 48$. Try using a moving average if necessary?

POSTED BY: Brad Klee

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract