The CAS Texture Unitool (hereafter referred to as CTU), is a tool to basically allow you to edit the CAS Part files that control which textures appear on which meshes. Using this tool, you may add new textures that appear in CAS for a specific mesh. You may also edit the pattern cutouts for those textures, the specular, the base colours, and pretty much everything possible thats available in the file. Additionally, you can add brand new, non-replacement meshes into the game.

Please note: If you had previously used one of the older versions of CTU from the other thread, then you'll notice that this new version now needs .NET 2.0 and not .NET 3.5. This is entirely deliberate and not a typo. If you ONLY have 3.5 on your PC, make sure to download and install the .NET 2.0 from the link above.

In fact, the .NET 2.0 was done for a reason: So that, in future, if somebody finds a squishinterface dll file for Mac OS X or Linux, it's theoretically possible for this tool to run on those systems.

How to install

DOWNLOAD BOTH FILES! You MUST download and extract both CasParts.rar AND CasTextureUnitool.rar to the same place.

Note: CasTextureUnitool.rar is the Windows version. CasTetxureUnitoolNo3d.rar is the OS X/Linux version. This one has no 3d view.

Extract the contents of both rars to the same place. KEEP FOLDER STRUCTURE INTACT. You will probably need to copy some files around after extraction.

You should see the CasTextureUnitool.exe and a bunch of other files, and then a casparts folder and an xml folder. Inside the casparts folder should be over 1000 files.

Do not delete/move/change or otherwise do anything to the files in casparts!! If you do and you complain I will beat you with a set of clocks since we are running out of lime.

Using the Mesh Name box, select your mesh (ie a T shirt, or a Bra, or whatever)

Click "Add a Design"

Disable any stencils that are enabled (it copies the default values) and Enable Stencil A

Click "Replace" and find the DDS file you want to use. NOTE: Make sure you saved in a DXT format (DXT1 for things without alpha channels, DXT3 or DXT5 for with alpha channels). Do not use 8.8.8.8 ARGB (R8G8B8A8) as it is uncompressed and you will end up with massive files. It's fine for patterns, but not good for this stuffs.

Click Commit

Click File -> Save As.

Note: You may add multiple Designs to a single file - this could be different t-shirt logos, etc, but all designs in a file affect the same mesh

Simple Usage Instructions

daluved1 has written a great guide on CTU and how to use it - please check it out on the wiki here: Sims 3:CTU Guidewiki

- More changes to support OS X / Linux
- Removed dependancies on the squishinterface
- Replaced DDS loading code with one from TigerM
- Fixed bug with not loading pathOverrides file
- Fixed bug with case of CasThumbnails.package being incorrect
- Removed old VPXY parsing code from saveToDBPF and replaced with new VPXY wrapper code
- Added in support for LOD1_1, LOD1_2 etc
- Fixed bug with Extract Meshes only extracting LOD1
- Added extra checks for if 3d mode is turned off then we dont need to generate textures in some cases
- Fixed case were FullBuild is not closed properly when getting CAS thumbnails
- Added more error checking to findSims3Root function
- Modified extractCASThumbnail so it now stores the sims3root location locally and does not call Helpers for every thumbnail
- Changed text on status label in Render window from "3d view is not initialised" to "Model not loaded"

- Full HSV pattern support
- You must remove your xml\custompatterns.xml file prior to running 1.9 for the first time, if you are updating over the top of v1.8!
- You must clear your pattern cache folder to see the updated patterns!
- Hair preview
- Makeup now has specular applied
- Fixed normal mapping on skintones so lighting is now working
- Fixed bug with Saving files (File is open in another process)
- Fixed bug with custom meshes not saving properly in the .package
- Fixed bug with custom bumpmap not being put in the right position
- Fixed a lot of the paths so they (should) work on OS X now
- Fixed Costume Makeup not able to be edited properly
- Patterns now auto-commit automatically when changing the details
- 3d view now support pattern tiling parameters
- Texture keys can now be double clicked to automatically view them
- True/False parameters can now be double clicked to automatically switch them around
- Added right click menu for Editing and Viewing/Replacing
- Changed Extract Meshes so it now uses the VPXY to locate the mesh and any subsections (LOD_1_1, etc)
- Changed Extract Textures so it now extracts the bumpmaps from the meshes too
- Render view now loads in multiple parts (LOD_1_1, LOD_1_2, etc) and displays them
- Hide progress bar in bottom right when not being used
- Added status label in bottom right to indicate currently loaded mesh
- Minor bugfixes and enhancements.

Major changes in v1.8:
- Pattern preview in 3d view
- Makeup preview
- 3d view can now always be visible
- Many many MANY bugfixes

- Changed BodyShader to CullMode None
- Fix for sending in null or zero length textures into textureloader (Reported by matildarose)
- Add MessageBox on image not found
- Some additional error checking for shaders

- Fixed tgiMeshLinks list not being cleared down properly
- Added revision number to title text
- make costumes load correctly
- Fixed hex input box on ColorPicker not working if you already had a hex code in it

- Changed .NET Framework from 3.5 back to 2.0.
-- Warning! May still be some bugs related to move back to v2.0, but have tested loading, saving, and 3d view, and all appears to be ok
- Changed build target to use x86 instead of Any CPU - fixes issues with BadImageFormat on 64 bit Vista
- Fixed issue with pattern colours from old, incorrect package files not being cleared down properly

- Adjusted casPart save to use String.IsNullOrEmpty instead of == ""

- Added findPattern function to PatternBrowser.cs

- Changed pattern display to get the pattern from findPattern
- Added creation of _fit, _fat, _thin and _special VPXY and BodyBlends

- Changed saveGeom to detect how many TGI links are in the original mesh (to fix bug with GEOMs with less than 5 links)

- Changed the convertColour lines in createColorArray to return Color.Empty
- Moved findKey() functions out into seperate MadScience.KeyUtils class, and moved newDDSfiles into a more generic Helpers.localFiles Hashtable.
- Fixed findKey, which exits early, when it just found /one/ key.
- Small optimization in PatternProcessor.

27th July 2009 v1.7.3495.37382
- Fixed bug with custom patterns colours not being loaded properly, so the background colour was not set properly
- Added ctrl-c ctrl-v to paste values into the hex colour box
- Added more logging when generating thumbnails
- Added Options panel with area to change TS3 root folder

27th July 2009 v1.7
- Fixed bug with OK button Colour window while in Known Colors not sending back the right colour
- Added new Mesh Find screen, with thumbnails, to easily find what you want to make
- Moved Part Details to new Tab
- Added option to make it so that selecting a mesh automatically adds a New Design.
- Added option to generate all 1k+ thumbnails for faster loading
- Added option in Pattern Browser to import Custom Patterns, which appear in the * Custom tab, and can be used on items in game
- Added Debug mode, which shows some advanced buttons
- While in Debug mode you may now modify the TGI lists to change linkages to VPXYs etc
- Added option to support custom in game CAS thumbnails
- Added Save menu item
- Fixed bug with loading previously Saved package files and re-saving lost all textures. Note that you MUST save using the Save option and not Save As if you want to keep all existing textures, resources, etc
- Added CAS Part Type to the flags screen
- Altered behaviour of CAS Part Type and Type so that you may only tick one thing at a time
- Fixed GDI+ bug with pattern browser loading it's patterns at startup
- Fixed bug with RGBMask not being overwritten when Commiting a pattern
- Made improvements to the speed of the pattern browser when loading thumbs
- Made improvements to the speed of Finding existing textures in the game files
- Added the ability to now add designs to ANY cas part in the entire game, including previously non recolourable stuff
- Other assorted speed improvements
- Probably some stuff I am missing.

13th July 2009 v1.5
- Fixed bug where you could not open up previously saved .package or .caspart files
- Fixed bug with Pattern (Coloured) colours not saving properly
- Increased size of Pattern (Coloured) colour boxes
- Added new Pattern Browser that lets you browse through all of the existing in-game patterns and select one for use in CTU - Meshes are now extracted with the instance ID appended to the name

11th July 2009 v1.32
- Added Extract Meshes button to Mesh Find tab, that automatically finds and extracts the meshes for the CAS part you have selected

10th July 2009: v1.3
- Added keyName support so that extracted textures from FullBuild2 now have the correct name
- Increased number of stencils in pool to 10, and added ability to specify up to 6 stencils per pattern again
- Added button to auto-populate the "Solid Colour" pattern with default values
- Removed hidden/debug buttons (Commit on Mesh Find, and Show XML details on Designs tab)
- Changed Design -> Stencils page to add a Commit button
- Fixed bug with Alpha not being transferred correctly from the Color Picker control
- Re-ordered Other Details
- Multiplier is now renamed to "Base Texture"

8th July 2009:
- Way too many to list here.
- This version allows only ONE stencil to be put on a design at a time. I'll be re-adding the ability to put multiple stencils on a design later.
- Should fix the issues with the afTopShirtTee_crew and others.
- GUI redesign and change

19th June 2009:
- Added validation to the keystrings so it doesn't crash when entering garbage.
- Added Category Details tab with all the various flags listed, so you can recategorise clothing
- Changed behaviour so that CAS Part Details will always show, even if the CAS part can't be changed right now.
- Probably some other stuff I forget.
- Added Commit button to Other tab
- Added ability to edit the flags for meshes that can't be redesigned (like beards)

Thanks and Credits

Thanks to all who decide to test this, Snaitf and Rabeeto for being initial guinea pigs, and fanseelamb for some of the UI suggestions.