• 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 ... 103 104 105 106 107 ... 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
03-05-2021, 01:34 AM
#1,041
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
Hmm it's this again, I'll get it right eventually. Tongue This check is relatively new (which replaces an older one); its purpose is to prevent a potential infinite loop. But looking at my current code, if you are not using the "Tools Master Path" then it will trigger this error every time. That is definitely not intended so I'm going to have to rethink this and fix it. It's been so long now that I can't even fully remember the conditions that create the infinite loop, the only thing I can remember is that it had to do with the script being in the same path as the other tools.

If you want to try the current beta without waiting, then do a search for "CheckPathsInToolsMasterPath" and delete the line below.

[Image: sCsy7on.png]

Basically just wipe out everything on line 13224, which may or may not still line up with the current 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
03-06-2021, 02:56 AM
#1,042
brackenhawk Offline
Crafty
***
Posts: 52
Threads: 1
Joined: Mar 2018
(03-05-2021, 01:34 AM)Bighead Wrote: Hmm it's this again, I'll get it right eventually. Tongue This check is relatively new (which replaces an older one); its purpose is to prevent a potential infinite loop. But looking at my current code, if you are not using the "Tools Master Path" then it will trigger this error every time. That is definitely not intended so I'm going to have to rethink this and fix it. It's been so long now that I can't even fully remember the conditions that create the infinite loop, the only thing I can remember is that it had to do with the script being in the same path as the other tools.

If you want to try the current beta without waiting, then do a search for "CheckPathsInToolsMasterPath" and delete the line below.

[Image: sCsy7on.png]

Basically just wipe out everything on line 13224, which may or may not still line up with the current version.

Cheers for checking that out, I thought for sure I'd messed up somewhere and figured it wouldn't hurt to ask!

I assume I can also just install all the tools and assign a path like in the advanced setup, I only use one or two of them so didn't think to try it.
Find
Reply
03-06-2021, 09:22 AM
#1,043
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
While that would probably work, you shouldn't have to work around my mistakes. This path is supposed to be optional so I'd rather fix it properly:
https://www.mediafire.com/file/0ey8sbmp6b7e910/Custom_Texture_Tool_PS_v47.0.b15.zip/file

The tools master path is mostly a means for those who don't want to do a manual setup and instead use the program pack. The checkbox can be checked and all tools are added automatically. I don't want to make using that path a requirement as there are cases such as yours where only a few tools are used and don't need everything it offers.
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-09-2021, 07:47 PM (This post was last modified: 03-09-2021, 08:14 PM by Bighead.)
#1,044
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
This beta adds the ability to configure options specific to each "DDS Tool".
https://www.mediafire.com/file/87wgxdt78c19yb9/Custom_Texture_Tool_PS_v47.0.b16.zip/file

This is something I've been wanting to do for awhile, but I didn't know how I was going to squeeze it into the current GUI. I was also kind of waiting for the Compressonator "-Performance" bug to be fixed but who knows when the next release will be (more on that later). That bug is one of the major factors behind what's been holding back an actual "release" of v47.0 and why I keep incrementally updating it in betas. I plan on updating everything together when the time comes (such as the script, the programs pack, supporting scripts, etc).

Anyway, here is the new button that loads the options for the selected tool. I made it appear like the other options so it's intuitive enough and easy to find. It has taken the place of "BC7 Quality" which has been moved to Compressonator's options since it was exclusive to that program anyway.

Spoiler: (Show Spoiler)
[Image: 1NQzxLT.png]
Each tool has its own configuration window and exclusive set of options. ImageMagick doesn't really offer much in the way of configuring DDS output, but it shouldn't really be used to create textures anyway.

Spoiler: (Show Spoiler)
[Image: gf1bo78.png]
Finally, all the program options can also be configured from the "Options" menu on the "Misc" tab.

Spoiler: (Show Spoiler)
[Image: T3MH5WA.png]
Both Compressonator and TexConv have a unique set of options that can make them useful for specific tasks. I haven't tested them all so any feedback is appreciated.

Compressonator has the option to choose a graphics API to perform BC7 decompression which could speed things up. It's also possible to set the number of decoding threads up to 128 which are split across however many CPU cores you have. It also has a built in method to swap the red and blue channels, which could be useful when converting BGRA to RGBA or whatever. TexConv's options are little less exciting. The compression mode as far as I can tell does not affect the quality. Alpha Compositing allows forcing straight or premultiplied alpha which is something Compressonator lacks. There are also options to flip the texture (useful if swizzled) and the force sRGB colorspace option was moved to here since it only works with TexConv anyway (I'll have to fix the SRGB > sRGB typo next beta). ImageMagick doesn't offer much for DDS textures, you can enable "alpha weighting" which I'm not even 100% sure what it does but I included it. It shouldn't be used to create textures anyway as Compressonator and TexConv create higher quality DDS images.

You may notice in Compressonator's configuration the Enable BC7 -Performance Command option. If this is enabled in more recent versions of Compressonator, the script will fail to create textures because of this bug and fall back to TexConv. The last known working version is v3.0.3707 which is what I still include in the programs pack and the one I link to on the first post. I am really hoping that the fix to this bug gets included in the next version. The bug is supposedly fixed in the Github repo, so it's possible to build it and test it out. I really want the fix to be in an official release so it doesn't add confusion by suggesting a custom build, but I will probably try to build it myself in the near future if it doesn't get updated anytime soon.

As for other changes:
- Disable GPU now has a unique variable for each program that can disable it: TexConv, Waifu2x, and ESRGAN/SFTGAN. This means that toggling it for one program no longer toggles it for all of them.
- The Disable GPU option was removed from the "Additional Options" found in the Convert/Rescale/Resize operations as that was a generic location that toggled it for everything.
- Fix broken DDS images when forcing DX10 header and the output texture doesn't match the user selected format. This especially affected ImageMagick as it can create BC1 (DXT1) images when the user set the output as BC3 (DXT5).
- Moved the DDS options around a bit. The "Fallback" format is now found under the primary format and "Flag Removal" to the right. The sRGB toggle in "Advanced" mode was moved to TexConv options.
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-12-2021, 11:46 PM
#1,045
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
I've been asked to add support for more PNG optimizing programs in the past, so it's been on my to-do list for awhile. Moving along, this update adds two more PNG optimizers, and the full list is now: OptiPNG, OxiPNG, Pingo, and Efficient Compression Tool.
https://www.mediafire.com/file/uykkaqqgfb8miet/Custom_Texture_Tool_PS_v47.0.b17.zip/file

A number of options have been added but not all work for all tools. Only one tool can be used at a time and they can be easily swapped out using the [...] button.
Spoiler: (Show Spoiler)
[Image: mJzbJxb.png]
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-13-2021, 08:17 AM
#1,046
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
This version fixes two significant blunders:
https://www.mediafire.com/file/wf50rkj1upcl933/Custom_Texture_Tool_PS_v47.0.b18.zip/file

First, I broke BC7 textures about two betas back but they are now fixed. This happened because I modified how the header is generated. I changed it so the DDS block compression (BC) type is read from the DDS file after it is created, instead of just blindly using the type set by the user. This fixed ImageMagick creating bad DX10 BC1 textures. Since the FourCC flag can hold the image format for DX9 textures (DXT1, DXT5), I was just sending that... but I forgot to create a condition for BC7 images. They have DX10 set as the FourCC and use a separate byte for the BC type. So BC7 textures were being created with "DX10" BC type which doesn't exist.

[Image: Liv2vym.png]

The second blunder was that I forgot to include the compression type for Compressonator. This can provide a significant speed up when creating BC7 textures. I'm not exactly sure what some of the options mean, but I do know selecting GPU is a significant speed up. I'll have to dig deeper into the meaning of some of the other options later (HPC, OCL, DXC). I'm assuming OCL is OpenCL, DXC is probably referring to DirectX, and HPC maybe high performance computing?
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-17-2021, 09:43 AM (This post was last modified: 09-17-2021, 05:04 AM by Bighead.)
#1,047
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
This update adds the ability to import just about any program that accepts command line input and run it through the CTT-PS master loop.
https://www.mediafire.com/file/1m333b74tjcl0ep/Custom_Texture_Tool_PS_v47.0.b19.zip/file

Over time I've had people request various programs be added to the script, so I figured why not make it possible for anyone to add just about any program. Enter the new "Expert Mode" operation Run Custom CLI Executable With CTT-PS that allows importing and running any program through CTT-PS that accepts input via the command line. This method most likely has drawbacks and some things may not be possible without additional code, but I do hope that much can be accomplished.

[Image: 5u4hqi9.png]
In this example I'll use ImageMagick (which support is already built into the script but it goes to show it can be used this way too).

Executables: This is where programs can be imported with the [+] button or removed with the [-] button.
Input Extensions: Determines which file types are processed. Think of it is a filter to single out which files you want to run through the program.
Output Extension: Should be set to what the expected output extension will be. This does not guarantee that the output will be created with this extension! The value here is used in some variables that will be explained more later.
Output Folder: Used to name the folder that will be created in the master "Output Path" that contains the processed files.
Command List: This is where a list of commands to send the program can be assembled.

Commands each need to be entered onto a new line. Multiple part commands must have each part entered onto a new line. For example if part of the command is something like "-setsize 200" both "-setsize" and "200" should be entered as new commands. A good rule to follow is wherever there is a space in the full command, create a new command in the list.

Information entered into the operation's configuration panel will be stored in its own ini file named CLIExecutables.ini found within the "CTT-PS Data Folder".

There is a number of variables that can be accessed to get the paths and sizes of the input/output files. These are critical to getting a CLI program to work as the path to the input file will be needed, as well as the path to the output folder or the output file. Variables that can be used in the commands can be found below.

Variable List: (Show Spoiler)
Example Input: C:\Custom Texture Tool PS\Example.png
Example Output: C:\Custom Texture Tool PS\~CTT_Generated\CustomExecutable\Example.png

$InputBase: Base name without extension. (Example)
$InputName: Base name with the extension. (Example.png)
$InputPath: Path to file without filename. (C:\Custom Texture Tool PS\)
$InputFile: Path to file with the filename. (C:\Custom Texture Tool PS\Example.png)
$OutputBase: Base name without extension. (Example)
$OutputName: Base name with the extension. (Example.png)
$OutputPath: Path to file without filename. (C:\Custom Texture Tool PS\~CTT_Generated\CustomExecutable\)
$OutputFile: Path to file with the filename. (C:\Custom Texture Tool PS\~CTT_Generated\CustomExecutable\Example.png)
$ImageWidth: If an image, the input width. (1000)
$ImageHeight: If an image, the input height. (1000)
$ImageDimensions: Dimensions as width x height. (1000x1000)

Multiplied versions of the dimensions can also be used such as $ImageHeightx2 to get 2 times the size, or even $ImageHeightx6 to get 6 times the size. This works up to x8 and also works on the $ImageDimensions variable.

The reason so many variations exist is because programs tend to want different types of information. Some of these are pretty redundant and will probably be removed later. Comparing ImageMagick and TexConv, the output for ImageMagick wants the full output path to the filename with the extension ($OutputFile), and the output for TexConv wants just the output path without the filename ($OutputPath).
Remember the Output Extension field? This is where the $OutputName and $OutputFile variables get the output extension from. So if the output extension is incorrect, the variables that store the path to filename will be incorrect. Or in the case of ImageMagick, it would create the wrong file type completely!

Going back to the ImageMagick example, suppose we wanted to create a command to double the dimensions of processed images. The input file path is needed, the -resize command, the new dimensions, and the output file path. The command for the output filename determines the extension that is created, so setting the output extension actually forces the correct extension in this case. The first file that is process is named "TestFile.png" and it is 1000x1000 pixels.

This is the full command that will be used to achieve this:
$InputFile -resize $ImageDimensionsx2! $OutputFile

Using my current files and paths, this roughly translates into:
C:\Custom Texture Tool PS\TestFile.png -resize 2000x2000! C:\Custom Texture Tool PS\~CTT_Generated\CustomMagick\TestFile.png

Breaking down the command:
Code:
$InputFile
-resize
$ImageDimensionsx2!
$OutputFile

Now to look at another image program, TexConv.
[Image: tubrp4S.png]

This makes a great contrast comparison as it uses completely different commands. The file extension is actually set through the "-ft" command, and the program wants the output path and not the full path to the file. Also, instead of the full dimensions, width and height are set independently.

The full command to match the output of the ImageMagick example:
$InputFile -ft png -w $ImageWidthx2 -h $ImageHeightx2 -o $OutputPath

Using my current files and paths, this roughly translates into:
C:\Custom Texture Tool PS\TestFile.png -ft png -w 2000 -h 2000 -o C:\Custom Texture Tool PS\~CTT_Generated\CustomTexConv\

Breaking down the command:
Code:
$InputFile
-ft
png
-w
$ImageWidthx2
-h
$ImageHeightx2
-o
$OutputPath

So hopefully that gives a basic idea of how all this can work. Whether or not it will actually be useful I can't know for sure until people try it out. It might be perfect as it is, or it might be too limiting in its current state.
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-19-2021, 05:30 AM
#1,048
drstupid
Unregistered
 
Hi! Thanks for making the CTT script, it's amazing and saves a lot of time. I think I found a bug, I am using the script to convert some old texture packs to resource packs for personal use and easier management. So your tool has been very nice, it's much faster.

The bug is, when formatting the logo, I choose "Fit to 256x256 Resolution," and for the logo I've been dragging an image in from the web. That works fine and it resizes the image but inside the texture pack zip it names the logo "logo-fit.png" and it seems like Dolphin only recognizes a file named logo.png as the logo. (If you edit the zip and rename the file, the logo appears.)

Thanks!
Reply
03-19-2021, 07:38 AM (This post was last modified: 03-19-2021, 07:48 AM by Bighead.)
#1,049
Bighead Offline
Oversized Cranium
*******
Posts: 1,985
Threads: 15
Joined: Aug 2011
Thanks for the report, that is definitely an issue. I recently reworked the logo stuff so that it doesn't have to be recreated every time you change the "formatting" option (for example, setting no scaling > fit > no scaling would regenerate the no scaling version). Now it only generates each option once and keeps the result until the pack is created. I guess I forgot to rename whichever version it uses. This is a fairly serious issue so I'll have it fixed soon.

Edit: Should hopefully be fixed.
https://www.mediafire.com/file/603hv7svjthk5qf/Custom_Texture_Tool_PS_v47.0.b20.zip/file
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-23-2021, 04:14 AM
#1,050
Danny678
Unregistered
 
Hey Bighead, can you assist me with something?
Why does the tool not convert the Phyre files to PNG? Am I missing something? This is for Hajimari no Kiseki.


Attached Files Thumbnail(s)
   
Reply
« Next Oldest | Next Newest »
Pages (117): « Previous 1 ... 103 104 105 106 107 ... 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