• 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 (115): 1 2 3 4 5 ... 115 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
03-25-2015, 10:43 PM (This post was last modified: 06-13-2022, 06:39 AM by Bighead.)
#1
Bighead Offline
Oversized Cranium
*******
Posts: 1,970
Threads: 15
Joined: Aug 2011

Description / Download

This is a PowerShell script for Windows with a GUI that makes use of the command line options of several external programs, that can perform a variety of functions for custom textures. It can be used to convert textures between PNG and DDS, and supports a wide range of DDS formats: BC1-BC7, RGBA, ARGB, L8, A8, and LA8. Other supported image formats are TIF/TIFF, TGA, and JPG for niche situations. The script automatically handles mipmaps which can be manipulated or disabled, it will auto-repair many issues found in DDS headers, and can seamlessly rescale textures and apply advanced upscaling filters.

This texture tool was designed for Dolphin emulator texture packs, so many of the core features revolve around Dolphin. Over time it has become powerful enough to manage many types of texture packs, and also convert/create "phyre" textures from The Legend of Heroes: Trails of Cold Steel series and Final Fantasy X/X2 HD remaster. The tool has a built-in help menu that covers everything it can do in detail.

NOTICE: If Microsoft, Google, Discord, or any other corporation flags my script as a "virus", I can assure you it is NOT a virus and does not do anything nefarious. All of the code is completely visible by editing the script with any standard text editor. Anyone who has the appropriate knowledge can verify that there is nothing going on that does anything that will harm your PC, steal information, etc. My only goal is to create something that people will find useful for their projects. It's really annoying these companies are trying to control the flow of software for "the greater good", when in reality it just gives them a stranglehold on who gets to create and share software.

Download - Mirror - Changelog - Archive - Programs Pack

Preview: (Show Spoiler)
Standard View & Texture List: The main window and the texture list are separate windows when set to "Window".

[Image: FpOEsIw.png]

Docked Texture List: The main window and the texture list are combined into a single window when set to "Docked".

[Image: pCPHRW7.png]

Installation and Setup

ImageMagick is the only hard requirement to get it up and running. The script has built-in documentation, which can be accessed by pressing the "Help" button. If you are new to using this script, I do suggest going with the "Full Installation Method" as it is the easiest to get everything up and running.

Basic Installation Method: (Show Spoiler)
This installation method is much more advanced in the long run.
It allows customizing which programs to install that CTT-PS makes use of.

• Install ImageMagick - Link
• If creating DDS textures, install TexConv and optionally Compressonator
• Run the script by opening the CTT-PS launcher executable Custom Texture Tool PS Launcher.exe
-- You can also run the script (Custom Texture Tool PS vxx.x.ps1) by right clicking it and selecting Run with PowerShell
• Install other programs that the script requires as needed
• Link these programs to the script using the Options menu Tool Paths tab
Full Installation Method: (Show Spoiler)
This installation method is much simpler in the long run.
It gives full access to all programs and features with the least amount of effort.

• Download and install the CTT-PS Programs pack - Link / Mirror
• Install ctt-ps_programs_installer.exe to default location of:
-- C:\Users\UserName\AppData\Local\CTT-PS Data\CTT-PS Programs
-- Installing to the root of any HDD (C:,D:,E:, etc) is also valid such as C:\CTT-PS Programs
-- Do NOT install to Program Files or Program Files (x86) - (Why not?)
• Run the script by opening the CTT-PS launcher executable Custom Texture Tool PS Launcher.exe
-- You can also run the script (Custom Texture Tool PS vxx.x.ps1) by right clicking it and selecting Run with PowerShell
• Click the Options button which shows the Tool Paths tab
• Check the checkbox under Tools Master Paths - Image
-- All tool paths should be automatically filled in if installed to: C:\Users\UserName\AppData\Local\CTT-PS Data\CTT-PS Programs
-- All tool paths should be automatically filled in if installed to: C:\CTT-PS Programs
• If installed somewhere else, manually locate the CTT-PS Programs folder
• Install the other included packages as needed, more info in the ReadMe.

Supported DDS Programs

• ImageMagick - Default. Can create DXT1, DXT5, and ARGB8. Creates very low quality DXT1/DXT5 DDS textures. Uses magick.exe.
• DirectX TexConv - Can create DXT1, DXT5, BC7, and ARGB8. Lower quality DXT1/DXT5 textures, high quality BC7 textures. Uses texconv.exe.
• Compressonator - Can create DXT1, DXT5, BC7, and ARGB8. Highest quality BC7 textures. Fails creating some textures. Uses CompressonatorCLI.exe.

TexConv is required to create BC7 textures, use the script's Image Viewer, and convert BC7 textures to other formats. Compressonator is capable of these tasks, but randomly fails with some images.
If confused on which program to install and use, I suggest all of them. If a program fails to create a texture, it will fall back to another one and continue to do so until the image is created. Compressonator should be selected within the tool when creating most DDS images, but TexConv is still required for when Compressonator fails to create an image.

Other Supported Programs

The following programs are used to apply an upscaling filter to textures.
• xBRZ ScalerTest - Allows upscaling textures with the xBRZ filter.
• Waifu2x-Caffe - Allows upscaling textures with waifu2x filter (nvidia cards required for full speed).
• Waifu2x-CPP - Not as powerful as waifu2x-caffe, but supports OpenCL (faster than using CPU for AMD users).
• ESRGAN - Enhanced Super-Resolution Generative Adversarial Networks.
• SFTGAN - Recovering Realistic Texture in Image Super-resolution by Deep Spatial Feature Transform.
• Python v3.9.x - Multi-platform scripting language. Required to use ESRGAN and SFTGAN upscaling filters. Only v3.9.x is supported at the moment.

The following programs can be used to optimize PNG textures.
• OptiPNG - Attempts to reduce the file size of PNG images.
• OxiPNG - An alternative to OptiPNG that supports multi-threading for better performance.
• Pingo - From my personal testing, this one seems to yield the best compression for PNG images.
• ECT - Supports a number of image formats, but only used for PNG in CTT-PS.

The following programs are used to create materials for Ishiiruka Dolphin.
• Ishiiruka Tool - Required to work with material map textures, and create them from materials.
• Material Map Generator - Generates materials from color textures that can be combined with Ishiiruka Tool.

The following programs can be used to unpack PKG files for The Legend of Heroes: Trails of Cold Steel I and II.
• Kiseki PKG Sharp - This is the best PKG tool which supports recompressing PKG files.
• PKGTool - An alternate PKG tool, this one is only mentioned if having issues with the one above.

None of these programs are required to use the script, but they are needed to unlock the features they support.

Features

• Generate Dolphin Resource Packs.
• Supports PNG, DDS, JPG, TIF/TIFF, and TGA image formats.
• Rescale all textures at a fixed integer scale.
• DDS can be created with DXT1, DXT5, BC7, or uncompressed ARGB8.
• Check textures for a variety of issues (scaling factors, aspect ratios, etc.).
• Copy textures identified with issues to a folder for manual fixing.
• Auto-repair most textures that are identified with issues.
• Missing mipmaps are automatically generated when repairing/converting.
• Custom mipmaps can be provided or the script can be forced to generate new ones.
• The type of DDS mipmaps generated (internal/external) can be configured.
• Create material maps from color, bump, spec, nrm, and lum textures (required Ishiiruka Tool).
• Rescale/Convert already combined material maps (the generated nrm texture).
• Existing material maps and/or materials are automatically handled when found.
• Optimize PNG file sizes using OptiPNG. Can be written "in-place" or optionally output files to a folder.
• Apply various upscaling filters to all textures including xBRZ and Waifu2x.
• And much much more! Refer to the built-in "Help" button for more information.

CTT-PS Useful Links

Compression Flags: Creating DDS textures with multiple compression types in a single run.
PNG Alpha Manipulation: Weird Alpha in PNG Textures - and an option to manipulate it!
Texture Watermarks: Names overlaying textures to identify their location in-game.
Material Textures: Creating materials that can be turned into material maps.
Material Maps: Creating material map textures for Dolphin Ishiiruka.
Combine/Split Images: Combining multiple images into a single image, or splitting an image.
OptiPNG/OxiPNG: Why it should only be used with this script for Dolphin textures.
Process Selected: The super secret option that nobody knows about.
Phyre Textures: Working with textures from The Legend of Heroes: Trails of Cold Steel I and II.
BC7 DDS Format: The beginning and my initial failure.
• Part 1: I know almost nothing.
• Part 2: Custom mipmaps for BC7!
• Part 3: BC7 becomes a reality.
Metroid Font Textures: Retexture thousands of fonts in minutes!
Custom CLI Programs: Import any program that accepts command line input into CTT-PS.
Split/Combine Color Channels: Split images into several images based on the RGBA channels, then put them back together.

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
03-25-2015, 10:51 PM
#2
masterotaku Offline
Picky 3D user
****
Posts: 552
Threads: 7
Joined: Aug 2013
Thanks for this. I wanted to see how converting textures to DDS affects loading times, stuttering, quality and VRAM usage.
CPU: Intel Core i5 4670k @ 4.4GHz
GPU: GAINWARD GeForce GTX 1080 Phoenix "GLH"
RAM: G.SKILL Ripjaws X DDR3 16GB 1600MHz CL7
OS: Windows 7 Ultimate x64
Find
Reply
03-26-2015, 02:19 AM (This post was last modified: 03-26-2015, 03:10 AM by Gamedominator06.)
#3
Gamedominator06 Offline
GP&B
***
Posts: 51
Threads: 1
Joined: Apr 2014
I test converted some textures for Tales of Symphonia into DDS (testing the font to see if it improves the framerate) but it won't load up in the game. I tried isolating it and just loading the font textures and it still isn't working. Is there something I missed?

EDIT: Ignore this, just some pathing issues is all. I got it to work, but the textures are coming out with significantly reduced quality. Not sure if it's because of scaling or something else.

Spoiler: (Show Spoiler)
[Image: O5gy7Ux.jpg]
Find
Reply
03-26-2015, 03:22 AM
#4
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,636
Threads: 39
Joined: Oct 2009
Nice, this might be used by all custom texture pack creators before releasing their pack.
Thanks for the hard work, BigHead!

Just one thing: Aren't internal mipmaps a problem when using Dolphin master?
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
Reply
03-26-2015, 04:52 AM
#5
Bighead Offline
Oversized Cranium
*******
Posts: 1,970
Threads: 15
Joined: Aug 2011
(03-26-2015, 02:19 AM)Gamedominator06 Wrote: EDIT: Ignore this, just some pathing issues is all. I got it to work, but the textures are coming out with significantly reduced quality. Not sure if it's because of scaling or something else.
This pack seems to use very small scaling values which is not something I took into consideration. An option to disable DDS auto-correct may help this. I'll look into it later tonight.

(03-26-2015, 03:22 AM)StripTheSoul Wrote: Just one thing: Aren't internal mipmaps a problem when using Dolphin master?
I don't think so as long as external maps are provided too. I tested the generated DDS textures for BrunoFBK's environments in both master and ishiiruka and the dynamic mipmaps were showing up. I think master just ignores the lower levels.
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
03-26-2015, 04:57 AM (This post was last modified: 03-26-2015, 04:58 AM by frozenwings.)
#6
frozenwings Offline
We choose to fight!
*******
Posts: 1,199
Threads: 2
Joined: May 2013
Edit: Lol, Bighead beat me to the punch. Oh well.

(03-26-2015, 02:19 AM)Gamedominator06 Wrote: EDIT: Ignore this, just some pathing issues is all. I got it to work, but the textures are coming out with significantly reduced quality. Not sure if it's because of scaling or something else.

It's because those retextures are very small. For example, the default sizes for the font are 24x24, and the retextures are 32x32. That's a 1.5x increase in resolution, where you normally want a 3-4x increase to maintain good quality at modern resolutions and to maintain whole integer scaling. As a result of this slight increase most of the scaling in the textures in the pack are bad (you would want the font textures to be 48x48 at least) and since theres is only a small increase in size, they are scaled to the closest non-broken scaling. Which just so happens to be the default size of the texture in many cases :p. Besides scaling, the DDS conversion also scales the texture so that it isn't broken in terms of DDS.

Basically, I don't think the tool was created with such a small scaling increase in mind. To get it to work with this pack, Bighead will have to make a couple changes and/or an option for converting to DDS without scaling. Mind you, the textures will still have bad aspect ratios unless he can figure out a way to only upscale instead of downscale. I've tested his script a ton while he's been working on it, so I'm pretty familiar with how it works. But obviously he would know best at what is possible and what isn't.



(03-26-2015, 03:22 AM)StripTheSoul Wrote: Just one thing: Aren't internal mipmaps a problem when using Dolphin master?

This is probably the thing that came up most while I was testing out Bighead's many (:p) incarnations of this script. Basically, there isn't really a problem as much as there are extra textures based on which Dolphin you're using. Ishiiruka should use the internal mipmaps and ignore external mipmaps, and master should ignore internal mipmaps and use external. I'm not sure if Bighead and I ever came to a conclusion about the excess files, but it's his script. From my understanding, this setup is future-proofing the tool against the possibility of master utilizing internal mipmaps. The end result is that the main mipmap file is around 25-30% larger in most cases due to the internal mipmap, and Dolphin should take care of the rest.

I'm not sure if it's possible (or efficient) to include an option to decide between internal or external mipmaps.
Xenoblade HD Texture Pack / Skies of Arcadia HD Texture Pack
Find
Reply
03-26-2015, 05:14 AM (This post was last modified: 03-26-2015, 05:14 AM by Gamedominator06.)
#7
Gamedominator06 Offline
GP&B
***
Posts: 51
Threads: 1
Joined: Apr 2014
Thanks for the responses. Part of my interest in trying DDS exclusively with the font is due to a game/emulation-specific issue that causes a ton of slowdown when using the font textures for Tales of Symphonia (at least when there's a lot of them). This also the reason why those textures are as small as they are. I'm curious to see if it can be improved to some degree before considering code-based problems. I figure the aspect ratio would play a part into it, but funny enough they were upscaled to 48x48 instead of downscaled (but it clearly wasn't friendly on the quality). I'd like to fix it but I don't currently have the means to do so and the thread isn't very active either. If disabling DDS auto-correct helps to a good degree, that would be excellent.
Find
Reply
03-26-2015, 05:34 AM (This post was last modified: 03-26-2015, 05:35 AM by frozenwings.)
#8
frozenwings Offline
We choose to fight!
*******
Posts: 1,199
Threads: 2
Joined: May 2013
Interesting. I ran the conversion tool on the pack and it converted the fonts from 32x32 back to 24x24 (when converting PNG to DDS)

You can actually adjust the scaling by editing the tool, but DDS still converts them down in some cases. For example the controllers end up at 48x48 instead of 72x72.
Xenoblade HD Texture Pack / Skies of Arcadia HD Texture Pack
Find
Reply
03-26-2015, 06:06 AM
#9
Gamedominator06 Offline
GP&B
***
Posts: 51
Threads: 1
Joined: Apr 2014
I was only able to view the converted images through ImageMagick (only tool I have on hand for that format) and I couldn't really find the dimensions that easily. I could be wrong and it was downscaling in the first place. Either way, the results aren't desirable and it may just be a core issue with the modified textures.

And that's curious. You're talking about the button textures right? They're at 64x64 in the pack.
Find
Reply
03-26-2015, 11:41 AM (This post was last modified: 03-26-2015, 11:49 AM by frozenwings.)
#10
frozenwings Offline
We choose to fight!
*******
Posts: 1,199
Threads: 2
Joined: May 2013
The controller buttons are 64x64 in the pack, however the base textures are 24x24. That ends up being like a 2.66x scaling, and Dolphin works a lot better with whole integers. So ideally, we'd bump it up to 3x because 2x would lose quality. The texture tool is made with this in mind, and the repair function automatically adjusts the scaling of the textures to be whole. Basically, 64x64 is not a valid retexture size of 24x24, we would want 72x72.

Actually messing around with the tool, I was able to repair the textures to proper scaling and then in a (separate process) convert them to DDS without any funky scaling. Scaling the textures actually fixed some of the weird white glow effect outside of the text borders (a result of improper scaling, probably), you can see it in the compare shot below (check out the top of the e and o textures in the "PNG - Default Retextures" vs. "PNG - Scaling Fix"). But converting to DDS from the PNG actually does cause a little bit of quality loss in the text, even when the textures are all the same dimensions. I don't know why this happens, possibly because they are too small. I did not notice this loss in the Xenoblade pack text. It looks like the portraits and other textures are not nearly as effected as the text.

Spoiler: (Show Spoiler)
[Image: wIAopx.png]

Anyway, if you're interested, here are the packs I used. IMO the rescaled PNG textures look a lot better. I manually converted the pound/hashtag texture since it doesn't use the new hash and the tool can't recognize it.

Download

Edit: Also, this screenshots were on my 1440p monitor so they might actually look better at 1080p.
Xenoblade HD Texture Pack / Skies of Arcadia HD Texture Pack
Find
Reply
« Next Oldest | Next Newest »
Pages (115): 1 2 3 4 5 ... 115 Next »
Jump to page 


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


Users browsing this thread: 3 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode