MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

HQ Texture Converter - version 2.5 2/21/2021

by CmarNYC Posted 23rd Nov 2018 at 8:35 PM - Updated 21st Feb 2021 at 2:35 PM by CmarNYC : New version upload
221 Comments / replies (Who?) - 19 Feedback Posts
This is a featured upload! It showcases the best talent and creativity available on MTS and in the community.
Converting a pile of CC to be compatible with the HQ Mod can be quite a chore. This tool does it for you.

What it does:

You can select either one package or input and output folders. If you select one package, it will be converted and you'll be prompted to save it with a new name. If you select folders, all packages in the input folder will be converted and saved in the output folder with new names. A status line at the bottom of the window will let you know what it's doing.



Conversion:
  • RLE2 textures (diffuse, shadow, skin color, and skin definition) are resized to 2048x4096
  • LRLE textures (diffuse and skin color) are resized to 2048x4096
  • RLE2 textures disguised as LRLE are converted and resized to true LRLE 2048x4096
  • RLES textures (specular) are resized to 1024x2048
  • DDS CAS skin color files are resized to 2048x4096

However, these are just the defaults and you can select the output dimensions for yourself. Will also convert from HQ dimensions to standard if needed.

Pet textures are automatically resized correctly.

Requires Windows and .NET 4.7. If you're on Windows 10 you probably already have it; if you're using Windows 7 or 8.1 you can install it if necessary. Requires 64-bit. (If anyone needs a 32-bit version I'll provide it, but it's likely you'll get memory errors when processing large packages.)

How to use:

Use the top button to select a package to process one at a time. Select input and output folders to process every package in the folder. As of version 2.3 it will also optionally convert subfolders in the input folder, creating corresponding subfolders in the output folder if necessary.

Texture output options:
  • Choice of which conversion to do and the target texture dimensions should be self-explanatory.
  • Keep original size - when converting to HQ, you can choose to keep any textures that are larger than needed as is.
  • Sharpen rle2 and lrle textures - using this option will sharpen the main (diffuse) textures of clothing, hair, accessories, skins, etc. You can choose the sharpening strength. Sharpening will slow down processing significantly. Strength of sharpening makes no difference in speed. Sharpening may or may not be useful when working with LRLE textures, you'll have to experiment.
  • Don't sharpen grayscale - starting in version 2.2 the tool uses the CASP in CC packages to identify the shadow textures, so this option should normally be left unchecked. It may be useful if converting packages that contain clothing/hair/accessory textures but no CASPs as when converting EA game packages. It may not. If checked, the tool will attempt to identify shadow textures and not sharpen them. The benefit is that sharpening may cause banding in some shadows which might be visible. The drawback is that any black and white or gray clothing and skin details may not be sharpened.
  • Use existing mipmaps - starting in version 2.2, if this option is checked the tool will keep existing mipmaps if possible. Leaving this option checked will be slightly faster and retain the quality of original textures in the mipmaps. In cases where sharpening has made a big improvement in a texture you may want to try unchecking it and generating new mipmaps.

With sharpening enabled, conversion will be slow. A package of 1000 rle2 and/or lrle textures could take around 2 hours or more. Without sharpening it's significantly faster. The program will prevent your computer from sleeping during conversion, but your monitor will still time out and sleep and you may see the monitor blacking out for a couple of seconds at a time even while you're using it.

Sharpening comparison:



Notes/Warnings:

The tool should only be run on packages that include only CAS parts (clothing, hair, accessories, makeup, skins, etc.). Running it on packages containing other CC such as objects may result in textures of the wrong size and/or wrong format and could cause your game to crash or not start.

This should go without saying, but you should keep your original packages in case something goes wrong.

Please report problems, questions, and reasonable requests in the comments.

Windows only, sorry. If anyone wants to convert it for Mac, you have my permission.

Version 2.5:
Update for another new version of CASP.
Added support for LRLE textures. This needs more testing; please report problems.

Version 2.4:

Update for the new version of the CASP.
I'm doing only a 64-bit version this time. If anyone needs a 32-bit version I'll provide it, but I doubt there's much if any need.

Version 2.3:

Fixes: Corrects an error affecting memory that was causing random crashes with no error message or an access violation.

New features:
  • During batch conversion, optionally convert subfolders of packages under the input folder. Subfolders with the same names will be created in the output folder if they don't already exist.
  • If any packages fail to convert during batch conversion due to unreadable textures or whatever, the tool will continue to run and display a list of packages that could not be converted when it's finished.

Many thanks to claudiasharon for working with me about the crashing problem.

Version 2.2:

Fixes: Fixes shadow lines again appearing when converting CC on some systems.

New features: Optionally use existing mipmaps.

Many thanks to LunaLechuza for helpful suggestions and testing.

Version 2.0:

Fixes: Corrected the lines on shadow textures and the dark lines around the edges of some diffuse textures.

New features: 64-bit version, sharpening, keeping larger-than-needed textures is now optional.

Additional Credits:

With thanks to Iconic for requesting this tool!

The HQ Mod is here: http://alf-si.tumblr.com/HQ_ts4_English

Image and package handling done with the s4pi library: https://github.com/s4ptacle/Sims4Tools/tree/develop

Folder selection uses Ookii.Dialogs: http://www.ookii.org/software/dialogs/
Tags: #TS4, #HQ, #Mod, #texture, #converter, #resize

Operating System: Windows
Utility Type: CC Editors
Plugin Type: Not Applicable

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 4
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
TS4HQConverterSourceV2.5.0.0.zip | Source files, not needed to use the tool

Size: 146.0 KB · Downloads: 3,032 · 21st Feb 2021
146.0 KB 3,032 21st Feb 2021
TS4HQConverter_2_5_0_0.zip | Extract folder and run TS4HQConverter.exe

Size: 356.4 KB · Downloads: 9,707 · 21st Feb 2021
356.4 KB 9,707 21st Feb 2021
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:
1. Download: Click the File tab to see the download link. Click the link to save the .rar or .zip file(s) to your computer.
2. Extract: Use WinRAR (Windows) to extract the file(s) from the .rar or .zip file(s).
3. Cut and paste the file(s) into your Mods folder
  • Windows XP: Documents and Settings\(Current User Account)\My Documents\Electronic Arts\The Sims 4\Mods\
  • Windows Vista/7/8/8.1: Users\(Current User Account)\Documents\Electronic Arts\The Sims 4\Mods\
Need more information?
  • Anyone can use both .rar and .zip files easily! On Windows, use WinRAR.
  • If you don't have a Mods folder, just make one.
 
221 Comments / Replies (Who?) - 181 Feedback Posts, 21 Thanks Posts
Thanks are currently OFF: Show Thanks Posts for this thread
Page 2 of 9
Test Subject
#26 Old 25th Nov 2018 at 1:51 PM
Quote:
Originally Posted by CmarNYC
No problem! It also won't size down anything that's bigger than needed (in HQ mode). If getting everything into the standard sizes is preferable I can make that optional.

Ohh! So if for example a specular map has the size of 2048x4096 (which is too big for HQ as 1024x2048 is already double sized for specular maps) then it will remain in that size and it won't be scaled down to the standard HQ size? That's interesting. An optional option to get them in standard sizes would be a nice addition! But only if that's not too much of extra work Atm I'm already grateful for how convenient this tool is
Test Subject
#27 Old 25th Nov 2018 at 1:53 PM
Quote:
Originally Posted by dobro
I have the same thing, it happened when we manualy converted shadow map in png instead of dds(((

Ah so that's what's happening! Does that mean if dds gets saved as dds again then it should prevent the black lines from appearing? I haven't even tried this manually tbh. I've always converted cc textures from dds to png
Ms. Byte
Original Poster
#28 Old 25th Nov 2018 at 5:42 PM
It looks like processing these large resized images and creating new mipmaps is genuinely difficult for computer memory management. The solution might be more efficient code although so far my efforts seem to have made things worse. Or maybe going to a higher .NET version which would leave out any OS lower than I think Win 7. Or both. Still working on it!

Quote:
Originally Posted by Arabelle_Amara
Hi Cmar! This is an amazing tool!

I, too, received the error, but it was after 724 images (out of 1387). I do not know if this extra information is helpful or not. I will continue working on other folders, and see if I can find any new information regarding it.


Any information may be helpful, thanks!

Quote:
Originally Posted by Tiffany A
This is a really great tool! But sometimes I run into a problem where when I convert a piece of cc that has its own shadow texture, in game there will be black lines on or around that piece of cc. Is there any way for this issue to be fixed? Other than that, I'm not having any problems and the tool runs very, very well.


I'm not seeing this happening with shadow textures. Could you upload the original and converted packages? Are you sure this tool caused it, since I see converting to png and back causes it?

Quote:
Originally Posted by hbcublackgirl
I got the error message too and I narrowed it down to which cc file specifically caused it for me.
Error Message:
Link to CC that caused it: http://bit.ly/2DVjxy4


Thanks for the report! My browser thinks the download link is unsafe so I haven't tested with that package, but the memory errors seem to be causing some really bizarre, seemingly unrelated errors, so I'll revisit this if/when I get it to not run out of memory.

Quote:
Originally Posted by dobro
I have the same thing, it happened when we manualy converted shadow map in png instead of dds(((


Thanks, that's helpful!

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
25th Nov 2018 at 6:20 PM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#29 Old 25th Nov 2018 at 7:36 PM
Quote:
Originally Posted by Tiffany A
Here are the packages:

Non-HQ: http://www.mediafire.com/file/h73pb...t+Pants.package

HQ: http://www.mediafire.com/file/ccaj0...PantsHQ.package

I'm suspecting that it might be the converter causing it, because when I exported the shadow texture from the Non-HQ package as a .dds, manually resized it in photoshop and then imported it into the converted HQ package and tested it in game, it was fine after that.


I'm not seeing the problem in either package - please double-check.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
25th Nov 2018 at 9:14 PM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#30 Old 25th Nov 2018 at 11:39 PM
Quote:
Originally Posted by Tiffany A
I ran the original Non-HQ package through the converter again to check if the same thing happens and I'm still getting the same results. I remember when I tried manually converting cc a while ago the same thing would happen, but I never figured out why. Once I saw that a bunch of the cc I manually converted kept having the same black lines on them, it made me stop trying to convert my cc to HQ. I just thought that maybe I misread the tutorial and that it was something I managed to mess up all on my own, lol. I never realized that the resized shadow texture might have been the problem until I read Remus' post here: http://remussims.tumblr.com/post/16...onversion-to-hq

That's why when I ran into the same problem this time after using the HQ converter, I exported and checked the shadow of some of the 'black-lined' pieces of cc that I tested in-game, and they all had the same thin black lines around the texture. Do you think like @dobro said that it's the shadow textures being converted from .dds to .png that could be causing this?

Are you guys still having this problem?


I tried again and saw a line around the waist but not on the legs - I missed it before because my sim was wearing a longer top. When I tried another converted package there were lines on the hands and legs. The lines don't show up in CAS Tools preview or in the converted DDS image when I open it in GIMP, which makes me wonder if it's caused by using an HQ texture in a game not using the HQ mod. Are you testing in a non HQ game? Has anyone using the HQ mod seen this issue in converted clothing?

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
26th Nov 2018 at 1:07 AM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#31 Old 26th Nov 2018 at 5:29 AM
Thanks for the info. I'm not sure what I can do about it but I'll see.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
#32 Old 26th Nov 2018 at 6:27 AM
Quote:
Originally Posted by CmarNYC
I tried again and saw a line around the waist but not on the legs - I missed it before because my sim was wearing a longer top. When I tried another converted package there were lines on the hands and legs. The lines don't show up in CAS Tools preview or in the converted DDS image when I open it in GIMP, which makes me wonder if it's caused by using an HQ texture in a game not using the HQ mod. Are you testing in a non HQ game? Has anyone using the HQ mod seen this issue in converted clothing?


In DDS you can't see this black lines, but when you export shadow map in PNG and check it in PS you can see it.
I fixed it with eraser, but then figured it out that it appears because of the file format
Test Subject
#33 Old 26th Nov 2018 at 7:23 AM
Concerning the black lines, there was a topic posted about this very thing found in remussims tumblr page.

"ANONYMOUS
SENT A MESSAGE
first of all thanks for the CC conversion to HQ guide, but i'm running into a small problem on some hairs.. once converted to HQ compatible, they show in game but have a thin black line running around the forehead and face.. how do i correct this?

remus replies:
Save the shadow in .dds format or fill in the background with white colour before saving as .png! This should help it "
Ms. Byte
Original Poster
#34 Old 26th Nov 2018 at 8:11 AM Last edited by CmarNYC : 26th Nov 2018 at 8:26 AM.
Yeah, it can be fixed manually but the tool needs to do it automatically. Thanks for the tip about exporting to png, it gives me a much easier way to see the lines.

I found some info on this problem when scaling images (surprisingly little, though) tried an adjustment, and now the converted shorts have no black line in my non-HQ game. I'm going to have to set up HQ at some point for testing but in the meantime could you test in HQ, Tiffany A? If the lines are still there I'll try something more complicated. No rush, I'm still working on getting the thing to run on large packages without throwing memory errors.
Download - please read all instructions before downloading any files!
File Type: zip [Ahri] Sweet PantsHQ wrapmode.zip (337.9 KB, 8 downloads)

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
26th Nov 2018 at 8:55 AM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#35 Old 26th Nov 2018 at 3:29 PM
That was disappointing... Could you try this one? Might be a little better image quality too. I need a little time to set up to use HQ.
Download - please read all instructions before downloading any files!
File Type: zip [Ahri] Sweet PantsHQ alpha.zip (342.7 KB, 7 downloads)

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
#36 Old 26th Nov 2018 at 4:45 PM
Hey! The black lines become apparent when a shadow map is saved in PNG format. I guess it has something to do with transparency as not all shadow maps are causing this issue. Shadow maps without transparency (white background) don't cause any issues regardless of file type (png/dds). Sticking to dds format never caused black lines to happen so far.
Maybe that helps :x
Ms. Byte
Original Poster
#37 Old 26th Nov 2018 at 5:27 PM
RemusSirion, we're thinking alike.

I found that in s4pe if I disable the alpha I could see the line in the rgb if I look closely, and I read that there can be lines in a resized image caused by sharp edges in an alpha. Might be related to premultiplying - I'm pretty sure EA textures are not premultiplied while png is so possibly extracting a png has the same effect.

Anyway, for my attempt above I copied and blanked the alpha and resized the rgb channels and alpha separately, then put them back together, on the theory that this avoids alpha problems. It looks okay to me in s4pe but my eyes aren't the greatest. If this doesn't work I can try just stripping the alpha completely, since I think you're saying a fully opaque (white) alpha works.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
26th Nov 2018 at 9:13 PM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#38 Old 26th Nov 2018 at 10:31 PM
Well, I guess that's progress. Will try something else later.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
#39 Old 27th Nov 2018 at 1:20 AM
Quote:
Originally Posted by Tiffany A
This is a really great tool! But sometimes I run into a problem where when I convert a piece of cc that has its own shadow texture, in game there will be black lines on or around that piece of cc. Is there any way for this issue to be fixed? Other than that, I'm not having any problems and the tool runs very, very well.

Here's a picture of what I mean:




And here's a link to a pic of this cc's hq resized shadow texture with the black lines around it: https://i.imgur.com/fypPHYk.png

I ran the files again that had the texture glitch in non-HQ and that seemed to correct the issue on my end. It didn't work on the HQ
Ms. Byte
Original Poster
#40 Old 27th Nov 2018 at 8:16 AM
Quote:
Originally Posted by simsfunstuff
I ran the files again that had the texture glitch in non-HQ and that seemed to correct the issue on my end. It didn't work on the HQ


There's certainly no easy fix but I'm trying to find a solution.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Ms. Byte
Original Poster
#41 Old 28th Nov 2018 at 12:41 AM
Making progress on both problems!
Download - please read all instructions before downloading any files!
File Type: zip [Ahri] Sweet PantsHQ.zip (336.7 KB, 10 downloads)

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Test Subject
DELETED POST
28th Nov 2018 at 4:04 AM
This message has been deleted by Tiffany A.
Ms. Byte
Original Poster
#42 Old 28th Nov 2018 at 1:36 PM Last edited by CmarNYC : 28th Nov 2018 at 3:05 PM.
Unfortunately I also removed the actual shadow. So still needs some work.

Edit: Think I have the shadow problem resolved - seems to be caused by the green background that transparent parts of a texture have when converted to an image/png. Setting that to white before resizing got rid of the shadow lines. However, I'm still getting a thin black line around the texture itself which may show up depending on how the item is uv mapped.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Ms. Byte
Original Poster
#43 Old 1st Dec 2018 at 9:38 PM
@iconic @claudiasharon @LunaLechuza @Tiffany A @dobro @RemusSirion and everyone

Version 2 is uploaded which fixes the issue of dark lines on shadows and textures, includes sharpening, and if you can use the 64-bit version and have enough RAM (most computers that can run with HQ should qualify) should fix the memory errors. If you could test it and give feedback that would be great!

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Top Secret Researcher
#44 Old 1st Dec 2018 at 9:50 PM
Quote:
Originally Posted by CmarNYC
@iconic @claudiasharon @LunaLechuza @Tiffany A @dobro @RemusSirion and everyone

Version 2 is uploaded which fixes the issue of dark lines on shadows and textures, includes sharpening, and if you can use the 64-bit version and have enough RAM (most computers that can run with HQ should qualify) should fix the memory errors. If you could test it and give feedback that would be great!


Awesome, thanks so much!
Page 2 of 9