Page 1 of 1

Approximating higher resolution textures.

Posted: Wed May 11, 2016 3:29 pm
by alan2here
We can increase the resolution of the textures in Factorio with algorithms that have a guess at what the extra pixels might look like from the original pixels available.

Original (nearest neighbour):
Image

Bicubic (more or less, gradients between the pixels):
Image

Original & HQX (good for pixel art):
Image
Image

There are other approaches to like vectorisation, neural networks, things with inpainting in various ways, things with the spacial/frequency domain.

---

Any of thease can be pre-computed, or resolved at least to some extent on the fly as you scroll the mouse wheel and zoom in, so that could an interesting thing to do with a mod, I would also imagine that this would not conflict with others mods as it just increases the resolution of the textures, for buildings, belts, items on belts etc... It doesn't need to be excellent to give an interesting artistic effect, and it's all automatic.

Image

---

I have an idea that I've experimented with myself, with unfortunately mixed results, but I feel is a resonably solid idea, there are so many weights and variables, so many ways that it could be implemented that perform differently.

Original (sorry if this doesn't seem very pixelated on small monitors):
Image

Enhanced:
Image
Image

The concept is that large regions of the image are taken, either systematically or at random, shrunk down and superimposed over smaller regions of the image that they resemble.

Image

Most objects are less obviously recursive, but I think often are to a reasonable degree even if it is not obvious to us humans.

The performance would improve considerably if matches from one texture could be painted over others, not just itself.

This should change a temporary version of the textures, not permanently alter the factorio texture files.

Re: Approximating higher resolution textures.

Posted: Wed May 11, 2016 3:57 pm
by mooklepticon
Have you seen WaiTex? viewtopic.php?f=96&t=13142

Re: Approximating higher resolution textures.

Posted: Wed May 11, 2016 5:43 pm
by alan2here
That's impressive :)

WaiTex uses waifu2x that uses a convolutional neural network.

I've expanded one of the examples even further :)

Image