• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Game Modifications › Custom Texture Projects v
1 2 3 4 5 ... 12 Next »

Custom Texture Tool PS v50.1
View New Posts | View Today's Posts

Pages (117): « Previous 1 ... 16 17 18 19 20 ... 117 Next »
Jump to page 
Thread Rating:
  • 8 Vote(s) - 4.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Custom Texture Tool PS v50.1
06-09-2016, 10:28 AM
#171
CyberGlitch Offline
Junior Member
**
Posts: 10
Threads: 0
Joined: Jun 2016
(06-09-2016, 05:51 AM)Bighead Wrote: I noticed the noise reduction value isn't applied unless the mode is set to "Noise" or "Noise-Scale", so setting it to "Scale" is the only way of disabling it since it won't allow a value of 0 or it gives an error. Similar situation for "Scale" [...]


Ahh, GUIs for it tend to automate these settings (for example: the official website or this offline GUI). The program probably uses different separate modes for each function (scaling, scaling-noise red., or noise red.). Far as I know, the noise reduction and scaling are done in a single pass together. Each setting uses a "model" which is trained by taking many high quality images and modifying them (shrinking to half size, adding a set amount of noise, or both). The AI learns from the changes how to reverse them. It's main models have been trained with a bunch of anime images, but there is now a model trained for normal photos as well worth trying (you can get it here).


(06-09-2016, 05:51 AM)Bighead Wrote: The scaler setting allows setting values higher than 2, even odd numbers like 5, are you saying processing the image multiple times in increments of 2 gives better results? Obviously this wold only work for 2x, 4x, 8x, 16x, and if it does give better results its probably worth implementing it for these specific integers.

It only scales 2x in its current implementation because that's all it's been trained for. When you select a higher integer it just repeats it's 2x scale and uses a downscaling bilinear filter if needed. For example, the x5 scale means it runs three passes to make the image 8x (aka 2*2*2) then uses simple bilinear scaling to shrink it to 5x the original image's size.

For all intents and purposes scaling at 4x is the same as scaling at 2x twice with a script, though my testing finds that if you use noise reduction for your first 2x scale step, it's best to turn the noise reduction off for all future scaling steps.

Each scaling step has reduced benefit. You're not going to get much more detail after the first two passes unless you add detail at each step. You'd either do it by hand, or maybe fake detail with some filters. Bloom, sharpening, and noise can all make the scaled image look more detailed, though the former two options are difficult to automate since each image tends to require unique settings. A noise filter between each step would be a good idea though, giving a good illusion of texture which helps undo Waifu2x's smoothing effect. In photoshop I add 1.7% noise at the first step and 3.4% noise after the second step.

Here's an example of the difference this can make: http://imgur.com/2IqE4gs

A lot of this was trial and error to learn. It's one of the methods I've used take tiny screenshots like this one and make them look like fancy HD images. You can see more example of my HD conversions here. Now I'm trying to take the things I learned an apply them to HD texturing projects.
Find
Reply
06-10-2016, 09:27 AM (This post was last modified: 06-11-2016, 03:40 PM by Bighead.)
#172
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
Thanks for all the info, here's a small update.

It will now crop 75% of the width/height (of original image) from the sides of the tiled image before filtering with waifu2x, then crop the remaining (upscaled) 25% after filtering. I'm alright with math but slow in figuring it all out, so this will be improved later to like 90% to speed it up even more. I'm not sure if I should go any higher because 10% of a small image is not much to work with (50x50 only 5 pixels), probably a rare and useless case but I like to protect against anything. Also the output path now changes depending on the selected mode. Only one thing needs configured in the batch script now, variable "Waifu2x" takes full path + application (instead of being separate). I was just lazy before and needed only the path later in the script. After I get this all figured out it might be worthwhile to add waifu2x to CTT, along with this method for seamless textures.

Edit: I also noticed the command line options for waifu2x-cpp and waifu2x-caffe are nearly identical, so the script currently works with either of them.
Edit: Now crops 90% of the montage before upscaling for another "boost in speed", then crops the remaining 10%.
Final Edit: Now it's good for any textures and not just seamless.
http://www.mediafire.com/download/dzqh45gdh5o22j5/Waifu2x+Texture+Batch+v1.0.zip
Donate - Custom Texture Tool - Xenoblade Chronicles HD - New Super Mario Bros. Wii HD - Paper Mario: TTYD HD (Contributor) - Skies of Arcadia HD
Website Find
Reply
06-14-2016, 08:18 AM
#173
CyberGlitch Offline
Junior Member
**
Posts: 10
Threads: 0
Joined: Jun 2016
Wow. This is fantastic!
Find
Reply
06-14-2016, 11:55 AM (This post was last modified: 06-14-2016, 11:59 AM by Bighead.)
#174
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
If you still have a need for waifu2x, specifically with Dolphin based textures, its now included as an upscaling filter in CTT-PS (just updated a few hours ago). There's some issues with the batch script that I noticed when porting over the logic, so I'll have to fix it up eventually. But it should still work for now if you prefer. I failed to notice before that some of the commands are different between CPP and Caffe so some of the options probably don't work with Caffe. And CPP has a lower noise-reduction maximum (2) vs. Caffe (3). I will say Caffe ultimately seems like the better choice, but I still want to support both since CPP offers the option of OpenCL for AMD users. I noticed both versions of waifu2x can fail at preserving transparency in some images (I'm still uncertain what the conditions are that cause it), but Caffe has a lower failure rate. In any case I reported it as a bug: https://github.com/lltcggie/waifu2x-caffe/issues/30

I should mention that at the moment CTT-PS always applies the idea you had of tiling the image in a 3x3 grid and cropping out the excess after filtering. This works on all textures, but obviously its a waste of resources for textures that are not seamless. The crop value is still 90%, but I'm fairly certain it can be taken up to about 95-97%. It's also possible to pre-crop all the pieces then assemble them, which is most likely at least slightly faster than montaging the same large image 9 times and then cropping. So as I get the time and patience (and can get away from FFX remaster) I should be able to tighten the gap between upscaling an image normally and upscaling using that method, so the difference is so negligible that I won't be tempted to add some kind of switch to pick between "standard" and "seamless". Another thought is to only apply the method if there are no transparent pixels to be found, which means its most likely an environment texture. Maybe it's seamless, maybe it's not, but it wouldn't hit images that have transparency reducing some overhead.

Also I should mention that the upscaling filter option in CTT-PS is no longer limited to just textures with the base dimensions, it will now work on all textures including retextures. But I did have to put limits in place. It will only accept textures with dimensions 4096x4096 or lower, and the product of the scaling value * dimensions can not exceed 8192x8192. If that happens, it will continue to decrease the scale for the current texture until something lower is found. If it gets down to 2x and the result would still exceed 8192x8192, the texture is skipped. These are very high values, so I don't think it should limit anyone too much. It still exceeds the limit of xBRZ which will crash the ScalerTest if the image/result is too large (I still have to find its raw limitations and apply them accordingly).

I got carried away again. /rant
Donate - Custom Texture Tool - Xenoblade Chronicles HD - New Super Mario Bros. Wii HD - Paper Mario: TTYD HD (Contributor) - Skies of Arcadia HD
Website Find
Reply
06-15-2016, 10:41 PM (This post was last modified: 06-15-2016, 10:46 PM by Admentus.)
#175
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,977
Threads: 25
Joined: May 2015
Hi, Bighead

Your tool is amazing, but you probably already knew that. Since version v8.3 your tool outputs the following error: magic.exe geometry does not contain image `filepath to image...` @ warning/transform.c/CropImage/589
Would you by any chance know what is missing? This only occurs when rescaling textures with filters such as xBRZ or waifu2x.
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
06-15-2016, 10:55 PM
#176
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
Which version of PowerShell? And can you get a screenshot of the whole error? It usually tells which line it's messing up on. I'm guessing somewhere around 3027 or 3033. I might not even need the screenshot, mostly the PS version.
Donate - Custom Texture Tool - Xenoblade Chronicles HD - New Super Mario Bros. Wii HD - Paper Mario: TTYD HD (Contributor) - Skies of Arcadia HD
Website Find
Reply
06-15-2016, 10:56 PM (This post was last modified: 06-16-2016, 12:18 AM by Admentus.)
#177
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,977
Threads: 25
Joined: May 2015
I tested this last on v8.4, but the same occurs since v8.3. Just a sec for the screenshot.

Screenshots are added. The two images I was trying to resize are also included. Would this help?
Lastly, I added the result of the resizing process, almost invisible to see in the Attached Files, they seem to be misformed.


Attached Files Thumbnail(s)
   
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
06-15-2016, 11:38 PM
#178
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
Yeah I have no clue, I can't reproduce it.  Confused  So we'll do this fun way. Try this version:
http://www.mediafire.com/download/fd84y83dw3s8d8s/Custom+Texture+Tool+PS+v8.x+Debug.01.zip

And run any filter option. I usually output this to a text document, but I'm feeling lazy since screenshots are convenient. You should get a screen like this:
[Image: wyGBxKy.png]

Texture used is one you sent. Let's compare and hopefully I can see what went wrong where...
Donate - Custom Texture Tool - Xenoblade Chronicles HD - New Super Mario Bros. Wii HD - Paper Mario: TTYD HD (Contributor) - Skies of Arcadia HD
Website Find
Reply
06-15-2016, 11:47 PM (This post was last modified: 06-15-2016, 11:51 PM by Admentus.)
#179
Admentus Offline
Nothing but perfection for gaming
*******
Posts: 1,977
Threads: 25
Joined: May 2015
Ok, new screenshot using your debug version. This time I ran a point scaling instead of waifu2x. Regardless of the scaling filter, the issue seems to be the same. I did test it with some other images and it seems not every image is affected by this issue. In v8.2 there is no such issue, even with the images which displays an error in v8.4.

Custom Texture Tool PS v8.x Debug.01.log states:



Custom Texture Tool PS - Operation Log
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Enabled Options: Apply Upscaling Filter, Allow Not-HD Textures, Force New MipMaps, Copy Non-Textures
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Path: D:\Games\Emulators\Wii\Textures\Custom Texture Tool PS

tex1_32x32_7d1193da46a4b7c2_5.png [Original] 32x32:1,00 [Custom] 32x32:1,00 [Scale] 1,00x1,00 [Status] Texture Filtered (8x, 256x256, point)
tex1_32x32_e0da5a8b963a42e9_5.png [Original] 32x32:1,00 [Custom] 32x32:1,00 [Scale] 1,00x1,00 [Status] Texture Filtered (8x, 256x256, point)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Attached Files Thumbnail(s)
   
Super Mario 64 - Super Smash Bros. 64 - Mario Kart 64 - Zelda 64 - Star Fox 64 - Patreon - Discord
Find
Reply
06-15-2016, 11:51 PM (This post was last modified: 06-16-2016, 12:01 AM by Bighead.)
#180
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
OHHHHHH, its another one of these language difference things. Other countries use commas instead of periods for decimals, since I'm splitting on the decimal to get a whole number you're getting some weird values. I installed French language just to debug these kinds of things. Should be easy to fix since I made a function to convert it for me.

Edit: This should hopefully fix both the error messages and the calculated values:
http://www.mediafire.com/download/octek3i4hckg2vi/Custom+Texture+Tool+PS+v8.x+Debug.02.zip

If it does I'll post a quick update. Smile
Donate - Custom Texture Tool - Xenoblade Chronicles HD - New Super Mario Bros. Wii HD - Paper Mario: TTYD HD (Contributor) - Skies of Arcadia HD
Website Find
Reply
« Next Oldest | Next Newest »
Pages (117): « Previous 1 ... 16 17 18 19 20 ... 117 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode