Author Topic: Depixelating  (Read 10827 times)

Offline grrussel

  • Captain
  • ***
  • Posts: 72
    • View Profile
Depixelating
« on: February 27, 2014, 12:09:36 am »

Offline alienfood

  • Captain
  • ***
  • Posts: 79
  • It's people!
    • View Profile
Re: Depixelating
« Reply #1 on: February 27, 2014, 02:04:54 am »
Very interesting. The microsoft algorithm looks very good on those cartoony Mario subjects. For the slightly more realistic warrior and skeleton I prefer the hq4x.

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Depixelating
« Reply #2 on: February 27, 2014, 10:06:26 am »
Yeah, the hq4x has some pixelization in the result, maintaining the classic look of the image.

The MS algorithm (although very good),  creates a vector image from the original bitmap. The image loses it's classic look.

Offline Align

  • Colonel
  • ****
  • Posts: 196
    • View Profile
Re: Depixelating
« Reply #3 on: February 27, 2014, 09:43:18 pm »
Neato burrito.

Offline Daemonjax

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: Depixelating
« Reply #4 on: April 07, 2014, 04:11:31 am »
After looking at the abstract for the algorithm, I think I can grab some ideas from it to improve the SABR shader.

I need to hunt for the full whitepaper, though.

It does look amazing for low res "cartoony" shapes that have very low color bit depth... and they even say themselves that it kinda sucks for anything meant to look realistic (like, even remotely).  But they have some good ideas on ways to decide which edge to extend in upsampling.  The technique looks calculation intensive, at least when taken to the extreme shown in the supplemental material -- whenever an algorithm starts talking about optimizing splines and graphs, I start to suspect it's not realtime.  I don't even want to think about the amount branching that would be required for a full implementation.

5xBR is circa 2011/2012, and this abstract was supposedly written in 2011, so it's possible 5xBR is based on it in part.  Maybe, maybe not.

EDIT: The technique proposed isn't really suitable for realtime rendering.
« Last Edit: April 07, 2014, 04:51:25 am by Daemonjax »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Depixelating
« Reply #5 on: April 07, 2014, 05:06:41 am »
Note that you can throw any GLSL shader you want at OpenXcom, it's not a limited list.

Offline Hythlodaeus

  • Colonel
  • ****
  • Posts: 276
    • View Profile
Re: Depixelating
« Reply #6 on: June 15, 2014, 02:28:01 pm »
Short answer: ugly. Scaling filters are the work of the devil, sent to this realm to make our games slower and horrible. Fall not into the temptation of using them.

Offline RSSwizard

  • Commander
  • *****
  • Posts: 793
    • View Profile
Re: Depixelating
« Reply #7 on: August 25, 2014, 05:17:53 am »
I have to agree somewhat with Hythlodaeus

This aint so great for real-time rendering.

However what it is good for is Resizing Upsampling in general.

So if you were going to Resize basic XCOM sprites to be 2.5 or 3 times their existing resolution, so that you can save them and use them as High Resolution Sprites . . .

This would be an excellent way to do that.
To generate enhanced game resources on-disk.
Not sure that algorithm is available though?

Offline skymarshall

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Depixelating
« Reply #8 on: August 25, 2014, 12:24:56 pm »
That hq4x algorithm does look amazing on the cartoony sprites.  Theres a filter included in OpenXcom (scale4xhq) that I assume is doing the same thing? 

Agree that running a filter on the final screen is BS, and it's much better to use the algos to produce higher quality alternative sprites upfront.  I hate the way that pixellated fonts look, for example, after a filter.

« Last Edit: August 25, 2014, 01:04:29 pm by skymarshall »

Offline GraemeMor

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: Depixelating
« Reply #9 on: August 27, 2014, 07:00:49 pm »
I've always wondered if it would be possible to mix two shaders together with some sort of double rendering? I've made a sample of the SABR-XComified shader with a non-shader image superimposed on top of it at 60% opacity:



and here it's zoomed in 200%:



and here is the album to compare the images:

https://imgur.com/a/1Dje7#0

Offline arrakis69ct

  • Colonel
  • ****
  • Posts: 245
    • View Profile
Re: Depixelating
« Reply #10 on: October 04, 2014, 02:04:01 am »
interesting.... may be possible do more filters???