AuthorTopic: The chalenge to upscale pixel art  (Read 28237 times)

Offline Hyllian

  • 0001
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile

The chalenge to upscale pixel art

on: January 08, 2012, 11:52:25 am
Yes, and this is hard as hell. I'm trying for almost a year.

Here's my upscaler which turn any png image file into a 2x, 3x or 4x upscaled version:

http://www.multiupload.com/GQFZDT9MAV

            Usage: xBR <input png> <output png> [<scale_factor>]
            scale_factor: 2x or 3x or 4x. (default: 4x)


I know this may be an heresy for you, but sometimes it can help someway. My purposes are print and play classic videogames on HDTVs.

I'm continuing researching about how to perfect this transformation.

Hope you enjoy!

I don't know if I can post pixel arts from other related sites upscaled here, so I won't until a confirmation.

Please, do not kill me!  :-*
« Last Edit: September 19, 2013, 11:14:15 pm by Hyllian »

Offline Hyllian

  • 0001
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #1 on: January 08, 2012, 01:17:20 pm
Let's put an example so that you understand what I'm talking.

I've got this random pixel art I found through google.

Original:


Nearest Neighbor:


Smooth resample from Graphics Gale software:


My algorithm (4xBR):



Nearest Neighbor has a checkerboard effect, I don't like it. That other filtering blurs too much. Then I developed this algorithm to upscale by smoothing jaggies without adding too much blur.

Offline robalan

  • 0010
  • *
  • Posts: 337
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #2 on: January 08, 2012, 03:45:07 pm
That's a nice algorithm! Does it perform as well on smaller pieces?  There was a paper at this year's SIGGRAPH about this subject: http://research.microsoft.com/en-us/um/people/kopf/pixelart/index.html  Some of their results are better than others, and I'd be curious to see how your algorithm compares to theirs. Can you post some of the pictures they used run through your algorithm? I'd be especially curious to see the Yoshi, since that's one they didn't do a very good job at.
Always remember: a preposition is not something you should end a sentence with.

Offline Hyllian

  • 0001
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #3 on: January 08, 2012, 04:02:29 pm
Here you go:

Offline Argyle

  • 0010
  • *
  • Posts: 269
  • Karma: +1/-1
  • Futuristic beep boop.
    • argylebox
    • http://pixeljoint.com/p/13899.htm
    • valsaurus
    • View Profile
    • ArgyleBox | Designs by Valouria Saurus (VERY OUTDATED)

Re: See my algorithm to upscale pixel art

Reply #4 on: January 08, 2012, 11:43:07 pm
I've tried your program out on Windows 7 and it just opens a command prompt window that immediately closes. Am I using it wrong?  Interesting results for sure. I don't find it blasphemous to do this to pixel art, it could be a useful starting point for converting low res art into HD. Perhaps even for upscaling then downsizing to a slightly larger version than the original piece to be cleaned up at the pixel level from there.

Offline Hyllian

  • 0001
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #5 on: January 09, 2012, 12:34:25 am
I've tried your program out on Windows 7 and it just opens a command prompt window that immediately closes. Am I using it wrong?  Interesting results for sure. I don't find it blasphemous to do this to pixel art, it could be a useful starting point for converting low res art into HD. Perhaps even for upscaling then downsizing to a slightly larger version than the original piece to be cleaned up at the pixel level from there.
This is a command line program. To use:

Open a DOS-Prompt (command line window).

You have to go through the command line to the folder where the program is located. Then use this command:

4xBR <input png> <output png>

Offline Argyle

  • 0010
  • *
  • Posts: 269
  • Karma: +1/-1
  • Futuristic beep boop.
    • argylebox
    • http://pixeljoint.com/p/13899.htm
    • valsaurus
    • View Profile
    • ArgyleBox | Designs by Valouria Saurus (VERY OUTDATED)

Re: See my algorithm to upscale pixel art

Reply #6 on: January 09, 2012, 02:49:39 am
Tried it out on some varied types of images I had sitting around. I really liked the result on the afroducks and ogre foodstand in particular!





















And here's a sheet from Surt's random sprite generator, for sheer shape cluster processing's sake.





Then for one last test to toy with result comparisons, I processed an original picture and the upsized result from your tool with rotsprite (a tool someone made for resizing and rotating pixel art) to compare results of a 45degree rotation export of the sprite at double the size of its original resolution. So I had rotsprite double the size of the original and rotate it, and had it halve the size of 4xBR's version and rotate it. Here's how that result came out:


upscaled version of the original


downscaled version from 4xBR

Gotta say, I preferred the result that was achieved from downsizing your tool's export over that of upscaling the original.


And as far as rotating those at the original resolution, it was a mixed bag. The first image was the original sized file rotated, and the second file is the 4xBR version downsized to 25% then rotated.



Rotating the original better maintained fine details (like the eyeball shinies) but had more sharp noise to it, while yours lost some of that detail but had a smoother look to it. So usage for things like this are situationally beneficial I suppose.

Thanks for sharing the tool, and sorry for so many pictures!
« Last Edit: January 09, 2012, 02:59:30 am by Argyle »

Offline Hyllian

  • 0001
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #7 on: January 09, 2012, 07:31:43 am
Thanks for the tests! I haven't used rotsprite before. I like your avatar results too. It seems rotation is a hot topic here. Do you think a 2x and a 3x upscaler would be useful?

« Last Edit: January 09, 2012, 07:39:45 am by Hyllian »

Offline Argyle

  • 0010
  • *
  • Posts: 269
  • Karma: +1/-1
  • Futuristic beep boop.
    • argylebox
    • http://pixeljoint.com/p/13899.htm
    • valsaurus
    • View Profile
    • ArgyleBox | Designs by Valouria Saurus (VERY OUTDATED)

Re: See my algorithm to upscale pixel art

Reply #8 on: January 09, 2012, 07:46:59 am
It seems rotation is a hot topic here.

Sometimes it's something better off just being redrawn really quick by hand, and sometimes a quick in-editor rotate and cleanup is all you need, but when there are tools that can do it for you with less after-cleanup required, I make the most of them if the time saved outweighs the hassle of saving a file out and running it through another program then cleaning up and rejoining it with the workfile.  I'll sometimes draw a character and separate their body parts and some poses and just run a buttload of incremental rotation steps and save the ones that look fine in my ProMotion brush tray for easy grabbing and placing if needed when I get to animating. So I guess rotation is a hot commodity for my workflow, but every pixel artist does it differently :)

EDIT - Just saw that you added on to your post while I was replying :P

Quote
Do you think a 2x and a 3x upscaler would be useful?

Hey, if it's no big deal to add to your algorithm I don't see why it would hurt to have it, especially if somebody was using this for turning pixels into HD like you said you were, but the 4x version was more than needed for the target resolution.

Could just add one more statement to the command like "4xBR image.png imagehd.png 3" and maybe just have it default to 4x if they didn't add a number to the end of the command.

As far as what I see myself using this for is entirely unforseen. But I think the end results are kind of cool and interesting for some pieces and I can forsee using it and playing around, perhaps using the end result clusters as a reference to paint over top off in case I need to upsize a character portrait to double size but still maintain single-pixel detail.
« Last Edit: January 09, 2012, 08:02:26 am by Argyle »

Offline janiczek

  • 0001
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile

Re: See my algorithm to upscale pixel art

Reply #9 on: January 11, 2012, 07:31:37 pm
Hmm, "see my algorithm" says the subject. I'd very much like to! Would you care to post the source code or at least explained algorithm somewhere on the net? :) The results are very nice.