OpenXcom Forum

Contributions => Programming => Topic started by: grrussel on February 27, 2014, 12:09:36 am

Title: Depixelating
Post by: grrussel on February 27, 2014, 12:09:36 am
https://research.microsoft.com/en-us/um/people/kopf/pixelart/supplementary/multi_comparison.html

Wonder how XCOM would look after that approach?
Title: Re: Depixelating
Post by: alienfood 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.
Title: Re: Depixelating
Post by: kkmic 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.
Title: Re: Depixelating
Post by: Align on February 27, 2014, 09:43:18 pm
Neato burrito.
Title: Re: Depixelating
Post by: Daemonjax 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.
Title: Re: Depixelating
Post by: SupSuper 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.
Title: Re: Depixelating
Post by: Hythlodaeus 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.
Title: Re: Depixelating
Post by: RSSwizard 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?
Title: Re: Depixelating
Post by: skymarshall 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.

Title: Re: Depixelating
Post by: GraemeMor 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:

(https://i.imgur.com/8Yt1bj0.gif)

and here it's zoomed in 200%:

(https://i.imgur.com/sIc3Oo8.gif)

and here is the album to compare the images:

https://imgur.com/a/1Dje7#0 (https://imgur.com/a/1Dje7#0)
Title: Re: Depixelating
Post by: arrakis69ct on October 04, 2014, 02:04:01 am
interesting.... may be possible do more filters???