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

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #10 on: January 11, 2012, 08:23:50 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.
Sorry, I forgot.

Here's a forum where I've posted some explanations: http://board.byuu.org/viewtopic.php?f=10&t=2248&sid=edaa0bc013fc818260120a23334b3ce8

Sources xBR in Paintwon game: http://paintown.svn.sourceforge.net/viewvc/paintown/trunk/src/util/sdl/xbr.cpp?revision=6823&view=markup

Sources of Kega plugin (genesis emulator): http://www.multiupload.com/69MJ0ZOPAD

Shader implementations (in Cg): http://www.multiupload.com/M2SUIU3J6H

Offline janiczek

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

Re: See my algorithm to upscale pixel art

Reply #11 on: January 11, 2012, 08:30:12 pm
Thank you, Hyllian! The explanation on the forums is especially helpful.

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #12 on: January 11, 2012, 09:17:12 pm
Thank you, Hyllian! The explanation on the forums is especially helpful.
There are some slightly differences between algorithm explanation and the implementation itself. It's because the tutorial was made early and I continue evolving it.

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #13 on: January 13, 2012, 01:50:27 am
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.
Done!

Here the xBR app, now scales to 3x and 4x: http://www.multiupload.com/2JY2QM1AC3

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


The 3x implementation is a bit different than the 4x. In 3x I didn't blend pixels, so the original palette is preserved, though the result is bit more jagged. Because of this, 3x scales very well to 9x, 27x and so on.

Here an example:

Original


3x


9x


27x (too big to post directly)
http://i.imgur.com/Pbd5m.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 #14 on: January 13, 2012, 12:12:55 pm
Haha! Cool stuff and not bad results! Gotta say, also, this feels like a less destructive way to prepare pixel art to bring into a vector editor at a better resolution for live trace (were there ever a need).  Going to have to print that out and scare my wife with it...

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #15 on: January 13, 2012, 03:28:29 pm
Click to see the real size:
1x.......3x.............................9x..................................27x................................81x
http://bildr.no/thumb/1077155.jpeg http://bildr.no/thumb/1077158.jpeg http://bildr.no/thumb/1077159.jpeg  http://bildr.no/thumb/1077160.jpeg  http://bildr.no/thumb/1077161.jpeg
« Last Edit: January 13, 2012, 03:33:09 pm by Hyllian »

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #16 on: January 13, 2012, 09:04:40 pm
2x done!

http://www.multiupload.com/GQFZDT9MAV

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

Offline Pixelchaser

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

Re: See my algorithm to upscale pixel art

Reply #17 on: January 14, 2012, 02:20:39 pm
cant seem to get x2 working with latest version ?

edit. working now. think i was trying with older version.

Great work btw !
« Last Edit: January 14, 2012, 02:24:06 pm by Pixelchaser »

Offline Hyllian

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

Re: See my algorithm to upscale pixel art

Reply #18 on: December 05, 2012, 12:37:47 pm
Ive improved a bit the algorithm for pixel arts that use many colors. It preserves dithering. It only scales by2, though.


Download here:  https://anonfiles.com/file/92e2ed25e7efaae5fe28f76608658be8


Example of this thread (click to see in full size):
http://bildr.no/view/1335316

Usage:

          Usage: 2xBRh <input png> <output png>
« Last Edit: December 05, 2012, 12:48:51 pm by Hyllian »

Offline Jigsaw

  • 0001
  • *
  • Posts: 26
  • Karma: +0/-0
  • お前はもう死んでいる。
    • View Profile
    • Josef Axner: Digital Art Portfolio

Re: See my algorithm to upscale pixel art

Reply #19 on: December 05, 2012, 05:57:37 pm
This looks really cool! The download links for the older versions (non-dither preserving, etc) seem to be broken though, could you provide a new link to the latest version of the 4x scaler? (assuming this new one hasn't replaced it entirely)