Custom Texture Tool PS v52.5
|
Bighead, how about to add or make accessible "PNG ALpha Pixel Manipulation" in "Apply Upscaling filter to All textures" tab, if selected output format DDS and input format also DDS?
(!) Apply PNG Alpha Pixel Manipulation to all upscaled(+optional before upscaling) PNG in CTT-PS_Temp (simple check: if base input texure with alpha or name contains _n.dds and Pixel Manipulation is enabled) , befor it convert to final DDS. Why? - This is only one way to use *Passthrough* option DDS format (to save original input dds format, like other L8, ARGB8 and etc. and original MIP level count for textures in pack) and also apply "PNG ALpha Pixel Manipulation" without manual converting to PNG. (lose format of original textures) Most textures with normals needs transparency correction after ESR\Waifu\SFT upscale (black pixels noise) P/s. Idea: Add to Custom Texture Tool PS scanning function that get dds format for each input source textures and rename it to... Example: idbrick01.dds --> idbrick01___#PS_SCRIPT#_FRM_ARGB8_MIP6_NOALPHA.dds And use it then convert to source dds after any manipulation with format (dds->png-->dds and etc.) Option like : STRICT DDS FORMAT MODE\GET SOURCE DDS FORMAT FROM NAME PREFIX (and delete from name ___#PS_SCRIPT#_FRM_ARGB8_MIP6_NOALPHA after converting to DDS) How about this? (Also function to force delete #PS_SCRIPT# prefix for all textures)
Runtime error:
https://youtu.be/1xWSIxhvF3I Textures causing error: https://dropfiles.ru/download/ec9764c70c...f4ac4.html How about to add button to open Output path folder? 06-24-2020, 11:59 AM
I'll see about adding some of this stuff and fixing the mentioned issues. But some suggestions are too over the top, this is way too much stuff to take on all at once, and I don't have the interest to invest multiple hours into this anymore. So while in the long run I (could) end up implementing none-all suggestions, there is no time frame of if/when it would be done.
(06-17-2020, 02:18 AM)Kuzja Wrote: (Maybe it will helpful) if convert this texture to B8G8R8A8_UNORM and after to BC3_UNORM error is gone I noticed it's a BC5 texture. I haven't really worked with this format before so I'll have to experiment with it. (06-17-2020, 08:36 AM)Kuzja Wrote: Bighead, how about to add or make accessible "PNG ALpha Pixel Manipulation" in "Apply Upscaling filter to All textures" tab, if selected output format DDS and input format also DDS? This isn't possible, there is a reason why I made it "PNG" only. This is all done using .NET native image support, which does not support DDS formats. The methodology here is to loop through all pixels, so DDS images need to be decompressed. There is no getting around converting it to PNG first. (06-17-2020, 08:36 AM)Kuzja Wrote: P/s. Idea: Big maybe. I already have support for flags when converting/rescaling to DDS +automatic flag removal, but the flags must be applied manually. I can probably make something to automatically add the flags to texture names and create a flag for alpha, but I have no desire of making flags work beyond the convert/rescale options. (06-17-2020, 05:10 PM)Kuzja Wrote: How about to add button to open Output path folder? This already exists for both input and output, its the folder icon next to [...] button. 07-22-2020, 02:09 PM
the latest version of compresionatorCLI doesn't work with the script im guessing thats why you directed us to a pecific one? the latest one just spits out 128kb blanks of DDSs
07-23-2020, 05:21 AM
That is correct. At least three versions after 3.0.3707 would just simply not work with PowerShell command line. I haven't tried any of the newer versions since then. I may give a more up-to-date version a shot eventually if I ever get back into working on this.
07-23-2020, 07:01 AM
(07-23-2020, 05:21 AM)Bighead Wrote: That is correct. At least three versions after 3.0.3707 would just simply not work with PowerShell command line. I haven't tried any of the newer versions since then. I may give a more up-to-date version a shot eventually if I ever get back into working on this. sounds good. the tool is very simple and i appreciate it because the other tools just seem to be a little over my head lol 08-17-2020, 07:39 AM
(This post was last modified: 08-17-2020, 10:45 AM by BlueSwordM.
Edit Reason: Clarifications
)
So, I have a question about this Powershell script.
Would it actually be possible to make per file multi-threading available? It would be quite interesting, since TextConv only uses 1 thread on my CPU, and because of that, it is quite slow. Being able to use all 16 threads would speed up conversion considerably. Would it also be possible to integrate ECT(Efficient Compression Tool) support into ECT? It's faster and more efficient than oxipng. Thanks in advanced for the response.
I don't really have a good answer as I don't really know if it would be worth it or not. I'd have to gain a little more knowledge and experiment a bit to see if it's possible and if it would be worth it. If I remember correctly (based on what I said here), both TexConv and Compressonator use the GPU to generate BC6/BC7 textures. The BC7 format would benefit the most from additional horsepower in the case of Dolphin textures, but if they are GPU bound, then adding more CPU threads wouldn't really help much. I do believe TexConv is much lighter than Compressonator, but it also creates lesser quality textures as Compressonator allows you to tweak the algorithm a bit to get better results. I would highly recommend using it over TexConv, the only reason to add it to the program stack is because Compressonator occasionally fails on some textures.
If performance can be gained, there is still some hurdles. PowerShell doesn't have true multi-threading support, but can simulate multiple threads using jobs. So "multi-threading" is most likely possible, the script is already using a sort of multi-threading to keep the GUI active during operations. In this case I'm not sure whether or not each job, or rather each running instance of TexConv, would be assigned to a unique CPU thread but I do believe it's possible to set the affinity. The only time I have tried this idea was when I wrote a simple bitmap encoder for a unique bitmap format used in Falcom's Crossbell "Trails" games, and splitting it up across multiple jobs did significantly increase performance. Although it did seem to drop off after about 4-6 threads, and it wasn't GPU bound as it didn't use it at all. It would also require some fundamental changes to how the script currently works. Files are processed in a loop one by one. When a program like TexConv is called, a "job" is started in a separate PS instance, while the main thread waits for it to finish and actively refreshes the GUI. I would probably need to build a list of files before processing them so they can be processed simultaneously, meanwhile trying to keep everything in sync. There is also a concern that if GPU usage is the bottleneck, then running like.. 10 threads in a perfect world means each one is only getting 10% of the GPU's workload. So the short answer is, it's a big maybe. I've been pretty lethargic with my projects lately, I've been taking it easy and trying to catch up on my long backlist of games that I missed the past couple of years. 08-28-2020, 08:28 AM
I perfectly understand.
However, it seems that when I used Compressonator(with your tool), it didn't seem to actually use the GPU at all for some reason. I had an RX 580 GPU with the latest drivers at the time, so it did work correctly, but Compressnator was only stressing 1-2 threads on the CPU. And yes, I was using Compressonator. It is possible I wasn't getting any GPU acceleration since I didn't have a CUDA capable GPU, but that doesn't make much sense since Compressanator is an AMD tool. And it's a shame the most recent version of Compressonator isn't actually supported. The latest version of the tool is extremely well multi-threaded, and uses SIMD instructions, which makes it super fast at similar quality settings. It can also use the GPU now, which is really nice. Sadly, as you've said before, the latest version of Compressonator still doesn't work with the script. If that was the case, I wouldn't have any problems. Anyway, I still managed to compress using BC7 with Compressonator. Just took a while. Last question: why are some BC7 textures larger than the original PNG ones? It seems really strange to be honest. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 5 Guest(s)