Resizing Assets for MV

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
186
Reaction score
46
First Language
English
Primarily Uses
I only have RMXP with a lot of tiles in one sheet. Since it looks like MV uses 16 tiles by 16 tiles per sheet like VX Ace (not sure, looking at Lite), does that mean I have to splice up my RMXP tileset into several tile sheets for B-E then do the resize (either before and after the splice)?
 
Last edited by a moderator:

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
I think the amount of blur caused by that way of enlarging and shrinking is unacceptable. There is no need to increase the scale by so much.  I have had better results doing this:

Upload your graphic to http://waifu2x.udp.jp/  Don't use the version which you can download to your pc, it's rubbish.

Select Medium Noise  For RM resources this seems to give the best results.

Select resize 2x    What this does is eliminate the problem of half pixels.

Save the resulting image.

Open in Gimp.  Resize to the MV standards, so e.g. a tilesheet that had been 512 x 512 now needs to be 768 x 768.  which is the magic 1.5

You could stop there.  However, there is one further step which I do because I'm neurotic about file bloat.

If you compare, you will see that the file size of each tile sheet has shot up fourfold or more.  I therefore upload it to https://tinypng.com/which reduces the file size back down to something like the original.
Waifu2x may create sharp 1.5 times scaled images, but in case of pixel arts it will introduce too many colors for them which is destructing the purpose of pixel arts. That's why you need something like tinypng or pngquant to reduce the number of colors which in this case only making the images altered even more.

If you don't mind I will show you a magic trick to scale pixel images 1.5 times without altering their original colors.

Tree
 ​
Original Image (4.46kb, with 21 unique colors)

1.5 times scaled image (6.58kb, with 21 unique colors)
Tent
Original Image (3.61kb, with 44 unique colors)


1.5 times scaled image (5.00kb, with 44 unique colors)
Actor 4
1.5 times scaled image (51.19kb, with 131 unique colors)
I hope you will find it interesting.

Regards,

RyanBram
 
Last edited by a moderator:

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,405
Reaction score
5,023
First Language
English
Primarily Uses
RMMZ
I've been working with XP stuff for a while now (basically off and on in free time since the confirmed size of MV resources) with the XP tilesets, as I want to be able to use the caves and trees, specifically. It is not an easy process. To do it well, it is a long and tedious process, and certainly not for the faint of heart.
 
The overall process is such:

  • Run through Waifu2x (I use the Windows one with Koroshell, after getting the most recent compile of the command line windows version). Go to 2x with low anti-noise.
  • Waifu2x eats the transparency that existed on the originals - the next step is to manually remove the background colour.
  • The shadows, previously semi-transparent, now need to not only be restored to that state, but to be coloured to look the same as MV (I assume the same as VX Ace colouring), as XP shadows are purplish.
  • The 2x-sized images need to be scaled down - 75% does the trick, and I use the Lanczos in GIMP for resampling.
  • The brightness/contrast needs to be adjusted to fit.
Not everything goes through this looking flawless. The grass, for example, looks like garbage. But I am going to assume the grass/tall grass MV will have will be enough.
I wanted to see how some of the stuff I liked would look beside MV stuff, and the demo gave me this opportunity. Hurray for screenshots. I wanted to make sure I was on the right track. I think the end result is these will be very usable, overall.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,714
First Language
English
Primarily Uses
RMVXA
@RyanBram

You may have preserved the exact number of unique colours, but you have also introduced blur, and - as is clear from the character sprite sheet - lost a lot of the detail.  I'm not sure that the trade off is worth it.
 

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
@RyanBram

You may have preserved the exact number of unique colours, but you have also introduced blur, and - as is clear from the character sprite sheet - lost a lot of the detail.  I'm not sure that the trade off is worth it.
Blur is a "relative" word in human perception. As my "trick" doesn't use any single sharpening or blurring method, I don't see it as blur "theoretically speaking".

The following image
 may give better impression about the trick:

Scaling method from left to right:
1. Nearest neighbour, 2. Lanczos, 3. Waifu2x, 4. My trick using pixel scaling algorithm
As you can see from above, the image is altered too much by Waifu2x which introduce jagged line that is not easy to remove. This is because Waifu2x is not "well trained" for scaling pixel art. Its purpose is for scaling 2D anime style lineart image. Even fixing lost detail in pixel scaling algorithm by hand is easier than fixing jagged line by Waifu2x as pixel scaling algorithm will perserve the original pallete as possible.

@ksjp17

I am very curious to see your result. If you don't mind will you show me how the result of your 1.5 times in an RTP image. It will be very useful to me to improve my trick.

Just for note, I have intention to share this trick if I found it useful enough for the community. But my focus for now is to find better way to make it even more useful. My trick have the following features:

  • Offline usage
  • Batch scaling which mean we can scale as many image as possible automatically;
  • Non destructive method without introducing new color;
  • Blending method for pixel art which isn't scaled well with the above method;
  • Waifu and pixel scaling combination if someone find it as the best method.

And the most important thing for me is that I hope my trick can be included in Shaz's VX Ace to MV Converter.

Regards,

Ryan
 
Last edited by a moderator:
  • Like
Reactions: Low

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,714
First Language
English
Primarily Uses
RMVXA
Here is the link to a post where I resized the same image that someone else had done by a different method. http://forums.rpgmakerweb.com/index.php?/topic/45289-rpg-maker-mv-preorder-page-is-live/?p=454720

And here is the one done by the other method. http://forums.rpgmakerweb.com/index.php?/topic/45289-rpg-maker-mv-preorder-page-is-live/?p=454713

If you download both and quickly flick from one to another, you can see how much detail is lost in the other image e.g. the clothing of actor 2.

Whether this is better than your method I don't have time just now to find out, as it would mean using that on the same image for true comparison purposes, and I am about the leave my computer for a while.
 

OtakuD50

Villager
Member
Joined
Jan 5, 2014
Messages
26
Reaction score
19
First Language
English
Primarily Uses
Here is the link to a post where I resized the same image that someone else had done by a different method. http://forums.rpgmakerweb.com/index.php?/topic/45289-rpg-maker-mv-preorder-page-is-live/?p=454720

And here is the one done by the other method. http://forums.rpgmakerweb.com/index.php?/topic/45289-rpg-maker-mv-preorder-page-is-live/?p=454713

If you download both and quickly flick from one to another, you can see how much detail is lost in the other image e.g. the clothing of actor 2.

Whether this is better than your method I don't have time just now to find out, as it would mean using that on the same image for true comparison purposes, and I am about the leave my computer for a while.
Is it weird that the one detail that made me realize the first method had more detail was the prominence of the cleavage on actor 4?
 

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,885
First Language
English
Primarily Uses
N/A
@RyanBram:  Interesting.  Yours is much better at shapes but Waifu2x does better at interpreting smaller things.  If you could get yours to interpret things like the trim, edges and eye shine at least as clearly as Waifu2x does I will be using it.  Even without that it's a good starting point for resizing pixel art, much faster than doing it by hand.  Have you talked to anyone about including your interpreter?  If you're hoping Shaz notices you and asks you that's not going to happen.

Personally, I don't think the resize works on it's own without some external touch up.  It's a lot better than other methods, but still results in some perhaps unavoidable blurring.  But that doesn't mean it's not really useful or without merit.
 

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,405
Reaction score
5,023
First Language
English
Primarily Uses
RMMZ
Interesting. Last time I had tried the web waifu2x, it was completely destroying the edges where transparency exists. Might need to rethink my resizing approach.

Edit: This thread has actually been quite useful to me - usability of some XP elements (trees are not all double my height - why shouldn't the same be true of game trees?) are extremely important to me. The discussion here gives me some new things to try. I do rather like the result of using the web waifu2x (thanks ksjp17!) combined with saving the original palette and restoring it after resize (thanks RyanBram!) I think at this point adjusting the shadow and doing touchups where necessary (as well as contrast adjustment - better done with the whole of MV graphics to compare against) will result in something pleasantly usable for my purposes.
 
Last edited by a moderator:

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
Hi, everyone.

What sharp in human's eye perception doesn`t mean it also sharp in computing process. I saw ksjp17 result and admittedly to say that the result looks sharper than mine (for actor). But if we look it closer and try to edit the result using Paint program in Windows, we'll find the image is surrounded with halo effect:
Compared to pixel scaling algorithm, the result is much more cleaner

That's why I am really interesting in this kind of discussion, because everyone can show their best method and comparing each other to combine and find ones which most suitable for their need. I also understand that there is no algorithm that best for every user case. Perserving unique color is very useful, especially for Pixel Artist, because Pixel Artist tend to work with palette, not by adjusting brightness, contrast, and saturation using GIMP (the later approach is usually used by Lineart Artist.


Then I tried another approach by combining pixel scaling algorithm for edge detection, and Waifu2x for perserving very small detail. The result is not too bad (Although it introduce too many additional colors).  :D

Now filled with Black background in Paint


@RyanBram:  Interesting.  Yours is much better at shapes but Waifu2x does better at interpreting smaller things.  If you could get yours to interpret things like the trim, edges and eye shine at least as clearly as Waifu2x does I will be using it.


...
 
 How about the above sample? Do you mean something like that?  :)

... 


I do rather like the result of using the web waifu2x (thanks ksjp17!) combined with saving the original palette and restoring it after resize (thanks RyanBram!)


...
 
Wow...! An interesting method. Can you show me how to do that? I really interested with that (restoring palette after resize).


Regards,


Ryan
 
Last edited by a moderator:

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,885
First Language
English
Primarily Uses
N/A
You mean did you fix the problem in this new method?  It's impossible to tell, the added colors and halo are messing things up and these sprites are wrong for it.  Eliwood was an excellent sprite to see the problem on, so is the boss image you used on the other thread.  I would have guessed that such a thing was impossible because the program would have to recognize and properly interpret an implied line, but apparently Waifu2x can.
 

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
You mean did you fix the problem in this new method?  It's impossible to tell, the added colors and halo are messing things up and these sprites are wrong for it

...
In some case, the problem may unnoticeable, but for another case the problem is more visible. To be fair, let's we take the following comparison:

To be honest, for the above images Pixel Scaler is the clear winner compared to Waifu2x. Even for another XP Tiles I am still confident that Pixel Scaler is more efficient in perserving hard edge of images and their original colors, which mean tidying them up after upscaling is easier for Pixel Artist. I bet that Waifu2x cannot handle the following picture well:


I am understand that there is no single algorithm which will works for every user case. That's why in my tool, I'll give option for the users to choose the best scaling results for their needs. Thanks to @taarna23, I am almost finishing my 1.5 scaling method using combination between many algorithms. The following image is the picture of Actors1 with detailed image as Waifu2x, but still retaining its original palette.

Finally, my tool will has the following features:

  • Offline usage (no internet connection needed);
  • Works automatically just by drag and dropping picture to the executable;
  • 2 Scaling modes: Pixel art scaling and Line art scaling;
  • Perserving hard edge and half transparency shadow of images (no halo effects);
  • 3 Output results: Original palette, 256 colors, Blended colors.
I'll share the tools in its own thread later. Still waiting for more comments.

See also:

Upscale and Cleanup with XBR in Doing an HD Remake the Right Way.

Best regards,

RyanBram
 
Last edited by a moderator:

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,760
Reaction score
10,885
First Language
English
Primarily Uses
N/A
Not sure how that's a response to me.  Are you saying that the way I've noticed that Waifu2x makes implied lines cleaner than your scaling method is impossible to reproduce in a purer pixel algorithm without causing other issues like that halo problem?  It got a little lost in your sales pitch if it was.

If your just saying that yours is better sometimes, then you missed the entire point of my post.  I was under the impression that you were still working on yours and wanted to know what would make it more effective, so I pointed out something that I noticed Waifu2x was effective at and suggested it be added to yours if possible.  I have no programming knowledge nor wish to have any.  Understanding how it works is not useful to me.  I have no opinions on which upscaler is best.  To be blunt, when it comes to pixel art I find them all to be insufficient enough that it's easier for me to upscale and clean it up myself and not use them at all.  I would really like it if yours would be the method I could use, but it's not there yet.  Who knows, maybe it's not possible, but I do respect you for trying.
 

tati light

Veteran
Veteran
Joined
Aug 15, 2015
Messages
160
Reaction score
110
First Language
English
Primarily Uses
In some case, the problem may unnoticeable, but for another case the problem is more visible. To be fair, let's we take the following comparison:

@About your tree example: That's just personal taste, I personally prefer the tree on the right (with waifu2x), if you look at the right-down side of the leaves part (not shadow), you will see it's much more smooth, rather than the crispy outline from the tree on the left. But as I said, that's just personal tastes, some people will prefer the left, and some people will prefer the right tree.

Still, it's very nice that you have you created your own tool which does this type of thing, it can be definitely useful depending on circumstances and types of sprites.

@On-Topic:

I made a guide few days ago about resizing tiles in an automated way (batch), maybe it can help or not. In the case of my guide, its only purpose is for tilesets. For other types of sprite, it wouldn't work very good. Example: for characters, faces, sprites etc my guide is useless, it's aimed only for tiles/tilesets.

http://forums.rpgmakerweb.com/index.php?/topic/45746-resizing-tiles-for-mv/

(if it's not allowed to link to a guide/thread, let me know and I will remove the link from my post, or also feel free to delete this post if it's breaking the rules)

Note that no method will be ever as good as the original art. Doing the art or editing the tile/sprite yourself will be always the best (but a lot more time consuming as well). Using any program or doing any automated actions will always make you lose some of the art quality.
 
Last edited by a moderator:

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
I don't know why I sounds offense here. But before I explain it too far, let me told you that English is not my native language (can be seen in my profile) so apologize if there are many misunderstanding here.
 

...
If your just saying that yours is better sometimes, then you missed the entire point of my post.  I was under the impression that you were still working on yours and wanted to know what would make it more effective, so I pointed out something that I noticed Waifu2x was effective at and suggested it be added to yours if possible
...
 
So what did you think I am done for now? I integrated Waifu2x as you suggested, but also trying to tidy up some of its drawback. I never claim that I created the algorithm. I just creating "trick" which combining the power of several image manipulation algorithm into single automation program which may be useful for some one who doesn't have enough art skill as me.
 
Please look again in above post that I said:

I am understand that there is no single algorithm which will works for every user case. That's why in my tool, I'll give option for the users to choose the best scaling results for their needs. Thanks to @taarna23, I am almost finishing my 1.5 scaling method using combination between many algorithms. The following image is the picture of Actors1 with detailed image as Waifu2x, but still retaining its original palette.
 
I think the best point of this forum is sharing. And I am very open for any suggestion and this is what I am working now. Combining several best algorithm to get the best result for every user case. I also pointed to the article which may be useful for everyone here as in that article there are many useful information and tips for creating HD Remake (isn't it the point of this discussion?).
 

@About your tree example: That's just personal taste, I personally prefer the tree on the right (with waifu2x), if you look at the right-down side of the leaves part (not shadow), you will see it's much more smooth, rather than the crispy outline from the tree on the left. But as I said, that's just personal tastes, some people will prefer the left, and some people will prefer the right tree.
Thank's @Yurixy for your opinion. Of course I'll try to adding it in my automation tool if the user need that kind of result.
 
But for my personal opinion, why perserving original palette and hard edge does matter in pixel art, because it has its own advantage:

  • To reducing file size (remember that MV can be played in Web Browser where bandwidth is expensive and speed of internet connection is vary);
  • To ease further tidy up by artist, because no algorithm is perfect which mean sometimes every image still need personal touch;
  • Because the image will be scaled up or down again based on the resolution of player device. If we play in Android, Android will scaled it down, when we play in HD Television, it will scaled it up. At the end, the process of scaling itself will resulting natural smooth for pixel art because every device will smooth it automatically.
  • The smooth effect from the tree above is not caused by Waifu2x. Waifu always perserve hard edge (see Eliwood picture above). The smooth is caused because the tree is scaled down again using smoothing filter into 1.5, after it was scaled into 2.0. (See the original author comment in this Github page). 
And there are many reason for it that was explained in my reference in previous post. Surely, I really like this kind of discussion. Because I can hear a good opinion from many great people.
 
Best regards,
Ryan Bram
 
Last edited by a moderator:

tati light

Veteran
Veteran
Joined
Aug 15, 2015
Messages
160
Reaction score
110
First Language
English
Primarily Uses
But for my personal opinion, why perserving original palette and hard edge does matter in pixel art, because it has its own advantage:
I completely agree with you about preserving hard edge in pixel art, but that tree sprite is too big for my concept of pixel art. I think from a certain size and above, a smooth picture (or smooth outline) would be preferred (at least for my tastes). If the art is a pixel art like up to 48x48, then I agree with your statement. On another note, yes, that tree can be considered pixel art with no problems at all, but for me, it looks like that style is just of a sprite (not pixel), and if it would be supposed to be pixel at that size, I would like to see more details on that tree, because it would look a bit bland in my concept.

Of course, this is just my personal taste :)

This is what I would expect of a pixel art tree that size - http://eurukatt.deviantart.com/art/tree-png-156741992 (i.e: more detailed).

For converting 32p tiles to 48, preserving hard edges, plus your examples, are definitely a great method.

For higher sizes than 64p, I think it would need definitely a bit of manual editing to look good. (on per image "quality" analysis)

Edit: If you end up sharing your tool, I will definitely use it. I love to do comparisons of images and resizes, as I worked with this kind of thing during many years of my life.
 
Last edited by a moderator:

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,405
Reaction score
5,023
First Language
English
Primarily Uses
RMMZ
In no small part thanks to this thread, I've changed my approach to resizing XP graphics. I'm never going to try characters - I don't need them.

  • Waifu2x on the original graphics (2x size, medium noise) - it seems like if the graphics have been modified or even just resaved by GIMP, there is some difference that causes strange issues at all the transparent/opaque borders.
  • Resize in GIMP - 75% of the original size using Lanczos for the resizing
  • Use the Threshold Alpha tool (Layers -> Transparency -> Threshold Alpha) - changes partial transparency to fully transparent or fully opaque - I tend to set it somewhere between 100 and 110
  • Appy palette of the original file to the new one - Leave the original open in GIMP, and use Image -> Mode -> Indexed. Set it to use a specific palette and select the topmost one, which should be the colourmap of the original image.
The above results in the following, as seen on the leftmost side:



Next:

  • Clean up extraneous pixels - this can range from simple to tedious, depending on how much the of the bluish outline was retained when converting to the palette. (Second tree)
  • Return transparency to shadow - select the pixels of the shadow and partially erase them. I use the eraser tool at 55% opacity (Third tree) - this step requires converting the image back to RGB
  • Fix shadow colours & general colours - I desaturate by luminosity and then decrease the brightness. In this example I also adjusted brightness and contrast - I don't have exact values for this, play with it until it seems right for your project. (Last tree)
 
Last edited by a moderator:

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
275
First Language
Indonesian
Primarily Uses
RMMV
Then I decided to share my automation tools now. I need input and suggestion from all of you to make it more useful for you. Or maybe you can improve it yourselves as it is just a simple batch script. For using it, please drag an image file on top of the batch file.

=> Download <=

Limitation: Currently only supporting PNG input.

What do I want to achieve with my tool?

The following is the chronology.

This is what I would expect of a pixel art tree that size - http://eurukatt.deviantart.com/art/tree-png-156741992 (i.e: more detailed).
For converting 32p tiles to 48, preserving hard edges, plus your examples, are definitely a great method.
I have checked the tree with XnView and very amazed about how the artist make it:

I try rescaling the similar one in RTP
 using Waifu2x and the following is the result:
Thanks to tutorial from @taarna23 I have managed to restore the tree to its original palette without visually loss of quality.
The above image has 30 unique colors
This is the end where my automation tool is useful. Because the only one that can make it more perfect is a dedicated pixel artist. I just to try to keep the number of palette minimum to make pixel artists comfortable as it is usually how they are work.
Useful information and tutorial http://www.fortressofdoors.com/doing-an-hd-remake-the-right-way
 
Last edited by a moderator:

PokarFace

Villager
Member
Joined
Oct 16, 2015
Messages
16
Reaction score
1
First Language
English
@RyanBram 

Can I use your tool to re-size all my VX Ace assets or just the RPT?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,734
Reaction score
7,851
First Language
German
Primarily Uses
RMMV
@RyanBram 

Can I use your tool to re-size all my VX Ace assets or just the RPT?
You mean the RTP, and that depends not only on the tool programmer but on the licence and TOS you have for those other resources as well - if you are allowed to edit them for your own project and use in MV, then yes.

If you are not allowed to edit them or not allowed to use them in MV then not.

And each resource may have different conditions depending on the artist you got it from.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

HexMozart88 wrote on Citali's profile.
Kikuo!
The lack of bike trails and bungee jump areas in this city should be criminalized.
SF_Actor3_8 added!



A recent screenshot that I also shared on Reddit and the likes, links in my signature if you want to follow :)


I am starting to get a hang of this parallaxing mapping business. Still inexperienced, but at least I can be a lot more creative now :)

Forum statistics

Threads
107,416
Messages
1,029,546
Members
139,543
Latest member
Antrixdoesstuff
Top