You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

Scaling algorithms

b/Tech, Science & IT Started by gameblabla, September 09, 2016, 02:05:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/gameblabla March 31, 2017, 08:11:49 PM
Quote from: p2 on March 30, 2017, 10:26:29 PM
Doing SFG in Detail Recovery Mode on a 765x335px picture since 2 days.....  :ninja: Can't wait for the reults  :thumbsup:
You're going to be hugely disappointed... it's not designed for that.
Oh well

QuoteI think we will have what is needed in ten years.
I agree, especially if someone builds an accelerator card for Waifu2x !  ;D

Also, if you want to waifu2x a video, it's quite simple (if not CPU and/or GPU intensive)
1. Convert your video into individual frames with ffmpeg
2. Use that version of waifu2x, its a command line only app that supports CUDA :
https://github.com/tanakamura/waifu2x-converter-cpp
3. Write a script to process the png files
4. ???
5. PROFIT
u/semiprocoder April 01, 2017, 01:18:34 AM
Waifu isn't that great for Miraculous: Tales of Ladybug and Cat Noir (never thought I would like this show, but it is AWESOME). Not that bad, either. The one thing I would say is that I screenshot netflix as I could not find any good online images, so the image quality on these was pretty bad to start off with.
https://www.dropbox.com/sh/r0x6t2khang7tzl/AAC7xfc8nvpZwaKfkbyX3TAaa?dl=0
Last Edit: April 01, 2017, 03:45:06 AM by semiprocoder
u/VMike April 01, 2017, 07:51:22 PM
Quote from: p2 on March 29, 2017, 11:50:59 AM
could someone maybe try this on a lil 20sec movie or something?
I'd love to see how this style (u called it painting) looks like if its an animated thing O.O

*currently doing SFG Sharpen Edge in the walrii
Edit01: resembles original image 1m) 99.553474%
Edit01: resembles original image 2m) 99.43323%
Edit: it didnt change much at all... looked like some jpeg artifacts all over the pic, nothing special... :/
now trying some more fancy stuff (parts of AoE2 screenshots)

Here is some video on some gameplay I made :)
Last Edit: April 01, 2017, 07:53:48 PM by VMike
u/semiprocoder April 02, 2017, 08:26:16 PM
A video of minecraft with a resource pack upscaled by waifu2x. The resource pack I used is faithful 32x, and I upscaled (only) blocks and items to 256x. I think the result looks pretty nice. Forgive the low fps; minecraft is being weird rn (Ex: when I take a screenshot, the res is 2304x1202, which is higher than my monitor. I have the res set to 1080p in optifine, so idk whats wrong.). Anyways, here is the video:
Last Edit: April 02, 2017, 08:29:55 PM by semiprocoder
u/VMike April 02, 2017, 08:43:28 PM
Quote from: semiprocoder on April 02, 2017, 08:26:16 PM
A video of minecraft with a resource pack upscaled by waifu2x. The resource pack I used is faithful 32x, and I upscaled (only) blocks and items to 256x. I think the result looks pretty nice. Forgive the low fps; minecraft is being weird rn (Ex: when I take a screenshot, the res is 2304x1202, which is higher than my monitor. I have the res set to 1080p in optifine, so idk whats wrong.). Anyways, here is the video:


Internal resolution can be higher than your monitor. Eq I play some games in 4k on my 1080p tv. I have also taken some screenshots at 8k for fun, also that even though my tv is only 1080.
u/p2 April 02, 2017, 09:07:11 PM
so thats how those 2k minecraft texturepacks are made O.O
jk those vids (especially the FF one) look really beautyful!  :love:
u/VMike April 02, 2017, 09:08:45 PM
Quote from: p2 on April 02, 2017, 09:07:11 PM
so thats how those 2k minecraft texturepacks are made O.O
jk those vids (especially the FF one) look really beautyful!  :love:
Have one more :)
u/p2 April 02, 2017, 09:11:52 PM
omg it's just too adorable how the character model looks like its getting simplyfied when further away  :thumbsup:

btw that's EXACTLY how every game engine should do it!! No quality loss, no annoying blur effects, no enemies suddenly appearing once they're close enough, just simplyfied models ^.^
u/VMike April 02, 2017, 09:15:19 PM
Quote from: p2 on April 02, 2017, 09:11:52 PM
omg it's just too adorable how the character model looks like its getting simplyfied when further away  :thumbsup:

btw that's EXACTLY how every game engine should do it!! No quality loss, no annoying blur effects, no enemies suddenly appearing once they're close enough, just simplyfied models ^.^

The reason it looks like that is because the game is rendered at psOne native res, wich is 320x240 pixels. It gives best result with Waifu2x if the image is unstretched and not have anything added to it with the emulator. That is one problem we could have if one day Waifu is available for real time. The 3d rendered elements of the game such as field view and boss fights (and characters) are rendered extremely low. I don't know how it would be if I did this to high rendered images. All I know is that it would not make the pre-rendered backgrounds look as good as they do now.
u/_iPhoenix_ April 02, 2017, 09:47:39 PM
Or you could spend an hour with some close friends and GIMP

u/gameblabla April 02, 2017, 11:33:12 PM
@VMike, i don't understand why you want to apply Waifu2x to PS1 games, especially 3D games.
For 3D games, most people are better off using the OpenGL renderer and use Widescreen hacks.
It won't look as odd as Waifu2x, at least for games like Resident Evil.

But if you insist... it can be done but we would have to use the software renderer.
In that case, it's better to experiment results using pcsx4all or a more primitive console like the Sega Megadrive/Genesis.
u/VMike April 02, 2017, 11:42:57 PM
Quote from: gameblabla on April 02, 2017, 11:33:12 PM
@VMike, i don't understand why you want to apply Waifu2x to PS1 games, especially 3D games.
For 3D games, most people are better off using the OpenGL renderer and use Widescreen hacks.
It won't look as odd as Waifu2x, at least for games like Resident Evil.

But if you insist... it can be done but we would have to use the software renderer.
In that case, it's better to experiment results using pcsx4all or a more primitive console like the Sega Megadrive/Genesis.
The reason is how it fixes the pre-rendered backgrounds in games that uses those. And those games are about all I play on Ps1. Like most rpgs, Resident Evil etc.
I know it wont do much good to the 3d elements.
May I ask why software rendering would be better? Since waifu uses cuda. Well, I am not good at this. But I really would like Waifu2x for ps1 emu, yes  :P
u/gameblabla April 02, 2017, 11:47:31 PM
Quote from: VMike on April 02, 2017, 11:42:57 PM
May I ask why software rendering would be better? Since waifu uses cuda. Well, I am not good at this. But I really would like Waifu2x for ps1 emu, yes  :P
We could use OpenGL rendering but we would have to render it again to a framebuffer so we treat it again with Waifu2x.
With software rendering, we could simply pass the internal framebuffer to waifu2x to another bigger framebuffer.
There's probably an easier way to do it though.
u/VMike April 02, 2017, 11:53:19 PM
Quote from: gameblabla on April 02, 2017, 11:47:31 PM
Quote from: VMike on April 02, 2017, 11:42:57 PM
May I ask why software rendering would be better? Since waifu uses cuda. Well, I am not good at this. But I really would like Waifu2x for ps1 emu, yes  :P
We could use OpenGL rendering but we would have to render it again to a framebuffer so we treat it again with Waifu2x.
With software rendering, we could simply pass the internal framebuffer to waifu2x to another bigger framebuffer.
There's probably an easier way to do it though.
What about speed? To get the result I have got in the videos I have made, each frame took almost 0.5 seconds to render (980ti). I don't know how well optimized waifu is of course.
u/gameblabla April 03, 2017, 12:18:15 AM
Quote from: VMike on April 02, 2017, 11:53:19 PM
What about speed? To get the result I have got in the videos I have made, each frame took almost 0.5 seconds to render (980ti). I don't know how well optimized waifu is of course.
This means that the emulator would only be able to render at 2 frames per second... Not much if you ask me
I doubt Waifu2x can be improved that much. Not with significant differences anyway
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal