Jump to content

Resizing .package mod's textures?


Recommended Posts

Decided to nab Sims 3 and it's expansions, and boy-oh-boy am I hooked.

 

Now I'm looking to get a whole array of mods, but there are a few with massive file sizes; 20MB just for a pair of damn shoes. I'm going to go out on a limb, and assume the modder added 4096x4096 textures to it. The solution would be to resize them, but google's no help with this.

 

How do I extract textures from a package file, and then replace them? Resizing .tga/.dds is easy enough, a simple Photoshop macro can handle that. But I gotta figure out how to actually get them.

Link to comment

Decided to nab Sims 3 and it's expansions, and boy-oh-boy am I hooked.

 

Now I'm looking to get a whole array of mods, but there are a few with massive file sizes; 20MB just for a pair of damn shoes. I'm going to go out on a limb, and assume the modder added 4096x4096 textures to it. The solution would be to resize them, but google's no help with this.

 

How do I extract textures from a package file, and then replace them? Resizing .tga/.dds is easy enough, a simple Photoshop macro can handle that. But I gotta figure out how to actually get them.

You can use s3pe to open a package, the textures have the “_IMG” tag, it should look like this:

post-535934-0-81205700-1498537529_thumb.png

 

Select a folder or your desktop to save them and don’t change the name even if it looks weird (for the record, you can rename them but it adds a couple of extra steps to these instructions so just for simplicity leave them).

 

Photoshop requires a plugin to open DDS files, you can select the one by Nvidia or Intel. Paint.net has native support and also Gimp.

 

Once you scale them down save the images with transparency as DDS DXT5 and the rest as DDS DXT1.

 

Then just re-open the package in s3pe and drag your modified textures. A small window will appear:

post-535934-0-53782500-1498537975_thumb.png

Press “Import” and then “Crtl+S” or in the menubar select "File/Save”. You can also select “Save As” and use a different name while preserving the original, just don’t put both packages in your Mods folder at the same time, nothing catastrophic will happen if you do but the game will only load one package.

 

Now, there could be another reason for the 20mb size and that is the creator duplicated or triplicated some of the textures by accident. In that case you can delete them directly in s3pe the tricky part is to identify them. What shoes did you download?

Link to comment

 

-snip-

 

Now, there could be another reason for the 20mb size and that is the creator duplicated or triplicated some of the textures by accident. In that case you can delete them directly in s3pe the tricky part is to identify them. What shoes did you download?

 

 

Ooh, didn't know that S3pe could export textures. A user from Modthesims just told me of Texture Tweaker, that allows you to see the dimensions of a texture directly inside a .package mod. Might be useful.

 

The shoe mod: http://www.modthesims.info/download.php?t=470124

 

Looked inside it with Texture Tweaker, and it has 3 sets of duplicates, all 1024x1024:

 

1. Small red rectangle on a transparent background

2. Small greyscale shoe texture on a transparent background

3. Same small greyscale shoe texture on a solid black background, with the left half (undershoe part) removed

 

 

Edit: Another texture-related question; if a mod has separate packages (same texture) for various ages, is there a way to have S3PE point them to a single texture when merging? Or does that have to be done manually?

Link to comment

 

 

Ooh, didn't know that S3pe could export textures. A user from Modthesims just told me of Texture Tweaker, that allows you to see the dimensions of a texture directly inside a .package mod. Might be useful.

 

The shoe mod: http://www.modthesims.info/download.php?t=470124

 

Looked inside it with Texture Tweaker, and it has 3 sets of duplicates, all 1024x1024:

 

1. Small red rectangle on a transparent background

2. Small greyscale shoe texture on a transparent background

3. Same small greyscale shoe texture on a solid black background, with the left half (undershoe part) removed

 

 

Edit: Another texture-related question; if a mod has separate packages (same texture) for various ages, is there a way to have S3PE point them to a single texture when merging? Or does that have to be done manually?

 

 

s3pe also allows you to see the dimensions on the preview pane:

post-535934-0-99167100-1498633759_thumb.png

 

About your question: maybe, because the game has some “generic” textures that you can "link" without including them on your package, also I remember a pair of shoes by MrAntonieddu that included teen and young adult in the same file sadly the exact model escapes my memory but surely they’re still available on his website.

 

Link to comment

 

 

s3pe also allows you to see the dimensions on the preview pane:

attachicon.gifs3pe_preview.PNG

 

About your question: maybe, because the game has some “generic” textures that you can "link" without including them on your package, also I remember a pair of shoes by MrAntonieddu that included teen and young adult in the same file sadly the exact model escapes my memory but surely they’re still available on his website.

 

 

I looked inside the .GEOM objects, and I noticed that they all have three strings pointing to three different image files, which I presume are the diffuse, normal, and specular (or transparency?) maps. This gave me an idea on how to "optimize" these archives, especially merged ones.

 

S3PI offers a C# API for manipulating .package files, but it has no actual documentation, rendering it unusable. Which is a shame, as it is what S3PE was made from. Which means I have to use plain C#, and parse the exported files from S3PE as text.

Link to comment
I do not know how good the memory management of Sims 3 is, but also multiple existing textures should be no problem with the same path.

20 MB for shoes is already very much. My Bodymesh of Skyrim has 64 MB - however, my own High-Poly version.

How many MB's do the textures have in total?

DDS compression is actually very efficient - even if it is not very good. But for Sims 3 details completely ok.

 

Images  with 1024px as DXT5 + Mipmaps is about 1.3 MB.

As DXT1 + Mipmaps about 680 kb.

 

I think the 20 MB is another cause.

Link to comment

The large mods have the same set of textures repeated, with certain GEOM objects referencing one set of duplicates. This occurs when individual packages are made for each age (Teen, Young Adult, Adult, Elder), and are then merged through S3PE.

 

I looked at S3PI (Sims 3 C# library) in order to write a C# program that you just point to a .package and it'll sort it out, but there's absolutely no documentation, just a bunch of functions with meaningless auto-generated docs.

Link to comment
So, lack of memory management is the reason.

Well, then have fun.;)

By the way, 20 Mb is nothing, even in SIms 3.

Even 200 MB would not really be the reason for problems / lags.

 

Sims 3 is in this matter no different than any other software as well.

It is better to have large files and thus fewer files than many files and small files.

 

 

Link to comment

 

So, lack of memory management is the reason.
Well, then have fun. ;)
By the way, 20 Mb is nothing, even in SIms 3.
Even 200 MB would not really be the reason for problems / lags.
 
Sims 3 is in this matter no different than any other software as well.
It is better to have large files and thus fewer files than many files and small files.

 

 

It's not the filesize itself that concerns me. It's that there are a whole bunch of mods setup like that. Easily over 200 clothing mods I downloaded have these duplicate textures. Having files that are big due to poor modding practices is, ehm, not too good. Fewer and bigger is better for performance, but fewer and not as big is even better.

 

Hopefully the folks on Modthesims have some idea on how to work with S3PI.

Link to comment

Also TS3 has a very bad memory management system so if you have the chance to reduce what it loads to memory the better, specially if you have Windows 7 or below. On Windows 10 the OS does a really good job “taming” the game just be aware things could still go wrong and crashes may occur if you don’t optimize it.

 

Long story short: indeed there’s something bloating the size of the package, the textures are triplicated but that alone isn’t the culprit. Probably some of the tools or the steps Traelia followed back then had something to do.

 

I imported the package using TSR Workshop, in short is “s3pe with a gui” and it has its cons and pros but in general is another alternative to create stuff. After changing the name on the “Project Details” window (this is important to avoid a possible conflict with the original) I just re-imported the thumbnails because the program loves to forget about them… and save it as sims3package (you can convert it back to package using Sims3pack Multi Installer).

 

Final result? A 1.2mb file and yes, it works in-game as good as the original. So whatever was that bloated the package TSRW ignored it, that doesn’t mean this program is a fix-it-all because it has its own set of nuances but at least in this occasion it worked.

Link to comment

If you want to remove the duplicate textures - you may indeed have to clone the item with TSRW. But, the file bloat in question is just an uncompressed package file - TSRW package export generates uncompressed files. Exporting from TSRW as a sims3pack and then converting to package seems to be a more reliable way of avoiding the file bloat. In any case, it's very easy to fix.

  1. Open the package in S3PE
  2. CTRL+A to select all package contents
  3. Navigate to resource and if there is a dot aside the word "Compressed" the file is compressed, if not, select it. 
  4. Hit save.

90% of the time this is the reason for enormous package sizes (aside from using HQ textures). 

Link to comment

If you want to remove the duplicate textures - you may indeed have to clone the item with TSRW. But, the file bloat in question is just an uncompressed package file - TSRW package export generates uncompressed files. Exporting from TSRW as a sims3pack and then converting to package seems to be a more reliable way of avoiding the file bloat. In any case, it's very easy to fix.

  1. Open the package in S3PE
  2. CTRL+A to select all package contents
  3. Navigate to resource and if there is a dot aside the word "Compressed" the file is compressed, if not, select it. 
  4. Hit save.

90% of the time this is the reason for enormous package sizes (aside from using HQ textures). 

 

Forgot about TSRW making "fat" packages :P Thanks Kura!

Link to comment
  • 2 weeks later...

Sorry about not replying. Made a bunch of progress on making a follower framework for Fallout 4. Got tired of that, so now it's back to Sims 3.

 

 

The hell is being generated to cause the .package files to balloon up in size? Since it can be compressed pretty well, it's got to be duplicate data.

 

As for editing the textures, I noticed that the GEOM records in the .package files reference textures by some sort of hex string. If I could somehow access the data inside a .package through programming (C# I guess, since that's what S3PI uses), I'd just have to do md5 checks on the textures, and point the meshes to the "original" texture.

Link to comment

Understanding the Sims 3 isn't intuitive at all, so a lot of reading and discussion is necessary when it comes to even using mods.

 

Besides the memory management tricks, learning that the game file that holds sims3packs is never changed even if you 'delete' the cc from the launcher was a big one for me. Plus removing the cc from the folder which the launcher uses to install it helps. Combining packages in S3PE helps as well (I leave out files that will likely change over time like Nraas, KW, animations, etc.

 

I have almost no issues now, using win 10, disks only (no origin), all sims3 internet traffic is blocked, on an occulus ready system with OS on a SSD with a 2nd SSD holding the game files.

I have more CC than should be allowed (no 255 limit here!). Plus my saved games folder was approaching 100GB requiring me to delete 3 of 4 saves per 'city/town session'. I also run s3hq.exe on the 2096 texture setting plus some lighting mods.

 

I guess my point is the Sims3 is a real bitch when it comes to playing nice on anything shy of a modern gaming rig regardless of file prep and maintenance.

Link to comment

Sorry about not replying. Made a bunch of progress on making a follower framework for Fallout 4. Got tired of that, so now it's back to Sims 3.

 

 

The hell is being generated to cause the .package files to balloon up in size? Since it can be compressed pretty well, it's got to be duplicate data.

 

As for editing the textures, I noticed that the GEOM records in the .package files reference textures by some sort of hex string. If I could somehow access the data inside a .package through programming (C# I guess, since that's what S3PI uses), I'd just have to do md5 checks on the textures, and point the meshes to the "original" texture.

I think you can do that using “CAS Texture Unitool” I believe it was one of the first tools available for making CC sadly it was abandoned and it seems there’s no info besides some old tutorials.

 

EA never ever gave tools or documentation to mod this game and the people who were able to figure out how it works abandoned it years ago, not trying to discourage you just trying to say you’ll need some patience to understand how this mess of a game works.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use